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-04-14 12:59:57 +0200
commitdba09fa5c43276bb455cc4da6bd0ec302f798189 (patch)
tree577a2e42181433dea37dfd8febd7879dc66136e6 /layout/generic/nsPageFrame.cpp
parentafe2b7fa5a576454d3a9b210c708890727243ede (diff)
downloadUXP-dba09fa5c43276bb455cc4da6bd0ec302f798189.tar
UXP-dba09fa5c43276bb455cc4da6bd0ec302f798189.tar.gz
UXP-dba09fa5c43276bb455cc4da6bd0ec302f798189.tar.lz
UXP-dba09fa5c43276bb455cc4da6bd0ec302f798189.tar.xz
UXP-dba09fa5c43276bb455cc4da6bd0ec302f798189.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