Open Bug 2014922 Opened 20 hours ago Updated 12 hours ago

Untangle pseudo-element and anon box definitions.

Categories

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

enhancement

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.

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.

Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c70290c61956 https://hg.mozilla.org/integration/autoland/rev/ad7828fad99b Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika
Pushed by nfay@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/27f4694604d9 https://hg.mozilla.org/integration/autoland/rev/edf80f398885 Revert "Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika" for causing bustage @ ElementAnimationData.h

Backed out for causing bustage @ ElementAnimationData.h

Backout link

Push with failures

Failure log

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/30b7a3d89ac9 https://hg.mozilla.org/integration/autoland/rev/efabf69e5d35 Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika
Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: