Closed
Bug 635286
Opened 14 years ago
Closed 14 years ago
":not()" pseudo class in ":-moz-any()" selector doesn't work correctly
Categories
(Core :: CSS Parsing and Computation, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla2.0
People
(Reporter: yuki, Assigned: bzbarsky)
Details
(Keywords: css-moz)
Attachments
(5 files)
847 bytes,
text/html
|
Details | |
1.66 KB,
text/html
|
Details | |
10.82 KB,
patch
|
dbaron
:
review+
dbaron
:
approval2.0+
|
Details | Diff | Splinter Review |
8.71 KB,
patch
|
Details | Diff | Splinter Review | |
6.99 KB,
patch
|
Details | Diff | Splinter Review |
Build identifier: Mozilla/5.0 (Windows NT 6.0; rv:2.0b12pre) Gecko/20110218 Firefox/4.0b12pre
When an element <div class="before"> becomes to <div class="after"> by changing its class, following four CSS selectors don't match to the element anymore:
/* 1. any element which has a class "before" */
:-moz-any(.before) { background: red; }
/* 2. any element which doesn't have a class "after" */
:not(.after) { background: red; }
/* 3. equals to the case 2 but wrapped by :-moz-any */
:-moz-any(:not(.after)) { background: red; }
/* 4. equals to the case 2 but the inner selector is wrapped by :-moz-any */
:not(:-moz-any(.after)) { background: red; }
However, actually the case 3 seems to be still applied to <div class="after">. The attached HTML is a simple testcase based on this scenario. All four lines should become green, but actually the third line is still red on my Minefield.
Moreover, when I inspected actually-applied style declarations to the third line by the DOM Inspector addon, then the line suddenly became to green, even if I did no change on the DOM. It is very odd behavior.
Reporter | ||
Comment 1•14 years ago
|
||
mochitest version
Reporter | ||
Comment 2•14 years ago
|
||
I've verified that this problem appears on Windows 2000 with clean profile.
Build identifier: Mozilla/5.0 (Windows NT 5.0; rv:2.0b12pre) Gecko/20110218 Firefox/4.0b12pre
Assignee | ||
Comment 3•14 years ago
|
||
Yeah, the recurrence through :-moz-any in AddSelector needs to look at mNegations too.
Patch coming up.
Assignee: nobody → bzbarsky
Priority: -- → P1
Assignee | ||
Comment 4•14 years ago
|
||
Attachment #513538 -
Flags: review?(dbaron)
Assignee | ||
Comment 5•14 years ago
|
||
Assignee | ||
Comment 6•14 years ago
|
||
Assignee | ||
Updated•14 years ago
|
Whiteboard: [need review]
Comment on attachment 513538 [details] [diff] [review]
Proposed fix
r+a2.0=dbaron
Attachment #513538 -
Flags: review?(dbaron)
Attachment #513538 -
Flags: review+
Attachment #513538 -
Flags: approval2.0+
Assignee | ||
Updated•14 years ago
|
Whiteboard: [need review] → [need landing]
Assignee | ||
Comment 8•14 years ago
|
||
Pushed http://hg.mozilla.org/mozilla-central/rev/66167f6eccce
SHIMODA Hiroshi, thank you very much for the bug report and test!
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [need landing]
Target Milestone: --- → mozilla2.0
Reporter | ||
Comment 9•14 years ago
|
||
Verified on Mozilla/5.0 (Windows NT 6.0; rv:2.0b13pre) Gecko/20110225 Firefox/4.0b13pre
Thanks a lot!
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•