From 71137783ac6927bd0dc02fce1d6e61e6ec027753 Mon Sep 17 00:00:00 2001 From: win7-7 Date: Fri, 8 May 2020 15:20:01 +0300 Subject: Issue #1355 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList Also fix build bustage for De-unified layout/xul in nsRootBoxFrame.cpp --- layout/generic/nsPageFrame.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'layout/generic/nsPageFrame.cpp') diff --git a/layout/generic/nsPageFrame.cpp b/layout/generic/nsPageFrame.cpp index ae3af6ef7..473d3a21d 100644 --- a/layout/generic/nsPageFrame.cpp +++ b/layout/generic/nsPageFrame.cpp @@ -437,7 +437,7 @@ PruneDisplayListForExtraPage(nsDisplayListBuilder* aBuilder, static void BuildDisplayListForExtraPage(nsDisplayListBuilder* aBuilder, nsPageFrame* aPage, nsIFrame* aExtraPage, - const nsRect& aDirtyRect, nsDisplayList* aList) + nsDisplayList* aList) { // The only content in aExtraPage we care about is out-of-flow content whose // placeholders have occurred in aPage. If @@ -447,7 +447,7 @@ BuildDisplayListForExtraPage(nsDisplayListBuilder* aBuilder, return; } nsDisplayList list; - aExtraPage->BuildDisplayListForStackingContext(aBuilder, aDirtyRect, &list); + aExtraPage->BuildDisplayListForStackingContext(aBuilder, &list); PruneDisplayListForExtraPage(aBuilder, aPage, aExtraPage, &list); aList->AppendToTop(&list); } @@ -517,7 +517,6 @@ protected: //------------------------------------------------------------------------------ void nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { nsDisplayListCollection set; @@ -558,7 +557,10 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, clipState.ClipContainingBlockDescendants(clipRect, nullptr); nsRect dirtyRect = child->GetVisualOverflowRectRelativeToSelf(); - child->BuildDisplayListForStackingContext(aBuilder, dirtyRect, &content); + nsDisplayListBuilder::AutoBuildingDisplayList + buildingForChild(aBuilder, child, dirtyRect, + aBuilder->IsAtRootOfPseudoStackingContext()); + child->BuildDisplayListForStackingContext(aBuilder, &content); // We may need to paint out-of-flow frames whose placeholders are // on other pages. Add those pages to our display list. Note that @@ -569,8 +571,12 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, // following placeholders to their out-of-flows) end up on the list. nsIFrame* page = child; while ((page = GetNextPage(page)) != nullptr) { - BuildDisplayListForExtraPage(aBuilder, this, page, - dirtyRect + child->GetOffsetTo(page), &content); + nsRect childDirty = dirtyRect + child->GetOffsetTo(page); + + nsDisplayListBuilder::AutoBuildingDisplayList + buildingForChild(aBuilder, page, childDirty, + aBuilder->IsAtRootOfPseudoStackingContext()); + BuildDisplayListForExtraPage(aBuilder, this, page, &content); } // Invoke AutoBuildingDisplayList to ensure that the correct dirtyRect -- cgit v1.2.3