Closed
Bug 962628
Opened 10 years ago
Closed 10 years ago
Sibling combinators should work on roots of anonymous content subtrees
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(1 file, 1 obsolete file)
4.78 KB,
patch
|
Details | Diff | Splinter Review |
Right now they don't because we implement them on top of IndexOf(). But we don't want to use IndexOf anyway, and I think that if your anon content looks like this: <span class="a"></span> <span class="b"></span> then ".a + .b" should match the second span.
Assignee | ||
Comment 1•10 years ago
|
||
Cameron, are you OK reviewing this? If not, please punt to dbaron.
Attachment #8363719 -
Flags: review?(cam)
Comment 2•10 years ago
|
||
Comment on attachment 8363719 [details] [diff] [review] Make '+' and '~' combinators work at the top level of an anonymous content forest. Review of attachment 8363719 [details] [diff] [review]: ----------------------------------------------------------------- No, I'm happy with this. Maybe replace the for loop entirely with a GetPreviousSiblingElement call? And a test that exercises the NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS flag having been set on the parent, e.g. starting with #a having some text content, using script to remove the text content, and having this rule: .a:empty + .b { ... }
Attachment #8363719 -
Flags: review?(cam) → review+
Assignee | ||
Comment 3•10 years ago
|
||
> Maybe replace the for loop entirely with a GetPreviousSiblingElement call?
Good call. It's _maybe_ a tiny bit slower due to not being inlined, but seems totally worth it.
Assignee | ||
Comment 4•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Attachment #8363719 -
Attachment is obsolete: true
Assignee | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f88b13e2ae0a
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla29
https://hg.mozilla.org/mozilla-central/rev/f88b13e2ae0a
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•