Untangle pseudo-element and anon box definitions.
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Tracking
()
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(1 file)
I looked at this because in bug 2014331 I need to mark more pseudos as element-backed, and it's kinda silly the state our setup is in right now.
This is all a somewhat historical mess, because in the old style system pseudo-elements were just atoms, and we had that different types of atom setup. The source of truth for these right now lives in a header macro file, which isn't very flexible.
But now we have PseudoStyleType which represents both pseudos and anon boxes. Plus, the ::-moz-tree pseudo-elements are defined as anon boxes which doesn't make any sense.
Unify this in a similar way we treat CSS properties.
| Assignee | ||
Comment 1•20 hours ago
|
||
I looked at this because in bug 2014331 I need to mark more pseudos as
element-backed, and it's kinda silly the state our setup is in right
now.
This is all a somewhat historical mess, because in the old style system
pseudo-elements were just atoms, and we had that different types of atom
setup. The source of truth for these right now lives in a header macro
file, which isn't very flexible.
But now we have PseudoStyleType which represents both pseudos and anon
boxes, and is similar to the rust side PseudoElement enum.
Plus, the ::-moz-tree pseudo-elements are defined as anon boxes which
doesn't make any sense, so move them to pseudo-elements while at it.
Unify this in a similar way we treat CSS properties: Source of truth is
in pseudo_elements.toml / anon_boxes.toml, and we generate Rust and C++
as needed. This allows removing the nsStaticAtom subclass thing from
XPCOM, too.
This avoids some nasty duplication around which pseudos are pref-gated
and what not as well.
Comment 4•14 hours ago
|
||
| Assignee | ||
Updated•12 hours ago
|
Description
•