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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>17082</bug_id>
          
          <creation_ts>2008-01-29 15:07:08 -0800</creation_ts>
          <short_desc>Acid3 bug: CSS objects in Webkit are not &quot;live&quot;</short_desc>
          <delta_ts>2008-02-10 14:33:40 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://acid3.acidtests.org/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>17064</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Dave Hyatt">hyatt</assigned_to>
          <cc>webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68725</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-01-29 15:07:08 -0800</bug_when>
    <thetext>WebKit fails Acid3&apos;s modification of style blocks text node test

This will require some reduction.  It might be a bug in the test.

Test 73: Undefined value

    function () {
      // test 73: dynamic modification of &lt;style&gt; blocks&apos; text nodes, from Jonas Sicking and Garret Smith
      var doc = kungFuDeathGrip.childNodes[3].contentDocument;
      assert(doc, &quot;missing document for test&quot;);
      assert(doc.images[0], &quot;prerequisite failed: no image&quot;);
      assertEquals(doc.images[0].height, 10, &quot;prerequisite failed: style didn&apos;t affect image&quot;);
      assertEquals(doc.styleSheets[0].href, null, &quot;internal stylesheet had a URI&quot;);
      doc.styleSheets[0].ownerNode.firstChild.data = &quot;img { height: 20px; }&quot;;
      assertEquals(doc.images[0].height, 20, &quot;change failed to take effect&quot;);
      doc.styleSheets[0].ownerNode.appendChild(doc.createTextNode(&quot;img { height: 30px; }&quot;));
      assertEquals(doc.images[0].height, 30, &quot;append failed to take effect&quot;);
      var rules = doc.styleSheets.cssRules; // &quot;All CSS objects in the DOM are &quot;live&quot;&quot; says section 2.1, Overview of the DOM Level 2 CSS Interfaces
      doc.styleSheets[0].insertRule(&quot;img { height: 40px; }&quot;, 2);
      assertEquals(doc.images[0].height, 40, &quot;insertRule failed to take effect&quot;);
      assertEquals(doc.styleSheets.cssRules.length, rules.length, &quot;cssRules isn&apos;t live&quot;);
      return 5;
    },</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68783</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-01-30 01:17:57 -0800</bug_when>
    <thetext>We&apos;ll need to build this into a nice stand-alone test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69342</commentid>
    <comment_count>2</comment_count>
      <attachid>18905</attachid>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-02-04 05:22:53 -0800</bug_when>
    <thetext>Created attachment 18905
minimal test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69343</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-02-04 05:33:53 -0800</bug_when>
    <thetext>The acid3 test 73 was changed a little:

 function () {
      // test 73: dynamic modification of &lt;style&gt; blocks&apos; text nodes, from Jonas Sicking and Garret Smith
      var doc = kungFuDeathGrip.childNodes[3].contentDocument;
      assert(doc, &quot;missing document for test&quot;);
      assert(doc.images[0], &quot;prerequisite failed: no image&quot;);
      assertEquals(doc.images[0].height, 10, &quot;prerequisite failed: style didn&apos;t affect image&quot;);
      doc.styleSheets[0].ownerNode.firstChild.data = &quot;img { height: 20px; }&quot;;
      assertEquals(doc.images[0].height, 20, &quot;change failed to take effect&quot;);
      doc.styleSheets[0].ownerNode.appendChild(doc.createTextNode(&quot;img { height: 30px; }&quot;));
      assertEquals(doc.images[0].height, 30, &quot;append failed to take effect&quot;);
      var rules = doc.styleSheets[0].cssRules; // &quot;All CSS objects in the DOM are &quot;live&quot;&quot; says section 2.1, Overview of the DOM Level 2 CSS Interfaces
      doc.styleSheets[0].insertRule(&quot;img { height: 40px; }&quot;, 2);
      assertEquals(doc.images[0].height, 40, &quot;insertRule failed to take effect&quot;);
      assertEquals(doc.styleSheets[0].cssRules.length, 3, &quot;count of rules is wrong&quot;);
      assertEquals(rules.length, 3, &quot;cssRules isn&apos;t live&quot;);
      // while we&apos;re at it, check some other things on doc.styleSheets:
      assert(doc.styleSheets[0].href === null, &quot;internal stylesheet had a URI: &quot; + doc.styleSheets[0].href);
      assert(document.styleSheets[0].href === null, &quot;internal acid3 stylesheet had a URI: &quot; + document.styleSheets[0].href);
      return 5;
    },
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70025</commentid>
    <comment_count>4</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2008-02-10 02:54:56 -0800</bug_when>
    <thetext>I&apos;m working on this one.  Nearly have a fix ready.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70026</commentid>
    <comment_count>5</comment_count>
      <attachid>19034</attachid>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2008-02-10 03:02:11 -0800</bug_when>
    <thetext>Created attachment 19034
Make the rules list live for stylesheets.

This code is just a huge mess.  This is the minimal surgery that I had to do to get this working (and should perform better).  The old code copied all of the rules into a separate list.   The new code will not do this if a StyleList is available, unless the IE rules() extension is being used (and charset rules have to be omitted).

In the longer term, this class could be fixed to just always reference StyleLists and to never have its own internal list.  It would have to operate a bit more like a collection in that case (knowing to skip charset rules if created as an IE rules() extension list).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70128</commentid>
    <comment_count>6</comment_count>
      <attachid>19034</attachid>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2008-02-10 13:30:10 -0800</bug_when>
    <thetext>Comment on attachment 19034
Make the rules list live for stylesheets.

