Bug 170411 - problem with empty cssRules in styleSheets
Summary: problem with empty cssRules in styleSheets
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal (vote)
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-04 20:17 UTC by lunter
Modified: 2008-10-20 00:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
source (245 bytes, text/html)
2008-09-04 20:18 UTC, lunter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lunter 2008-09-04 20:17:56 UTC
Version:           Konqueror 4.1.1 (Windows XP) (using KDE 4.1.1)
Compiler:          n/a n/a
OS:                MS Windows
Installed from:    MS Windows

http://pc44.one.pl/goorol/bugs/kde_002.html

KHTML JS ignores empty rules in styleSheets!
Comment 1 lunter 2008-09-04 20:18:22 UTC
Created attachment 27244 [details]
source
Comment 2 Marian Kiepski 2008-09-11 15:15:26 UTC
Confirmed on konqueror 4.0
Comment 3 Germain Garand 2008-10-03 04:27:54 UTC
SVN commit 867194 by ggarand:

do not skip empty CSS rules - they must appear in the cssRules array.

digg.com, for instance, needs this to perform some unspeakable CSS hacks.

BUG: 170411, 165734


 M  +1 -1      parser.cpp  
 M  +1 -1      parser.y  


--- trunk/KDE/kdelibs/khtml/css/parser.cpp #867193:867194
@@ -2427,7 +2427,7 @@
        kDebug( 6080 ) << "got ruleset" << endl << "  selector:";
 #endif
        CSSParser *p = static_cast<CSSParser *>(parser);
-       if ( (yyvsp[(1) - (2)].selectorList) && (yyvsp[(2) - (2)].ok) && p->numParsedProperties ) {
+       if ( (yyvsp[(1) - (2)].selectorList)  ) {
            CSSStyleRuleImpl *rule = new CSSStyleRuleImpl( p->styleElement );
            CSSStyleDeclarationImpl *decl = p->createStyleDeclaration( rule );
            rule->setSelector( (yyvsp[(1) - (2)].selectorList) );
--- trunk/KDE/kdelibs/khtml/css/parser.y #867193:867194
@@ -648,7 +648,7 @@
        kDebug( 6080 ) << "got ruleset" << endl << "  selector:";
 #endif
        CSSParser *p = static_cast<CSSParser *>(parser);
-       if ( $1 && $2 && p->numParsedProperties ) {
+       if ( $1  ) {
            CSSStyleRuleImpl *rule = new CSSStyleRuleImpl( p->styleElement );
            CSSStyleDeclarationImpl *decl = p->createStyleDeclaration( rule );
            rule->setSelector( $1 );
Comment 4 Germain Garand 2008-10-20 00:28:07 UTC
SVN commit 873668 by ggarand:

automatically merged revision 867194:
do not skip empty CSS rules - they must appear in the cssRules array.

digg.com, for instance, needs this to perform some unspeakable CSS hacks.

BUG: 170411, 165734

 M  +1 -1      parser.cpp  
 M  +1 -1      parser.y  


WebSVN link: http://websvn.kde.org/?view=rev&revision=873668