<?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>9983</bug_id>
          
          <creation_ts>2006-07-18 04:12:28 -0700</creation_ts>
          <short_desc>dynamically generated elements do not inherit css properties</short_desc>
          <delta_ts>2008-02-21 22:19:21 -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>DOM</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>11384</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michiel Roding">michiel</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>50256</commentid>
    <comment_count>0</comment_count>
    <who name="Michiel Roding">michiel</who>
    <bug_when>2006-07-18 04:12:28 -0700</bug_when>
    <thetext>when adding an element to the DOM, some css-properties are not set.

See the example; a p + p selector is defined, but not applied. Neither using insertBefore nor appendChild.

this applies both to the 420+ nightly and 419.3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50257</commentid>
    <comment_count>1</comment_count>
      <attachid>9545</attachid>
    <who name="Michiel Roding">michiel</who>
    <bug_when>2006-07-18 04:13:08 -0700</bug_when>
    <thetext>Created attachment 9545
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50265</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-07-18 04:40:08 -0700</bug_when>
    <thetext>Looking at the DOM using the Web Inspector (right-click on page, &quot;Inspect Element&quot; on nightly builds), I&apos;m seeing this on the test page:

&lt;p id=&quot;p2&quot;&gt;
&lt;script&gt;
&lt;p&gt;

I think the test case may be wrong since running appendChild() on the &lt;body&gt; tag will produce the above results.  Also, the current test case looks the same when viewed in Firefox 1.5.0.4.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50266</commentid>
    <comment_count>3</comment_count>
      <attachid>9547</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-07-18 04:42:05 -0700</bug_when>
    <thetext>Created attachment 9547
Test case with &lt;script&gt; before &lt;p&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50267</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-07-18 04:43:53 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Created an attachment (id=9547) [edit]
&gt; Test case with &lt;script&gt; before &lt;p&gt;

This test case works fine with a locally-built WebKit r15500 on Safari 2.0.4 (419.3) on Mac OS X 10.4.7 (8J135/PowerPC), thus I&apos;m closing this bug as RESOLVED/WORKSFORME.

Note that if this test case does NOT work with production Safari, there&apos;s not much that can be done by the WebKit project itself since the bug is already fixed in this project.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50268</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-07-18 04:46:40 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Note that if this test case does NOT work with production Safari, there&apos;s not
&gt; much that can be done by the WebKit project itself since the bug is already
&gt; fixed in this project.

This test case works in production Safari 2.0.4 (419.3) as well!  :)
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50269</commentid>
    <comment_count>6</comment_count>
    <who name="Michiel Roding">michiel</who>
    <bug_when>2006-07-18 04:47:17 -0700</bug_when>
    <thetext>try uncommenting line 16 and commenting line 17; it will insert the element before the existing P. 

In firefox, in that case (prepending) it doesn&apos;t work unless you do:
document.body.style.display = &apos;none&apos;;
document.body.style.display = &apos;block&apos;;

which forces ff to &apos;rerender&apos;; the second P does turn yellow then.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50278</commentid>
    <comment_count>7</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-07-18 06:14:43 -0700</bug_when>
    <thetext>Reopening per Comment #6.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50279</commentid>
    <comment_count>8</comment_count>
      <attachid>9552</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-07-18 06:20:28 -0700</bug_when>
    <thetext>Created attachment 9552
Test exhibiting issue using insertBefore()

This test does exhibit the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50280</commentid>
    <comment_count>9</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-07-18 06:20:59 -0700</bug_when>
    <thetext>Confirmed in locally-built WebKit r15500.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50281</commentid>
    <comment_count>10</comment_count>
      <attachid>9554</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-07-18 07:19:48 -0700</bug_when>
    <thetext>Created attachment 9554
Better test case (broken results obvious)

Interestingly, the Web Inspector shows that the paragraph that should be yellow has the style applied to it!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55371</commentid>
    <comment_count>11</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-09-12 23:47:19 -0700</bug_when>
    <thetext>We don&apos;t handle dynamic sibling updates at all right now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68847</commentid>
    <comment_count>12</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-01-30 14:39:12 -0800</bug_when>
    <thetext>Look also at similar bug 11384.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71465</commentid>
    <comment_count>13</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-02-21 22:19:21 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 11384 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>9545</attachid>
            <date>2006-07-18 04:13:08 -0700</date>
            <delta_ts>2006-07-18 04:42:05 -0700</delta_ts>
            <desc>test case</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>444</size>
            <attacher name="Michiel Roding">michiel</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoKcCB7YmFja2dyb3VuZC1jb2xv
