diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 299463123840..4ea909b94104 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -450,7 +450,7 @@ nsBlockFrame::GetFrameName(nsAString& aResult) const #endif void -nsBlockFrame::InvalidateFrame(uint32_t aDisplayItemKey) +nsBlockFrame::InvalidateFrame(uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { if (nsSVGUtils::IsInSVGTextSubtree(this)) { NS_ASSERTION(GetParent()->IsSVGTextFrame(), @@ -458,11 +458,11 @@ nsBlockFrame::InvalidateFrame(uint32_t aDisplayItemKey) GetParent()->InvalidateFrame(); return; } - nsContainerFrame::InvalidateFrame(aDisplayItemKey); + nsContainerFrame::InvalidateFrame(aDisplayItemKey, aRebuildDisplayItems); } void -nsBlockFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey) +nsBlockFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { if (nsSVGUtils::IsInSVGTextSubtree(this)) { NS_ASSERTION(GetParent()->IsSVGTextFrame(), @@ -470,7 +470,7 @@ nsBlockFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItem GetParent()->InvalidateFrame(); return; } - nsContainerFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey); + nsContainerFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey, aRebuildDisplayItems); } nscoord diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h index 2b498f01815e..ce4ef105deb4 100644 --- a/layout/generic/nsBlockFrame.h +++ b/layout/generic/nsBlockFrame.h @@ -148,8 +148,8 @@ public: nsIFrame::eBlockFrame)); } - void InvalidateFrame(uint32_t aDisplayItemKey = 0) override; - void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) override; + void InvalidateFrame(uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; + void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; #ifdef DEBUG_FRAME_DUMP void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const override; diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 9993872546de..079bf387bed5 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -7037,13 +7037,15 @@ SchedulePaintInternal(nsIFrame* aDisplayRoot, nsIFrame* aFrame, } } -static void InvalidateFrameInternal(nsIFrame *aFrame, bool aHasDisplayItem = true) +static void InvalidateFrameInternal(nsIFrame *aFrame, bool aHasDisplayItem, bool aRebuildDisplayItems) { if (aHasDisplayItem) { aFrame->AddStateBits(NS_FRAME_NEEDS_PAINT); } - aFrame->MarkNeedsDisplayItemRebuild(); + if (aRebuildDisplayItems) { + aFrame->MarkNeedsDisplayItemRebuild(); + } SVGObserverUtils::InvalidateDirectRenderingObservers(aFrame); bool needsSchedulePaint = false; if (nsLayoutUtils::IsPopup(aFrame)) { @@ -7083,13 +7085,11 @@ static void InvalidateFrameInternal(nsIFrame *aFrame, bool aHasDisplayItem = tru } void -nsIFrame::InvalidateFrameSubtree(uint32_t aDisplayItemKey) +nsIFrame::InvalidateFrameSubtree(bool aRebuildDisplayItems /* = true */) { - bool hasDisplayItem = - !aDisplayItemKey || FrameLayerBuilder::HasRetainedDataFor(this, aDisplayItemKey); - InvalidateFrame(aDisplayItemKey); + InvalidateFrame(0, aRebuildDisplayItems); - if (HasAnyStateBits(NS_FRAME_ALL_DESCENDANTS_NEED_PAINT) || !hasDisplayItem) { + if (HasAnyStateBits(NS_FRAME_ALL_DESCENDANTS_NEED_PAINT)) { return; } @@ -7102,7 +7102,10 @@ nsIFrame::InvalidateFrameSubtree(uint32_t aDisplayItemKey) for (; !lists.IsDone(); lists.Next()) { nsFrameList::Enumerator childFrames(lists.CurrentList()); for (; !childFrames.AtEnd(); childFrames.Next()) { - childFrames.get()->InvalidateFrameSubtree(); + // Don't explicitly rebuild display items for our descendants, + // since we should be marked and it implicitly includes all + // descendants. + childFrames.get()->InvalidateFrameSubtree(false); } } } @@ -7129,21 +7132,21 @@ nsIFrame::ClearInvalidationStateBits() } void -nsIFrame::InvalidateFrame(uint32_t aDisplayItemKey) +nsIFrame::InvalidateFrame(uint32_t aDisplayItemKey, bool aRebuildDisplayItems /* = true */) { bool hasDisplayItem = !aDisplayItemKey || FrameLayerBuilder::HasRetainedDataFor(this, aDisplayItemKey); - InvalidateFrameInternal(this, hasDisplayItem); + InvalidateFrameInternal(this, hasDisplayItem, aRebuildDisplayItems); } void -nsIFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey) +nsIFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey, bool aRebuildDisplayItems /* = true */) { bool hasDisplayItem = !aDisplayItemKey || FrameLayerBuilder::HasRetainedDataFor(this, aDisplayItemKey); bool alreadyInvalid = false; if (!HasAnyStateBits(NS_FRAME_NEEDS_PAINT)) { - InvalidateFrameInternal(this, hasDisplayItem); + InvalidateFrameInternal(this, hasDisplayItem, aRebuildDisplayItems); } else { alreadyInvalid = true; } diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index d0dea10b2484..4aafaaf17ee4 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -2944,8 +2944,12 @@ public: * @param aDisplayItemKey If specified, only issues an invalidate * if this frame painted a display item of that type during the * previous paint. SVG rendering observers are always notified. + * @param aRebuildDisplayItems If true, then adds this frame to the + * list of modified frames for display list building. Only pass false + * if you're sure that the relevant display items will be rebuilt + * already (possibly by an ancestor being in the modified list). */ - virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0); + virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true); /** * Same as InvalidateFrame(), but only mark a fixed rect as needing @@ -2956,8 +2960,12 @@ public: * @param aDisplayItemKey If specified, only issues an invalidate * if this frame painted a display item of that type during the * previous paint. SVG rendering observers are always notified. + * @param aRebuildDisplayItems If true, then adds this frame to the + * list of modified frames for display list building. Only pass false + * if you're sure that the relevant display items will be rebuilt + * already (possibly by an ancestor being in the modified list). */ - virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0); + virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true); /** * Calls InvalidateFrame() on all frames descendant frames (including @@ -2966,11 +2974,12 @@ public: * This function doesn't walk through placeholder frames to invalidate * the out-of-flow frames. * - * @param aDisplayItemKey If specified, only issues an invalidate - * if this frame painted a display item of that type during the - * previous paint. SVG rendering observers are always notified. + * @param aRebuildDisplayItems If true, then adds this frame to the + * list of modified frames for display list building. Only pass false + * if you're sure that the relevant display items will be rebuilt + * already (possibly by an ancestor being in the modified list). */ - void InvalidateFrameSubtree(uint32_t aDisplayItemKey = 0); + void InvalidateFrameSubtree(bool aRebuildDisplayItems = true); /** * Called when a frame is about to be removed and needs to be invalidated. diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp index 5eafc7d83ad4..f569624128c7 100644 --- a/layout/generic/nsInlineFrame.cpp +++ b/layout/generic/nsInlineFrame.cpp @@ -57,7 +57,7 @@ nsInlineFrame::GetFrameName(nsAString& aResult) const #endif void -nsInlineFrame::InvalidateFrame(uint32_t aDisplayItemKey) +nsInlineFrame::InvalidateFrame(uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { if (nsSVGUtils::IsInSVGTextSubtree(this)) { nsIFrame* svgTextFrame = nsLayoutUtils::GetClosestFrameOfType( @@ -65,11 +65,11 @@ nsInlineFrame::InvalidateFrame(uint32_t aDisplayItemKey) svgTextFrame->InvalidateFrame(); return; } - nsContainerFrame::InvalidateFrame(aDisplayItemKey); + nsContainerFrame::InvalidateFrame(aDisplayItemKey, aRebuildDisplayItems); } void -nsInlineFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey) +nsInlineFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { if (nsSVGUtils::IsInSVGTextSubtree(this)) { nsIFrame* svgTextFrame = nsLayoutUtils::GetClosestFrameOfType( @@ -77,7 +77,7 @@ nsInlineFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayIte svgTextFrame->InvalidateFrame(); return; } - nsContainerFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey); + nsContainerFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey, aRebuildDisplayItems); } static inline bool diff --git a/layout/generic/nsInlineFrame.h b/layout/generic/nsInlineFrame.h index a408226e6077..9a64d4655bef 100644 --- a/layout/generic/nsInlineFrame.h +++ b/layout/generic/nsInlineFrame.h @@ -50,8 +50,8 @@ public: ~(nsIFrame::eBidiInlineContainer | nsIFrame::eLineParticipant)); } - virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) override; - virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) override; + virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; + virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; virtual bool IsEmpty() override; virtual bool IsSelfEmpty() override; diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index 7d3f5167d614..7791bde74620 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -4685,7 +4685,7 @@ nsTextFrame::LastContinuation() const } void -nsTextFrame::InvalidateFrame(uint32_t aDisplayItemKey) +nsTextFrame::InvalidateFrame(uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { if (nsSVGUtils::IsInSVGTextSubtree(this)) { nsIFrame* svgTextFrame = nsLayoutUtils::GetClosestFrameOfType( @@ -4693,11 +4693,11 @@ nsTextFrame::InvalidateFrame(uint32_t aDisplayItemKey) svgTextFrame->InvalidateFrame(); return; } - nsFrame::InvalidateFrame(aDisplayItemKey); + nsFrame::InvalidateFrame(aDisplayItemKey, aRebuildDisplayItems); } void -nsTextFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey) +nsTextFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { if (nsSVGUtils::IsInSVGTextSubtree(this)) { nsIFrame* svgTextFrame = nsLayoutUtils::GetClosestFrameOfType( @@ -4705,7 +4705,7 @@ nsTextFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemK svgTextFrame->InvalidateFrame(); return; } - nsFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey); + nsFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey, aRebuildDisplayItems); } gfxTextRun* diff --git a/layout/generic/nsTextFrame.h b/layout/generic/nsTextFrame.h index 3eee5bd12f51..5f334480fe14 100644 --- a/layout/generic/nsTextFrame.h +++ b/layout/generic/nsTextFrame.h @@ -160,9 +160,10 @@ public: return Style()->ShouldSuppressLineBreak(); } - void InvalidateFrame(uint32_t aDisplayItemKey = 0) override; + void InvalidateFrame(uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; void InvalidateFrameWithRect(const nsRect& aRect, - uint32_t aDisplayItemKey = 0) override; + uint32_t aDisplayItemKey = 0, + bool aRebuildDisplayItems = true) override; #ifdef DEBUG_FRAME_DUMP void List(FILE* out = stderr, diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index 2e4805adaa05..d8bab9e53436 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -438,21 +438,21 @@ nsDisplayTableCellBackground::GetBounds(nsDisplayListBuilder* aBuilder, return nsDisplayItem::GetBounds(aBuilder, aSnap); } -void nsTableCellFrame::InvalidateFrame(uint32_t aDisplayItemKey) +void nsTableCellFrame::InvalidateFrame(uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { - nsIFrame::InvalidateFrame(aDisplayItemKey); + nsIFrame::InvalidateFrame(aDisplayItemKey, aRebuildDisplayItems); if (GetTableFrame()->IsBorderCollapse() && StyleBorder()->HasBorder()) { - GetParent()->InvalidateFrameWithRect(GetVisualOverflowRect() + GetPosition(), aDisplayItemKey); + GetParent()->InvalidateFrameWithRect(GetVisualOverflowRect() + GetPosition(), aDisplayItemKey, false); } } -void nsTableCellFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey) +void nsTableCellFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { - nsIFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey); + nsIFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey, aRebuildDisplayItems); // If we have filters applied that would affects our bounds, then // we get an inactive layer created and this is computed // within FrameLayerBuilder - GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey); + GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey, false); } bool diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h index defc9ea6a4a3..abd81235fa52 100644 --- a/layout/tables/nsTableCellFrame.h +++ b/layout/tables/nsTableCellFrame.h @@ -240,8 +240,8 @@ public: return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart)); } - virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) override; - virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) override; + virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; + virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; virtual void InvalidateFrameForRemoval() override { InvalidateFrameSubtree(); } bool ShouldPaintBordersAndBackgrounds() const; diff --git a/layout/tables/nsTableColFrame.cpp b/layout/tables/nsTableColFrame.cpp index 9c5da8fe41f8..8cd2f08759c0 100644 --- a/layout/tables/nsTableColFrame.cpp +++ b/layout/tables/nsTableColFrame.cpp @@ -209,22 +209,22 @@ nsTableColFrame::GetSplittableType() const } void -nsTableColFrame::InvalidateFrame(uint32_t aDisplayItemKey) +nsTableColFrame::InvalidateFrame(uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { - nsIFrame::InvalidateFrame(aDisplayItemKey); + nsIFrame::InvalidateFrame(aDisplayItemKey, aRebuildDisplayItems); if (GetTableFrame()->IsBorderCollapse() && StyleBorder()->HasBorder()) { - GetParent()->InvalidateFrameWithRect(GetVisualOverflowRect() + GetPosition(), aDisplayItemKey); + GetParent()->InvalidateFrameWithRect(GetVisualOverflowRect() + GetPosition(), aDisplayItemKey, false); } } void -nsTableColFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey) +nsTableColFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { - nsIFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey); + nsIFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey, aRebuildDisplayItems); // If we have filters applied that would affects our bounds, then // we get an inactive layer created and this is computed // within FrameLayerBuilder - GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey); + GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey, false); } diff --git a/layout/tables/nsTableColFrame.h b/layout/tables/nsTableColFrame.h index f4034e91377b..d8c891999498 100644 --- a/layout/tables/nsTableColFrame.h +++ b/layout/tables/nsTableColFrame.h @@ -277,8 +277,8 @@ public: return nsSplittableFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart)); } - virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) override; - virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) override; + virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; + virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; virtual void InvalidateFrameForRemoval() override { InvalidateFrameSubtree(); } protected: diff --git a/layout/tables/nsTableColGroupFrame.cpp b/layout/tables/nsTableColGroupFrame.cpp index 8b74fe814221..128f265c7aad 100644 --- a/layout/tables/nsTableColGroupFrame.cpp +++ b/layout/tables/nsTableColGroupFrame.cpp @@ -449,23 +449,24 @@ NS_NewTableColGroupFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle) NS_IMPL_FRAMEARENA_HELPERS(nsTableColGroupFrame) void -nsTableColGroupFrame::InvalidateFrame(uint32_t aDisplayItemKey) +nsTableColGroupFrame::InvalidateFrame(uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { - nsIFrame::InvalidateFrame(aDisplayItemKey); + nsIFrame::InvalidateFrame(aDisplayItemKey, aRebuildDisplayItems); if (GetTableFrame()->IsBorderCollapse() && StyleBorder()->HasBorder()) { - GetParent()->InvalidateFrameWithRect(GetVisualOverflowRect() + GetPosition(), aDisplayItemKey); + GetParent()->InvalidateFrameWithRect(GetVisualOverflowRect() + GetPosition(), aDisplayItemKey, false); } } void nsTableColGroupFrame::InvalidateFrameWithRect(const nsRect& aRect, - uint32_t aDisplayItemKey) + uint32_t aDisplayItemKey, + bool aRebuildDisplayItems) { - nsIFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey); + nsIFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey, aRebuildDisplayItems); // If we have filters applied that would affects our bounds, then // we get an inactive layer created and this is computed // within FrameLayerBuilder - GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey); + GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey, false); } #ifdef DEBUG_FRAME_DUMP diff --git a/layout/tables/nsTableColGroupFrame.h b/layout/tables/nsTableColGroupFrame.h index 044c4aca166e..7c07dbb052c0 100644 --- a/layout/tables/nsTableColGroupFrame.h +++ b/layout/tables/nsTableColGroupFrame.h @@ -198,8 +198,8 @@ public: return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart)); } - virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) override; - virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) override; + virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; + virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; virtual void InvalidateFrameForRemoval() override { InvalidateFrameSubtree(); } protected: diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index eb61712266c3..33e0feeec8b6 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -1441,22 +1441,22 @@ void nsTableRowFrame::InitHasCellWithStyleBSize(nsTableFrame* aTableFrame) } void -nsTableRowFrame::InvalidateFrame(uint32_t aDisplayItemKey) +nsTableRowFrame::InvalidateFrame(uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { - nsIFrame::InvalidateFrame(aDisplayItemKey); + nsIFrame::InvalidateFrame(aDisplayItemKey, aRebuildDisplayItems); if (GetTableFrame()->IsBorderCollapse() && StyleBorder()->HasBorder()) { - GetParent()->InvalidateFrameWithRect(GetVisualOverflowRect() + GetPosition(), aDisplayItemKey); + GetParent()->InvalidateFrameWithRect(GetVisualOverflowRect() + GetPosition(), aDisplayItemKey, false); } } void -nsTableRowFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey) +nsTableRowFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { - nsIFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey); + nsIFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey, aRebuildDisplayItems); // If we have filters applied that would affects our bounds, then // we get an inactive layer created and this is computed // within FrameLayerBuilder - GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey); + GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey, false); } /* ----- global methods ----- */ diff --git a/layout/tables/nsTableRowFrame.h b/layout/tables/nsTableRowFrame.h index 0b3cf763c959..2a4aa2ed0e1b 100644 --- a/layout/tables/nsTableRowFrame.h +++ b/layout/tables/nsTableRowFrame.h @@ -242,8 +242,8 @@ public: return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart)); } - virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) override; - virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) override; + virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; + virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; virtual void InvalidateFrameForRemoval() override { InvalidateFrameSubtree(); } #ifdef ACCESSIBILITY diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index 12f544c615bb..421d286476f8 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -1989,20 +1989,20 @@ nsTableRowGroupFrame::FrameCursorData::AppendFrame(nsIFrame* aFrame) } void -nsTableRowGroupFrame::InvalidateFrame(uint32_t aDisplayItemKey) +nsTableRowGroupFrame::InvalidateFrame(uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { - nsIFrame::InvalidateFrame(aDisplayItemKey); + nsIFrame::InvalidateFrame(aDisplayItemKey, aRebuildDisplayItems); if (GetTableFrame()->IsBorderCollapse() && StyleBorder()->HasBorder()) { - GetParent()->InvalidateFrameWithRect(GetVisualOverflowRect() + GetPosition(), aDisplayItemKey); + GetParent()->InvalidateFrameWithRect(GetVisualOverflowRect() + GetPosition(), aDisplayItemKey, false); } } void -nsTableRowGroupFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey) +nsTableRowGroupFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey, bool aRebuildDisplayItems) { - nsIFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey); + nsIFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey, aRebuildDisplayItems); // If we have filters applied that would affects our bounds, then // we get an inactive layer created and this is computed // within FrameLayerBuilder - GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey); + GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey, false); } diff --git a/layout/tables/nsTableRowGroupFrame.h b/layout/tables/nsTableRowGroupFrame.h index e6811af227b0..96f2dc208517 100644 --- a/layout/tables/nsTableRowGroupFrame.h +++ b/layout/tables/nsTableRowGroupFrame.h @@ -328,8 +328,8 @@ public: return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart)); } - virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) override; - virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) override; + virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; + virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0, bool aRebuildDisplayItems = true) override; virtual void InvalidateFrameForRemoval() override { InvalidateFrameSubtree(); } protected: