diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
commit | def92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch) | |
tree | 2ef34b9ad8bb9a9220e05d60352558b15f513894 /layout/base/RestyleManager.h | |
parent | Adding debian version 125.0.3-1. (diff) | |
download | firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/base/RestyleManager.h')
-rw-r--r-- | layout/base/RestyleManager.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/layout/base/RestyleManager.h b/layout/base/RestyleManager.h index 62fef15a16..8485fe18a0 100644 --- a/layout/base/RestyleManager.h +++ b/layout/base/RestyleManager.h @@ -66,13 +66,11 @@ class ServoRestyleState { // our children too if we're out of flow since they aren't necessarily // parented in DOM order, and thus a change handled by a DOM ancestor doesn't // necessarily mean that it's handled for an ancestor frame. - enum class Type { - InFlow, - OutOfFlow, - }; + enum class CanUseHandledHints : bool { No = false, Yes }; ServoRestyleState(const nsIFrame& aOwner, ServoRestyleState& aParentState, - nsChangeHint aHintForThisFrame, Type aType, + nsChangeHint aHintForThisFrame, + CanUseHandledHints aCanUseHandledHints, bool aAssertWrapperRestyleLength = true) : mStyleSet(aParentState.mStyleSet), mChangeList(aParentState.mChangeList), @@ -81,7 +79,7 @@ class ServoRestyleState { aParentState.mPendingScrollAnchorSuppressions), mPendingWrapperRestyleOffset( aParentState.mPendingWrapperRestyles.Length()), - mChangesHandled(aType == Type::InFlow + mChangesHandled(bool(aCanUseHandledHints) ? aParentState.mChangesHandled | aHintForThisFrame : aHintForThisFrame) #ifdef DEBUG @@ -90,7 +88,7 @@ class ServoRestyleState { mAssertWrapperRestyleLength(aAssertWrapperRestyleLength) #endif { - if (aType == Type::InFlow) { + if (bool(aCanUseHandledHints)) { AssertOwner(aParentState); } } @@ -361,6 +359,11 @@ class RestyleManager { void ElementStateChanged(Element*, dom::ElementState); + void CustomStatesWillChange(Element&); + void CustomStateChanged(Element&, nsAtom* aState); + void MaybeRestyleForNthOfCustomState(ServoStyleSet&, Element&, + nsAtom* aState); + /** * Posts restyle hints for siblings of an element and their descendants if the * element's parent has NODE_HAS_SLOW_SELECTOR_NTH_OF and the element has a |