As an incremental step towards removing the inner / outer distinction.
Now that we have it available in rust, this is trivial, and also shrinks
ComputedStyle objects, so win-win.
Differential Revision: https://phabricator.services.mozilla.com/D292061
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.
Differential Revision: https://phabricator.services.mozilla.com/D282076
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.
Differential Revision: https://phabricator.services.mozilla.com/D282076
This reverts commit 03c0249d4e.
Revert "Bug 2006964: Fix test for :host anchor scopes. r=layout-anchor-positioning-reviewers,layout-reviewers,emilio"
This reverts commit 8f2b951776.
Revert "Bug 2006964: Augment AnchorScopes with tree scopes. r=layout-anchor-positioning-reviewers,firefox-style-system-reviewers,layout-reviewers,emilio,dshin"
This reverts commit 001b1a4c23.
Revert "Bug 2006964: Introduce logic to match tree-scoped references and names of anchors. r=layout-anchor-positioning-reviewers,layout-reviewers,emilio"
This reverts commit 40d8475186.
Revert "Bug 2006964: Switch ResolutionMap to use scoped atom as hash key. r=layout-anchor-positioning-reviewers,layout-reviewers,emilio"
This reverts commit 8ccd0275d0.
Revert "Bug 2006964: Use tree-scoped anchor names in Gecko code. r=layout-anchor-positioning-reviewers,firefox-style-system-reviewers,layout-reviewers,emilio,dshin"
This reverts commit 6c2e9d558b.
Revert "Bug 2006964: Augment AnchorFunctions with tree scope. r=layout-anchor-positioning-reviewers,firefox-style-system-reviewers,layout-reviewers,emilio"
This reverts commit db32e12aa8.
Revert "Bug 2006964: Augment PositionAnchors with tree scope. r=layout-anchor-positioning-reviewers,firefox-style-system-reviewers,layout-reviewers,emilio"
This reverts commit b57c7e63b2.
Revert "Bug 2006964: Augment AnchorNames with tree scope. r=layout-anchor-positioning-reviewers,firefox-style-system-reviewers,emilio,dshin"
This reverts commit 13144de3e9.
Revert "Bug 2006964: Add default factory method to generated StyleCascadeLevel. r=layout-anchor-positioning-reviewers,firefox-style-system-reviewers,emilio"
This reverts commit e5d2a17140.
Revert "Bug 2006964: Add TreeScoped type to attach CascadeLevel to AnchorNames. r=layout-anchor-positioning-reviewers,firefox-style-system-reviewers,emilio"
This reverts commit 71138d7866.
This patch deals with anchor function and basic fully styleable pseudo element support.
Popovers, position-areas and place-selfs are not yet handled.
Differential Revision: https://phabricator.services.mozilla.com/D266360
The change notification here is a bit stilted.. we need an explicit
notification when removing targets or anchors immediately before reflow
so we can collect associated frames and update the relations on their
associated accessibles.
When anchors/targets are added, we need to wait till after reflow in
order to get the frames that are resolved.
Differential Revision: https://phabricator.services.mozilla.com/D264637
This reverts commit 0a7b2d917f.
Revert "Bug 1987945 - P3: Support details relation in anchored targets in remote accessibles. r=Jamie,layout-anchor-positioning-reviewers,layout-reviewers,emilio,firefox-style-system-reviewers"
This reverts commit e6ae7218f8.
Revert "Bug 1987945 - P2: Cache relations using multiple attributes for same relation type. r=Jamie"
This reverts commit 77defe6ce4.
Revert "Bug 1987945 - P1: Implement details relationship for CSS anchored local accessibles. r=Jamie,emilio"
This reverts commit cd9f4b716c.
The change notification here is a bit stilted.. we need an explicit
notification when removing targets or anchors immediately before reflow
so we can collect associated frames and update the relations on their
associated accessibles.
When anchors/targets are added, we need to wait till after reflow in
order to get the frames that are resolved.
Differential Revision: https://phabricator.services.mozilla.com/D264637
Computed color values will not be in the correct format, closer to the
one specified by the author. This also means that colors accross the
code are stored now as AbsoluteColor or StyleAbsoluteColor. This allows
color space/gamut information to be available for use.
Some animation related test failures had to be changed, because colors
now has greater precision. Animated a color now causes a lot more
animation updates, which was not initially expected. See the bug for
discussion.
Differential Revision: https://phabricator.services.mozilla.com/D171021
While looking at the backout, I noticed table parts relied on reframing
on abspos-container-ness changes in a subtle way, see the test, which
fails with the first patch of this bug applied without these changes.
Make the NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN mean the same for table parts
as for everything else. Instead, keep the registration status on each
relevant frame class individually.
Depends on D169127
Differential Revision: https://phabricator.services.mozilla.com/D170969
While looking at the backout, I noticed table parts relied on reframing
on abspos-container-ness changes in a subtle way, see the test, which
fails with the first patch of this bug applied without these changes.
Make the NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN mean the same for table parts
as for everything else. Instead, keep the registration status on each
relevant frame class individually.
Depends on D169127
Differential Revision: https://phabricator.services.mozilla.com/D170969
Add a dom/base/rust crate called just "dom" where we can share these.
Most of the changes are automatic:
s/mozilla::EventStates/mozilla::dom::ElementState/
s/EventStates/ElementState/
s/NS_EVENT_STATE_/ElementState::/
s/NS_DOCUMENT_STATE_/DocumentState::/
And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.
Differential Revision: https://phabricator.services.mozilla.com/D148537
This parsing is hidden behind the pref layout.css.page-size.enabled.
It isn't ideal that we parse this as a property, but we can't treat it as a
descriptor because of compatibility issues with other browsers. There are also
outstanding spec issues related to how descriptors like page-size are cascaded,
and whether the !important specifier is valid or not.
Differential Revision: https://phabricator.services.mozilla.com/D103958
This parsing is hidden behind the pref layout.css.page-size.enabled.
It isn't ideal that we parse this as a property, but we can't treat it as a
descriptor because of compatibility issues with other browsers. There are also
outstanding spec issues related to how descriptors like page-size are cascaded,
and whether the !important specifier is valid or not.
Differential Revision: https://phabricator.services.mozilla.com/D103958
This parsing is hidden behind the pref layout.css.page-size.enabled.
It isn't ideal that we parse this as a property, but we can't treat it as a
descriptor because of compatibility issues with other browsers. There are also
outstanding spec issues related to how descriptors like page-size are cascaded,
and whether the !important specifier is valid or not.
Differential Revision: https://phabricator.services.mozilla.com/D103958
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".
Differential Revision: https://phabricator.services.mozilla.com/D104588