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
Created attachment 9545 [details] test case
Looking at the DOM using the Web Inspector (right-click on page, "Inspect Element" on nightly builds), I'm seeing this on the test page: <p id="p2"> <script> <p> I think the test case may be wrong since running appendChild() on the <body> tag will produce the above results. Also, the current test case looks the same when viewed in Firefox 1.5.0.4.
Created attachment 9547 [details] Test case with <script> before <p>
(In reply to comment #3) > Created an attachment (id=9547) [edit] > Test case with <script> before <p> 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'm closing this bug as RESOLVED/WORKSFORME. Note that if this test case does NOT work with production Safari, there's not much that can be done by the WebKit project itself since the bug is already fixed in this project.
(In reply to comment #4) > Note that if this test case does NOT work with production Safari, there's not > much that can be done by the WebKit project itself since the bug is already > fixed in this project. This test case works in production Safari 2.0.4 (419.3) as well! :)
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't work unless you do: document.body.style.display = 'none'; document.body.style.display = 'block'; which forces ff to 'rerender'; the second P does turn yellow then.
Reopening per Comment #6.
Created attachment 9552 [details] Test exhibiting issue using insertBefore() This test does exhibit the issue.
Confirmed in locally-built WebKit r15500.
Created attachment 9554 [details] Better test case (broken results obvious) Interestingly, the Web Inspector shows that the paragraph that should be yellow has the style applied to it!
We don't handle dynamic sibling updates at all right now.
Look also at similar bug 11384.
*** This bug has been marked as a duplicate of 11384 ***