<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>170411</bug_id>
          
          <creation_ts>2008-09-04 20:17:56 +0000</creation_ts>
          <short_desc>problem with empty cssRules in styleSheets</short_desc>
          <delta_ts>2008-10-20 00:28:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konqueror</product>
          <component>khtml</component>
          <version>unspecified</version>
          <rep_platform>Microsoft Windows</rep_platform>
          <op_sys>Microsoft Windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="lunter">lunter</reporter>
          <assigned_to name="Konqueror Bugs">konqueror-bugs-null</assigned_to>
          <cc>germain</cc>
    
    <cc>maksim</cc>
    
    <cc>WojciechK</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>643688</commentid>
    <comment_count>0</comment_count>
    <who name="lunter">lunter</who>
    <bug_when>2008-09-04 20:17:56 +0000</bug_when>
    <thetext>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!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>643689</commentid>
    <comment_count>1</comment_count>
      <attachid>27244</attachid>
    <who name="lunter">lunter</who>
    <bug_when>2008-09-04 20:18:22 +0000</bug_when>
    <thetext>Created attachment 27244
source</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>645526</commentid>
    <comment_count>2</comment_count>
    <who name="Marian Kiepski">WojciechK</who>
    <bug_when>2008-09-11 15:15:26 +0000</bug_when>
    <thetext>Confirmed on konqueror 4.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>650640</commentid>
    <comment_count>3</comment_count>
    <who name="Germain Garand">germain</who>
    <bug_when>2008-10-03 04:27:54 +0000</bug_when>
    <thetext>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 ) &lt;&lt; &quot;got ruleset&quot; &lt;&lt; endl &lt;&lt; &quot;  selector:&quot;;
 #endif
        CSSParser *p = static_cast&lt;CSSParser *&gt;(parser);
-       if ( (yyvsp[(1) - (2)].selectorList) &amp;&amp; (yyvsp[(2) - (2)].ok) &amp;&amp; p-&gt;numParsedProperties ) {
+       if ( (yyvsp[(1) - (2)].selectorList)  ) {
            CSSStyleRuleImpl *rule = new CSSStyleRuleImpl( p-&gt;styleElement );
            CSSStyleDeclarationImpl *decl = p-&gt;createStyleDeclaration( rule );
            rule-&gt;setSelector( (yyvsp[(1) - (2)].selectorList) );
--- trunk/KDE/kdelibs/khtml/css/parser.y #867193:867194
@@ -648,7 +648,7 @@
        kDebug( 6080 ) &lt;&lt; &quot;got ruleset&quot; &lt;&lt; endl &lt;&lt; &quot;  selector:&quot;;
 #endif
        CSSParser *p = static_cast&lt;CSSParser *&gt;(parser);
-       if ( $1 &amp;&amp; $2 &amp;&amp; p-&gt;numParsedProperties ) {
+       if ( $1  ) {
            CSSStyleRuleImpl *rule = new CSSStyleRuleImpl( p-&gt;styleElement );
            CSSStyleDeclarationImpl *decl = p-&gt;createStyleDeclaration( rule );
            rule-&gt;setSelector( $1 );
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>655453</commentid>
    <comment_count>4</comment_count>
    <who name="Germain Garand">germain</who>
    <bug_when>2008-10-20 00:28:07 +0000</bug_when>
    <thetext>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&amp;revision=873668
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>27244</attachid>
            <date>2008-09-04 20:18:22 +0000</date>
            <delta_ts>2008-09-04 20:18:22 +0000</delta_ts>
            <desc>source</desc>
            <filename>kde_002.html</filename>
            <type>text/html</type>
            <size>245</size>
            <attacher name="lunter">lunter</attacher>
            
              <data encoding="base64">PGRpdj5GRiwgT3BlcmEsIFNhZmFyaSAoYW5kIElFKSBhbGVydCAnLmF7fSc8L2Rpdj4NCjxkaXY+
S0hUTUwgYWxlcnRzICcuYntjb2xvcjpibHVlfScgYmVjYXVzZSB3cm9uZ2x5IGlnbm9yZXMgZW1w
dHkgcnVsZSE8L2Rpdj4NCjxzdHlsZT4NCiAuYXt9DQogLmJ7Y29sb3I6Ymx1ZX0NCjwvc3R5bGU+
DQo8c2NyaXB0Pg0KIGFsZXJ0KGRvY3VtZW50LnN0eWxlU2hlZXRzWzBdLmNzc1J1bGVzWzBdLmNz
c1RleHQpDQo8L3NjcmlwdD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>