summaryrefslogtreecommitdiffstats
path: root/layout/generic/nsPageFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/generic/nsPageFrame.cpp')
-rw-r--r--layout/generic/nsPageFrame.cpp18
1 files changed, 12 insertions, 6 deletions
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