cjpyZWQ7fQpwICsgcCB7YmFja2dyb3VuZC1jb2xvcjp5ZWxsb3c7fQoKPC9zdHlsZT4KPGJvZHk+
CjxwIGlkPSJwMiI+cGFyYWdyYWFmIDJ4PC9wPgoKPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3Jp
cHQiPgoKdmFyIHAgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdwJyk7CnAuYXBwZW5kQ2hpbGQo
ZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoJ3BhcmFncmFhZiAxJykpOwovKmRvY3VtZW50LmdldEVs
ZW1lbnRzQnlUYWdOYW1lKCdib2R5JylbMF0uaW5zZXJ0QmVmb3JlKHAsIGRvY3VtZW50LmdldEVs
ZW1lbnRCeUlkKCdwMicpKTsqLwpkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgnYm9keScp
WzBdLmFwcGVuZENoaWxkKHApOwo8L3NjcmlwdD4KPC9ib2R5Pgo8L2h0bWw+
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>9547</attachid>
            <date>2006-07-18 04:42:05 -0700</date>
            <delta_ts>2006-07-18 06:20:28 -0700</delta_ts>
            <desc>Test case with &lt;script&gt; before &lt;p&gt;</desc>
            <filename>bug-9983-test.html</filename>
            <type>text/html</type>
            <size>445</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoKcCB7YmFja2dyb3VuZC1jb2xv
cjpyZWQ7fQpwICsgcCB7YmFja2dyb3VuZC1jb2xvcjp5ZWxsb3c7fQoKPC9zdHlsZT4KPGJvZHk+
Cgo8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+Cgp2YXIgcCA9IGRvY3VtZW50LmNyZWF0
ZUVsZW1lbnQoJ3AnKTsKcC5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSgncGFy
YWdyYWFmIDEnKSk7Ci8qZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2JvZHknKVswXS5p
bnNlcnRCZWZvcmUocCwgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3AyJykpOyovCmRvY3VtZW50
LmdldEVsZW1lbnRzQnlUYWdOYW1lKCdib2R5JylbMF0uYXBwZW5kQ2hpbGQocCk7Cjwvc2NyaXB0
Pgo8cCBpZD0icDIiPnBhcmFncmFhZiAyeDwvcD4KPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>9552</attachid>
            <date>2006-07-18 06:20:28 -0700</date>
            <delta_ts>2006-07-18 07:19:48 -0700</delta_ts>
            <desc>Test exhibiting issue using insertBefore()</desc>
            <filename>bug-9983-test.html</filename>
            <type>text/html</type>
            <size>384</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoKcCB7YmFja2dyb3VuZC1jb2xv
cjpyZWQ7fQpwICsgcCB7YmFja2dyb3VuZC1jb2xvcjp5ZWxsb3c7fQoKPC9zdHlsZT4KPGJvZHk+
CjxwIGlkPSJwMiI+cGFyYWdyYWFmIDJ4PC9wPgoKPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3Jp
cHQiPgoKdmFyIHAgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdwJyk7CnAuYXBwZW5kQ2hpbGQo
ZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoJ3BhcmFncmFhZiAxJykpOwpkb2N1bWVudC5nZXRFbGVt
ZW50c0J5VGFnTmFtZSgnYm9keScpWzBdLmluc2VydEJlZm9yZShwLCBkb2N1bWVudC5nZXRFbGVt
ZW50QnlJZCgncDInKSk7Cjwvc2NyaXB0Pgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>9554</attachid>
            <date>2006-07-18 07:19:48 -0700</date>
            <delta_ts>2006-07-18 07:19:48 -0700</delta_ts>
            <desc>Better test case (broken results obvious)</desc>
            <filename>bug-9983-test-v2.html</filename>
            <type>text/html</type>
            <size>422</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoKcCB7YmFja2dyb3VuZC1jb2xv
cjpyZWQ7fQpwICsgcCB7YmFja2dyb3VuZC1jb2xvcjp5ZWxsb3c7fQoKPC9zdHlsZT4KPGJvZHk+
CjxwIGlkPSJwMiI+VGhpcyBwYXJhZ3JhcGggc2hvdWxkIGJlIHllbGxvdy48L3A+Cgo8c2NyaXB0
IHR5cGU9InRleHQvamF2YXNjcmlwdCI+Cgp2YXIgcCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQo
J3AnKTsKcC5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSgnVGhpcyBwYXJhZ3Jh
cGggc2hvdWxkIGJlIHJlZC4nKSk7CmRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCdib2R5
JylbMF0uaW5zZXJ0QmVmb3JlKHAsIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdwMicpKTsKPC9z
Y3JpcHQ+CjwvYm9keT4KPC9odG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>