WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
11384
CSS2/3: Selectors are not re-evaluated after dynamically updating the DOM (Acid3 bug)
https://bugs.webkit.org/show_bug.cgi?id=11384
Summary
CSS2/3: Selectors are not re-evaluated after dynamically updating the DOM (Ac...
Niels Leenheer (HTML5test)
Reported
2006-10-23 02:43:41 PDT
After the DOM is modified the CSS selectors should be re-evaluated. Affected selectors: :first-child, :last-child, :only-child, :first-of-type, :last-of-type, :only-of-type, :empty For example: an element that used to be empty would match the :empty selector. If the update added a new child to that element, it should no longer match the :empty selector. Another example: an element that is the only child of its parent would match the following selectors: :first-child, :last-child, :only-child, :first-of-type, :last-of-type and :only-of-type. If we modify the DOM and append another child of the same type, the original element would only match the :first-child selector.
Attachments
Minimal test case
(531 bytes, text/html)
2008-01-29 00:32 PST
,
Robert Blaut
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2007-01-07 02:50:10 PST
I believe there an existing bug which may already cover this issue, but I can't find it in my quick skim through Bugzilla.
Robert Blaut
Comment 2
2008-01-29 00:32:11 PST
Created
attachment 18758
[details]
Minimal test case I've created minimal test case for this bug based on CSS3 Selectors test suite.
Robert Blaut
Comment 3
2008-01-29 00:54:36 PST
(In reply to
comment #1
)
> I believe there an existing bug which may already cover this issue, but I can't > find it in my quick skim through Bugzilla.
After searching I've found three reports similar to this bug:
bug 12519
,
bug 12520
,
bug 16706
.
Robert Blaut
Comment 4
2008-01-29 04:42:37 PST
***
Bug 16706
has been marked as a duplicate of this bug. ***
Robert Blaut
Comment 5
2008-01-30 14:37:36 PST
Found another similar
bug 9983
.
Robert Blaut
Comment 6
2008-01-30 15:06:19 PST
Interesting behavior regarding test case found by Alexey: 1. Open the test case in a new tab in background. 2. Don't activate the background tab unless it loads completely. 3. Switch to the background tab and you see the test case passed. IMO this behavior is caused by the fact that styles are applied when the page becomes visible (not earlier). So the styles are applied on modified DOM tree. The styles don't need to be re-evaluated.
Dave Hyatt
Comment 7
2008-02-02 02:49:13 PST
This has been taken care of.
Robert Blaut
Comment 8
2008-02-21 22:19:21 PST
***
Bug 9983
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug