This also destroys the AnimationCollection we don't need, and it's especially
necessary when we make the `document.documentElement.style.display` be `none`.
The test will be added when we support getAnimations() for view transition
pseudo-elements (i.e. Bug 1921109).
Differential Revision: https://phabricator.services.mozilla.com/D231535
`nsIFrame::GetParentComputedStyle()` has multiple callers, and is implemented
and overridden by several frame classes. It is not worth trying to remove it.
Differential Revision: https://phabricator.services.mozilla.com/D231771
Previous go at optimizing in Bug 1896380 was not quite correct.
For example, given `.anchor:has(:first-child)`, when `.anchor`
has a new child inserted, we need to be able to invalidate (Which
we did not).
Thankfully, we can reason that the previously-optimized pseudo-
classes, i.e. :empty, :first-child, :last-child, can be trivially
rejected from activating the invalidation machinery by by examining
its descendants/siblings - e.g. `:has(:first-child)` is irrelevant
to elements we know aren't in the first sibling position.
Differential Revision: https://phabricator.services.mozilla.com/D229670
Just like what we do for EffectSet. Also, we will update
ElementAnimationData later, so for now only change the APIs of
AnimationCollection and TimelineCollection (and their callers).
Differential Revision: https://phabricator.services.mozilla.com/D228227
Use `PseudoStyleRequest` in the APIs of EffectSet. We would like to
store the animation in the originating element, so need to use
`PseudoStyleRequest`.
Differential Revision: https://phabricator.services.mozilla.com/D228226
Basically, we'd like to separate the originating element and its pseudo
element request in Animation code (for better compatibility with Web
Animations APIs and other pseudo types), and store the animations and
keyframe effects in the origninating element as well.
In this patch, we reuse `Element::GetPseudoElement()`, and update the
function signatures in EffectCompositor and RestyleManager.
All the following patches will replace more places with
`PseudoStyleRequest`.
Differential Revision: https://phabricator.services.mozilla.com/D228223
Reuse the editor's manual NAC machinery for now, and hook it into
StyleChildrenIterator and co.
We might need to slightly tweak the setup for selector-matching, not
sure yet, but that should be fine.
Differential Revision: https://phabricator.services.mozilla.com/D228255
Reuse the editor's manual NAC machinery for now, and hook it into
StyleChildrenIterator and co.
We might need to slightly tweak the setup for selector-matching, not
sure yet, but that should be fine.
Differential Revision: https://phabricator.services.mozilla.com/D228255
Reuse the editor's manual NAC machinery for now, and hook it into
StyleChildrenIterator and co.
We might need to slightly tweak the setup for selector-matching, not
sure yet, but that should be fine.
Differential Revision: https://phabricator.services.mozilla.com/D228255
We had the same list of attributes in multiple places, put it in
Theme.cpp.
Only a few states can change widget state. Just hardcode them in
RestyleManager.cpp (where there was already some of it) instead of
reusing a weird API.
Shouldn't have any behavior change.
Differential Revision: https://phabricator.services.mozilla.com/D222160
We had the same list of attributes in multiple places, put it in
Theme.cpp.
Only a few states can change widget state. Just hardcode them in
RestyleManager.cpp (where there was already some of it) instead of
reusing a weird API.
Shouldn't have any behavior change.
Differential Revision: https://phabricator.services.mozilla.com/D222160
The background image is associate to the table frame, but the table wrapper frame is the primary frame, thus IsPrimaryFrameOfRootOrBodyElement returns false and we don't propagate to the root when we should. So I changed IsPrimaryFrameOfRootOrBodyElement to handle this case and renamed it. I checked the other root element frame types, only table frames had this issue.
Differential Revision: https://phabricator.services.mozilla.com/D217923
This fixes a regression with :has() on the test-case of bug 1480477 (but
we should still aim to make that faster).
While at it, avoid synchronization in some really hot paths, and add
tests.
Differential Revision: https://phabricator.services.mozilla.com/D212039
`PresShell::GetRootScrollFrameAsScrollable()` is equivalent to
`PresShell::GetRootScrollContainerFrame()`.
In ScrollContainerFrame.h, `DecideScrollableLayer()` has two versions, one has
four parameters, and the other has five parameters with the fifth parameter
`aDirtyRectHasBeenOverriden` having a default value `nullptr`. When we switch
the caller from `nsIScrollableFrame` to `ScrollContainerFrame`, we need to
remove the default value for the fifth parameter to avoid ambiguity.
Differential Revision: https://phabricator.services.mozilla.com/D211494
`PresShell::GetRootScrollFrameAsScrollable()` is equivalent to
`PresShell::GetRootScrollContainerFrame()`.
In ScrollContainerFrame.h, `DecideScrollableLayer()` has two versions, one has
four parameters, and the other has five parameters with the fifth parameter
`aDirtyRectHasBeenOverriden` having a default value `nullptr`. When we switch
the caller from `nsIScrollableFrame` to `ScrollContainerFrame`, we need to
remove the default value for the fifth parameter to avoid ambiguity.
Differential Revision: https://phabricator.services.mozilla.com/D211494
Table captions have a similar issue as column spanners, where their
parent might not be the in the subtree of the style frame of its
ancestors. In particular, a repaint posted to a table that
doesn't cause a repaint in the table wrapper might not cause a repaint
of its captions.
Handle table captions like we treat out of flows and spanners, and add
more comments around this set-up.
Differential Revision: https://phabricator.services.mozilla.com/D205504