Testcases amd changelogs are your friend :p</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70139</commentid>
    <comment_count>7</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2008-02-10 14:33:40 -0800</bug_when>
    <thetext>Fixed in r30130.

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>18905</attachid>
            <date>2008-02-04 05:22:53 -0800</date>
            <delta_ts>2008-02-04 05:22:53 -0800</delta_ts>
            <desc>minimal test case</desc>
            <filename>test-case.html</filename>
            <type>text/html</type>
            <size>543</size>
            <attacher name="Robert Blaut">webkit</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDov
L3d3dy53My5vcmcvVFIvaHRtbDQvc3RyaWN0LmR0ZCI+CjxodG1sPgo8aGVhZD4KCTx0aXRsZT5U
ZXN0IGNhc2UgZm9yIGJ1ZyAxNzA4MjwvdGl0bGU+Cgk8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJ
PC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4KPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPiAK
IHZhciBydWxlcyA9IGRvY3VtZW50LnN0eWxlU2hlZXRzWzBdLmNzc1J1bGVzOwogZG9jdW1lbnQu
c3R5bGVTaGVldHNbMF0uaW5zZXJ0UnVsZSgiaW1nIHsgaGVpZ2h0OiA0MHB4OyB9IiwgMCk7CiBp
ZiAoZG9jdW1lbnQuc3R5bGVTaGVldHNbMF0uY3NzUnVsZXMubGVuZ3RoICYmIHJ1bGVzLmxlbmd0
aCkgZG9jdW1lbnQud3JpdGUoIjxwPlRlc3Q6IFBBU1NFRDwvcD4iKTsgZWxzZSBkb2N1bWVudC53
cml0ZSgiPHAgc3R5bGU9XCJiYWNrZ3JvdW5kLWNvbG9yOnJlZDtcIj5UZXN0OiBGQUlMRUQ8L3A+
Iik7Cjwvc2NyaXB0PgoKPC9ib2R5Pgo8L2h0bWw+
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>19034</attachid>
            <date>2008-02-10 03:02:11 -0800</date>
            <delta_ts>2008-02-10 13:30:10 -0800</delta_ts>
            <desc>Make the rules list live for stylesheets.</desc>
            <filename>patch.txt</filename>
            <type>text/plain</type>
            <size>2766</size>
            <attacher name="Dave Hyatt">hyatt</attacher>
            
              <data encoding="base64">SW5kZXg6IGNzcy9DU1NSdWxlTGlzdC5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gY3NzL0NTU1J1bGVMaXN0
LmNwcAkocmV2aXNpb24gMzAxMTEpCisrKyBjc3MvQ1NTUnVsZUxpc3QuY3BwCSh3b3JraW5nIGNv
cHkpCkBAIC0zNSwxMSArMzUsMTMgQEAgQ1NTUnVsZUxpc3Q6OkNTU1J1bGVMaXN0KCkKIAogQ1NT
UnVsZUxpc3Q6OkNTU1J1bGVMaXN0KFN0eWxlTGlzdCogbGlzdCwgYm9vbCBvbWl0Q2hhcnNldFJ1
bGVzKQogewotICAgIGlmIChsaXN0KSB7CisgICAgbV9saXN0ID0gbGlzdDsKKyAgICBpZiAobGlz
dCAmJiBvbWl0Q2hhcnNldFJ1bGVzKSB7CisgICAgICAgIG1fbGlzdCA9IDA7CiAgICAgICAgIHVu
c2lnbmVkIGxlbiA9IGxpc3QtPmxlbmd0aCgpOwogICAgICAgICBmb3IgKHVuc2lnbmVkIGkgPSAw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lnbmVkIGluZGV4KSB7IHJldHVybiBtX2xzdENTU1J1
bGVzLmF0KGluZGV4KTsgfQorICAgIHVuc2lnbmVkIGxlbmd0aCgpIGNvbnN0OworICAgIENTU1J1
bGUqIGl0ZW0odW5zaWduZWQgaW5kZXgpOwogCi0gICAgLyogbm90IHBhcnQgb2YgdGhlIERPTSAq
LworICAgIC8vIEZJWE1FOiBOb3QgcGFydCBvZiB0aGUgRE9NLiAgT25seSB1c2UgYnkgbWVkaWEg
cnVsZXMuICBXZSBzaG91bGQgYmUgYWJsZSB0byByZW1vdmUgdGhlbSBpZiB3ZSBjaGFuZ2VkIG1l
ZGlhIHJ1bGVzIHRvIHdvcmsKKyAgICAvLyBhcyBTdHlsZUxpc3RzIGluc3RlYWQuCiAgICAgdW5z
aWduZWQgaW5zZXJ0UnVsZShDU1NSdWxlKiwgdW5zaWduZWQgaW5kZXgpOwogICAgIHZvaWQgZGVs
ZXRlUnVsZSh1bnNpZ25lZCBpbmRleCk7CiAgICAgdm9pZCBhcHBlbmQoQ1NTUnVsZSopOwogCiBw
cm90ZWN0ZWQ6Ci0gICAgRGVwcmVjYXRlZFB0ckxpc3Q8Q1NTUnVsZT4gbV9sc3RDU1NSdWxlczsK
KyAgICBSZWZQdHI8U3R5bGVMaXN0PiBtX2xpc3Q7CisgICAgRGVwcmVjYXRlZFB0ckxpc3Q8Q1NT
UnVsZT4gbV9sc3RDU1NSdWxlczsgLy8gRklYTUU6IFdhbnQgdG8gZWxpbWluYXRlLCBidXQgdXNl
ZCBieSBJRSBydWxlcygpIGV4dGVuc2lvbiBhbmQgc3RpbGwgdXNlZCBieSBtZWRpYSBydWxlcy4K
IH07CiAKIH0gLy8gbmFtZXNwYWNlIFdlYkNvcmUK
</data>
<flag name="review"
          id="8320"
          type_id="1"
          status="+"
          setter="oliver"
    />
          </attachment>
      

    </bug>

</bugzilla>