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
This commit is contained in:
win7-7 2020-05-08 15:20:01 +03:00 committed by Roy Tam
commit 85b85bac28
154 changed files with 259 additions and 430 deletions

View file

@ -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