Closed
Bug 309067
Opened 19 years ago
Closed 19 years ago
Implement :-moz-empty-except-children-with-localname(localname)
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
294 bytes,
text/html
|
Details | |
9.86 KB,
patch
|
Details | Diff | Splinter Review |
From bug 8131: > According to the behaviour spec, we need to apply > different styles to AREA elements if the IMG element is broken and the MAP > element only contains AREA elements. And similarly, the patch for bug 11011 has in it: +/* Nonempty applets should just show their kids. + XXXbz do we need a selector that will ignore <param> elements? */ So perhaps we should have a selector like :-moz-empty-except(ns|localname) that would match if the only kids are either ns:localname, or ignorable whitespace, comments, etc?
Comment 1•19 years ago
|
||
Sounds like it would have the same potential problems as my more wide-reaching :matches() suggestions, namely it would require a crawl of the element's children which would potentially be slow. Other than that, seems fine to me.
Assignee | ||
Comment 2•19 years ago
|
||
It only requires a crawl if we have a bunch of kids that have that fully qualified name. As soon as we hit any kid that doesn't, we know we don't match. So it's really not any slower than :-moz-only-whitespace...
Comment 3•19 years ago
|
||
True.
Assignee | ||
Comment 4•19 years ago
|
||
I can try to think of a less short but still scary name
Attachment #197231 -
Flags: superreview?(dbaron)
Attachment #197231 -
Flags: review?(dbaron)
Comment 5•19 years ago
|
||
Does that support ns|localname, or just localname?
Assignee | ||
Comment 6•19 years ago
|
||
That supports just localname and will only match if the ns of the kid is the same as the ns of the node we're matching. Given the (internal) uses for it we want, that restriction was acceptable, and I wasn't quite prepared to refactor the ns|localname parsing code such that I could reuse it here.
Assignee | ||
Comment 7•19 years ago
|
||
Oh, and this treats the localname as a literal, so * gets no special treatment (and in fact won't parse, since that's not an ident).
Comment 8•19 years ago
|
||
aha, I missed the bit in the patch where you checked the parent's namespace. Yeah, that sounds perfect. Cunning.
Comment on attachment 197231 [details] [diff] [review] Something silly along these lines >Index: dom/locales/en-US/chrome/layout/css.properties >+PEPseudoClassArgEOF=argument to pseudo-class selector >+PEPseudClassArgNotIdent=Expected identifier for pseudo-class parameter but found '%1$S'. >+PEPseudoClassNoClose=Missing closing ')' in pseudo-class '%1$S'. >+PEPseudoClassNoArg=Missing argument in pseudo-class '%1$S'. You lost the "o" on the second one of these. Please test that the error messages still work to double-check that there weren't other similar mistakes.
Attachment #197231 -
Flags: superreview?(dbaron)
Attachment #197231 -
Flags: superreview+
Attachment #197231 -
Flags: review?(dbaron)
Attachment #197231 -
Flags: review+
Assignee | ||
Comment 10•19 years ago
|
||
Assignee | ||
Comment 11•19 years ago
|
||
Assignee | ||
Updated•19 years ago
|
Priority: -- → P2
Target Milestone: --- → mozilla1.9alpha
Assignee | ||
Comment 12•19 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Summary: Consider implementing :-moz-empty-except(ns|localname) → Implement :-moz-empty-except-children-with-localname(localname)
You need to log in
before you can comment on or make changes to this bug.
Description
•