Closed
Bug 524175
Opened 15 years ago
Closed 15 years ago
Weight calculation wrong for selectors involving pseudo-elements
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(2 files)
175 bytes,
text/html
|
Details | |
4.15 KB,
patch
|
zwol
:
review+
|
Details | Diff | Splinter Review |
This is a regression from bug 520848, pointed out in bug 508466 comment 17. Testcase attached.
The key issue is the removal of the weight += listSel->CalcWeight() call in the old !IsSinglePseudoClass(*listSel) branch under (!nsCSSPseudoClasses::IsPseudoClass(pseudoClassList->mAtom)).
Assignee | ||
Comment 1•15 years ago
|
||
Oh, and we're no longer dropping rules with multiple pseudo-elements, though at least I suspect we're not matching them...
Assignee | ||
Comment 2•15 years ago
|
||
Attachment #408089 -
Flags: review?(zweinberg)
Comment 3•15 years ago
|
||
Comment on attachment 408089 [details] [diff] [review]
Fix
Looks good.
CSS2.1 does say that pseudo-elements contribute to the 'd' component of the specificity (== the low byte of the weight) but I cannot presently think of a situation where it matters, and maybe that should be a follow-up bug.
Attachment #408089 -
Flags: review?(zweinberg) → review+
Assignee | ||
Comment 4•15 years ago
|
||
Yeah, I can't think of a situation where it matters either, until we support selectors with more than one pseudo-element in them. And even then it might not.
Assignee | ||
Comment 5•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•15 years ago
|
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•