Summary: | Replacing hidden element causes first-child selector to behave weirdly | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | NovakP <kuvik3> | ||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED CONFIGURATION CHANGED | ||||||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, ddkilzer, rniwa, simon.fraser | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | Windows 7 | ||||||
URL: | http://gamca.informacie.sk/betatest/webkit_table2/index_1-4a2.html | ||||||
Attachments: |
|
Description
NovakP
2010-01-11 11:10:05 PST
Created attachment 50668 [details]
[REDUCTION] Simple HTML/CSS/JS Showing The Problem
Attached a simpler reduction. Whenever a new first child element is inserted into a :first-child position where a :first-child selector has display:none, then any existing element affected by the :first-child selector is not updated correctly. Notes: This is not specific to <td>s. The exact same problem happens with :last-child and inserting the new element as the last child (appendChild instead of insertBefore). I did not test :only-child.
I am unable to reproduce this bug using attached test case in Safari 15.6 on macOS 12.5 and it matches with other browsers (Chrome Canary 106 and Firefox Nightly 104). As mentioned in expected result, it shows t2 and then inserting new bring back 't1' and then it brings x, x , x and it matches with other browsers. I think it might be fixed along the way and can be considered "RESOLVED CONFIGURATION CHANGED". Thanks! |