From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- layout/painting/nsDisplayList.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'layout/painting/nsDisplayList.h') diff --git a/layout/painting/nsDisplayList.h b/layout/painting/nsDisplayList.h index cf4eb1dd16..5064677cc7 100644 --- a/layout/painting/nsDisplayList.h +++ b/layout/painting/nsDisplayList.h @@ -457,7 +457,10 @@ class nsDisplayListBuilder { * a displayport, and for scroll handoff to work properly the ancestor * scrollframes should also get their own scrollable layers. */ - void ForceLayerForScrollParent() { mForceLayerForScrollParent = true; } + void ForceLayerForScrollParent(); + uint32_t GetNumActiveScrollframesEncountered() const { + return mNumActiveScrollframesEncountered; + } /** * Set the flag that indicates there is a non-minimal display port in the * current subtree. This is used to determine display port expiry. @@ -1848,6 +1851,8 @@ class nsDisplayListBuilder { nsDisplayListBuilderMode mMode; static uint32_t sPaintSequenceNumber; + uint32_t mNumActiveScrollframesEncountered = 0; + bool mContainsBlendMode; bool mIsBuildingScrollbar; bool mCurrentScrollbarWillHaveLayer; @@ -3570,7 +3575,7 @@ class RetainedDisplayList : public nsDisplayList { for (OldItemInfo& i : mOldItems) { if (i.mItem && i.mOwnsItem) { i.mItem->Destroy(aBuilder); - MOZ_ASSERT(!GetBottom(), + MOZ_ASSERT(!GetBottom() || aBuilder->PartialBuildFailed(), "mOldItems should not be owning items if we also have items " "in the normal list"); } @@ -6414,6 +6419,12 @@ class nsDisplayTransform : public nsPaintedDisplayItem { bool CreatesStackingContextHelper() override { return true; } + void SetContainsASRs(bool aContainsASRs) { mContainsASRs = aContainsASRs; } + bool GetContainsASRs() const { return mContainsASRs; } + bool ShouldDeferTransform() const { + return !mFrame->ChildrenHavePerspective() && !mContainsASRs; + } + private: void ComputeBounds(nsDisplayListBuilder* aBuilder); nsRect TransformUntransformedBounds(nsDisplayListBuilder* aBuilder, @@ -6459,6 +6470,7 @@ class nsDisplayTransform : public nsPaintedDisplayItem { // True if this item is created together with `nsDisplayPerspective` // from the same CSS stacking context. bool mHasAssociatedPerspective : 1; + bool mContainsASRs : 1; }; /* A display item that applies a perspective transformation to a single -- cgit v1.2.3