[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    PATCH: Couple of CSS fixes
From:       Dawit Alemayehu <adawit () kde ! org>
Date:       2000-09-30 23:04:55
[Download RAW message or body]


Hi,

The attached patch fixes the following problems :

1.) A patch I previously commited to make sure the CSS parser ignore any 
@import statements after inlined style declrations did not work when you 
reloaded the document because the flag used indicate whether we had already 
parsed an inlined style declaration was never reset !  Also that patch did 
not properly parse past the incorrect @import statement. 

2.) The CSS parser does not ignore html comments if they do not come first
in the <style> declaration.  That is neither one of the following declaration 
are currently parsed properly:

<style>
@import url(imptest1.css);
UL {color: red;}
.four {color: purple;}
<!--
P.six {color: green;}
-->
</style>

OR

<style>
@import url(imptest1.css);
<!--
P.six {color: green;}
-->
UL {color: red;}
.four {color: purple;}
</style>

To fix this I have moved the html comment detection code from
CSSStyleSheetImpl::parseString -> StyleBaseImpl::parseRule and added code to 
check and skip the closing tag of an html comment as well.  In fact, now it 
does not matter where the comment tag appears withing the <style> tag, it 
will be dealt with appropriately.

You can use the following link to test the effect of the patch:
http://www.w3.org/Style/CSS/Test/current/sec11.htm

Regards,
Dawit A.
["css-patch.tgz" (application/x-gzip)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic