Open Bug 1409576 Opened 8 years ago Updated 3 years ago

Turn tree pseudos to pseudo-elements from anonymous boxes

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

Tracking Status
firefox57 --- wontfix
firefox58 --- affected

People

(Reporter: xidorn, Unassigned)

Details

Conceptually tree pseudos are more like pseudo-elements rather than anonymous box: they don't have their own boxes, and they aren't used in UA sheet with universal selector.
The down side of doing so is that we would lose the ability to use pseudo type to check tree pseudo with one comparison. This is a quite common pattern in various places including rendering and cascading. Replacing one in-place comparison with a function of 12-branch switch, and putting it in some hotter path (in the old style system) don't sound all that trivial. ... Maybe we can do it later.
No longer blocks: 1397644
Priority: -- → P4
Also anonymous boxes are not exposed to Web content, whereas pseudo-elements are by default (but presumably could be hidden).
Tree pseudos are an exception in that sense as well. They are currently exposed to web content (and are the only anonymous boxes being so). We tried to unship tree pseudos from web content in bug 1379031, but was concerned on webcompat so that didn't proceed.
Seems like if there's a real web compat concern, we should probably try to complete the unshipping from being Web-visible first, before making other changes?
I don't think this bug should include any content-visible behavior change... It intends to just change how we internally handle those pseudos. Since pseudo-elements have an extra flag field, converting tree pseudos to pseudo-elements should also make it easier to control their behavior, I suppose.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.