Closed Bug 145968 Opened 23 years ago Closed 22 years ago

CSS parser accepts unknown pseudo-classes/elements

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: dbaron, Assigned: dbaron)

References

()

Details

(Keywords: css1, testcase, Whiteboard: [Hixie-P3][CSS1-7.1])

Attachments

(1 file)

The CSS parser accepts unknown pseudo-classes/elements in violation of the CSS forward-compatible parsing rules. A proposed solution: * Split nsCSSAtomList into nsCSSPseudoClassList, nsCSSPseudoElementList, and nsCSSGlobalPseudoList (for the things I described as -moz-special in bug 144826). * Give these atom lists a lookup method as well. (The latter distinction would be useful for changes in ReResolveStyleContext, since it should skip over the "global pseudos". See bug 141054 comment 18.)
When you say "accepts" what do you mean?
Doesn't throw away the entire rule.
Hmm... so if any selector in a comma-separated list of selectors is not recognized the entire rule is to be tossed? where is this referenced? The reason I ask is that a selector like foo:ugh, bar is obviously "(foo with a pseudo-class of ugh) or (bar)" and it seems to me that style could be applied to things matching (bar) even per FC requirements?
Does that extend to foo:ugh(1), bar foo:ugh(1, {color: red}), bar ? Third paragraph of: http://www.w3.org/TR/REC-CSS2/syndata.html#q8
Ah, excellent, fourth paragraph. I wish this were in section 4.2 as well. ;) Thank you.
Whiteboard: [Hixie-P3] → [Hixie-P3][CSS1-7.1]
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → Future
Keywords: testcase
Attached file Ian's testcase ....
.... provided in comment 4 attached directly to bugzilla.
Fixed by patch in bug 62843.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
One website this broke is described in bug 220986.
*** Bug 223122 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: