summaryrefslogtreecommitdiffstats
path: root/layout/generic/nsPageFrame.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-02-26 20:51:22 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-02-26 20:51:22 +0100
commit793da7dd6238ce156e29c71304e24b2c05edc11d (patch)
tree89aaa5542c8930a139a76d6b82959d70500556e5 /layout/generic/nsPageFrame.cpp
parent16abf27e653d0a845abeb542d611984a629160d2 (diff)
downloadUXP-793da7dd6238ce156e29c71304e24b2c05edc11d.tar
UXP-793da7dd6238ce156e29c71304e24b2c05edc11d.tar.gz
UXP-793da7dd6238ce156e29c71304e24b2c05edc11d.tar.lz
UXP-793da7dd6238ce156e29c71304e24b2c05edc11d.tar.xz
UXP-793da7dd6238ce156e29c71304e24b2c05edc11d.zip
Revert "Issue #1355 - Better way to create display items for column backgrounds"
This reverts commit 44c47c50388f526c2d134e16d5debebe94a0faf8.
Diffstat (limited to 'layout/generic/nsPageFrame.cpp')
-rw-r--r--layout/generic/nsPageFrame.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/layout/generic/nsPageFrame.cpp b/layout/generic/nsPageFrame.cpp
index 7ec90c051..ae3af6ef7 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,
- nsDisplayList* aList)
+ const nsRect& aDirtyRect, 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, &list);
+ aExtraPage->BuildDisplayListForStackingContext(aBuilder, aDirtyRect, &list);
PruneDisplayListForExtraPage(aBuilder, aPage, aExtraPage, &list);
aList->AppendToTop(&list);
}
@@ -517,9 +517,10 @@ protected:
//------------------------------------------------------------------------------
void
nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- nsDisplayListCollection set(aBuilder);
+ nsDisplayListCollection set;
if (PresContext()->IsScreen()) {
DisplayBorderBackgroundOutline(aBuilder, aLists);
@@ -556,11 +557,8 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
clipState.Clear();
clipState.ClipContainingBlockDescendants(clipRect, nullptr);
- nsRect visibleRect = child->GetVisualOverflowRectRelativeToSelf();
- nsDisplayListBuilder::AutoBuildingDisplayList
- buildingForChild(aBuilder, child, visibleRect, visibleRect,
- aBuilder->IsAtRootOfPseudoStackingContext());
- child->BuildDisplayListForStackingContext(aBuilder, &content);
+ nsRect dirtyRect = child->GetVisualOverflowRectRelativeToSelf();
+ child->BuildDisplayListForStackingContext(aBuilder, dirtyRect, &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
@@ -571,19 +569,15 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// following placeholders to their out-of-flows) end up on the list.
nsIFrame* page = child;
while ((page = GetNextPage(page)) != nullptr) {
- nsRect childVisible = visibleRect + child->GetOffsetTo(page);
-
- nsDisplayListBuilder::AutoBuildingDisplayList
- buildingForChild(aBuilder, page, childVisible, childVisible,
- aBuilder->IsAtRootOfPseudoStackingContext());
- BuildDisplayListForExtraPage(aBuilder, this, page, &content);
+ BuildDisplayListForExtraPage(aBuilder, this, page,
+ dirtyRect + child->GetOffsetTo(page), &content);
}
- // Invoke AutoBuildingDisplayList to ensure that the correct visibleRect
+ // Invoke AutoBuildingDisplayList to ensure that the correct dirtyRect
// is used to compute the visible rect if AddCanvasBackgroundColorItem
// creates a display item.
nsDisplayListBuilder::AutoBuildingDisplayList
- building(aBuilder, child, visibleRect, visibleRect, true);
+ building(aBuilder, child, dirtyRect, true);
// Add the canvas background color to the bottom of the list. This
// happens after we've built the list so that AddCanvasBackgroundColorItem