Hi Jeremy, On Sat, Nov 20, 2010 at 12:31:55PM +0000, Jeremy Henty wrote:
Currently Dillo tries to parse every @-rule in the same way (with CssParser::parseImport()). This causes problems, particularly with @media. Here[1] part of the style is missing so that the line size is smaller than the text. I have also attached a small test case where a @media rule causes the red style to go missing.
So, here are two patches that make Dillo ignore @-rules that it does not recognise. The first patch just moves the test for the import keyword from CssParser::parseImport() into the main parser loop. Because it changes indentation it looks much more radical than it is. The second patch reworks the main parser loop so that CssParser::parseImport() is only called for @import and other @-rules are skipped.
Please review and comment. I will push the patches if you think they are good.
Looks good to me. Please commit! Thanks, Johannes