summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
authorwin7-7 <win7-7@users.noreply.github.com>2020-05-08 15:20:01 +0300
committerMoonchild <moonchild@palemoon.org>2020-05-20 13:48:52 +0000
commit71137783ac6927bd0dc02fce1d6e61e6ec027753 (patch)
treedd21b7bca3f68759de3f0bc96ef465ce0a13c83f /layout
parentfe0963002fb16b7e3e53f75004af0e79348c861c (diff)
downloadUXP-71137783ac6927bd0dc02fce1d6e61e6ec027753.tar
UXP-71137783ac6927bd0dc02fce1d6e61e6ec027753.tar.gz
UXP-71137783ac6927bd0dc02fce1d6e61e6ec027753.tar.lz
UXP-71137783ac6927bd0dc02fce1d6e61e6ec027753.tar.xz
UXP-71137783ac6927bd0dc02fce1d6e61e6ec027753.zip
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
Diffstat (limited to 'layout')
-rw-r--r--layout/base/nsDisplayList.cpp16
-rw-r--r--layout/base/nsDisplayList.h25
-rw-r--r--layout/base/nsLayoutUtils.cpp6
-rw-r--r--layout/base/nsPresShell.cpp4
-rw-r--r--layout/forms/nsComboboxControlFrame.cpp11
-rw-r--r--layout/forms/nsComboboxControlFrame.h1
-rw-r--r--layout/forms/nsFieldSetFrame.cpp7
-rw-r--r--layout/forms/nsFieldSetFrame.h1
-rw-r--r--layout/forms/nsFileControlFrame.cpp3
-rw-r--r--layout/forms/nsFileControlFrame.h1
-rw-r--r--layout/forms/nsFormControlFrame.h1
-rw-r--r--layout/forms/nsGfxCheckboxControlFrame.cpp3
-rw-r--r--layout/forms/nsGfxCheckboxControlFrame.h1
-rw-r--r--layout/forms/nsGfxRadioControlFrame.cpp3
-rw-r--r--layout/forms/nsGfxRadioControlFrame.h1
-rw-r--r--layout/forms/nsHTMLButtonControlFrame.cpp3
-rw-r--r--layout/forms/nsHTMLButtonControlFrame.h1
-rw-r--r--layout/forms/nsListControlFrame.cpp3
-rw-r--r--layout/forms/nsListControlFrame.h1
-rw-r--r--layout/forms/nsProgressFrame.cpp3
-rw-r--r--layout/forms/nsProgressFrame.h1
-rw-r--r--layout/forms/nsRangeFrame.cpp5
-rw-r--r--layout/forms/nsRangeFrame.h1
-rw-r--r--layout/forms/nsSelectsAreaFrame.cpp8
-rw-r--r--layout/forms/nsSelectsAreaFrame.h2
-rw-r--r--layout/forms/nsTextControlFrame.cpp3
-rw-r--r--layout/forms/nsTextControlFrame.h1
-rw-r--r--layout/generic/nsBackdropFrame.cpp1
-rw-r--r--layout/generic/nsBackdropFrame.h1
-rw-r--r--layout/generic/nsBlockFrame.cpp27
-rw-r--r--layout/generic/nsBlockFrame.h1
-rw-r--r--layout/generic/nsBulletFrame.cpp1
-rw-r--r--layout/generic/nsBulletFrame.h1
-rw-r--r--layout/generic/nsCanvasFrame.cpp7
-rw-r--r--layout/generic/nsCanvasFrame.h1
-rw-r--r--layout/generic/nsColumnSetFrame.cpp3
-rw-r--r--layout/generic/nsColumnSetFrame.h1
-rw-r--r--layout/generic/nsContainerFrame.cpp9
-rw-r--r--layout/generic/nsContainerFrame.h7
-rw-r--r--layout/generic/nsFirstLetterFrame.cpp3
-rw-r--r--layout/generic/nsFirstLetterFrame.h1
-rw-r--r--layout/generic/nsFlexContainerFrame.cpp3
-rw-r--r--layout/generic/nsFlexContainerFrame.h1
-rw-r--r--layout/generic/nsFrame.cpp65
-rw-r--r--layout/generic/nsFrameSetFrame.cpp7
-rw-r--r--layout/generic/nsFrameSetFrame.h1
-rw-r--r--layout/generic/nsGfxScrollFrame.cpp58
-rw-r--r--layout/generic/nsGfxScrollFrame.h8
-rw-r--r--layout/generic/nsGridContainerFrame.cpp6
-rw-r--r--layout/generic/nsGridContainerFrame.h1
-rw-r--r--layout/generic/nsHTMLCanvasFrame.cpp1
-rw-r--r--layout/generic/nsHTMLCanvasFrame.h1
-rw-r--r--layout/generic/nsIFrame.h13
-rw-r--r--layout/generic/nsImageFrame.cpp1
-rw-r--r--layout/generic/nsImageFrame.h1
-rw-r--r--layout/generic/nsInlineFrame.cpp3
-rw-r--r--layout/generic/nsInlineFrame.h1
-rw-r--r--layout/generic/nsLeafFrame.h1
-rw-r--r--layout/generic/nsPageFrame.cpp18
-rw-r--r--layout/generic/nsPageFrame.h1
-rw-r--r--layout/generic/nsPlaceholderFrame.cpp1
-rw-r--r--layout/generic/nsPlaceholderFrame.h1
-rw-r--r--layout/generic/nsPluginFrame.cpp1
-rw-r--r--layout/generic/nsPluginFrame.h1
-rw-r--r--layout/generic/nsRubyTextFrame.cpp3
-rw-r--r--layout/generic/nsRubyTextFrame.h1
-rw-r--r--layout/generic/nsSimplePageSequenceFrame.cpp10
-rw-r--r--layout/generic/nsSimplePageSequenceFrame.h1
-rw-r--r--layout/generic/nsSubDocumentFrame.cpp32
-rw-r--r--layout/generic/nsSubDocumentFrame.h1
-rw-r--r--layout/generic/nsTextFrame.cpp1
-rw-r--r--layout/generic/nsTextFrame.h1
-rw-r--r--layout/generic/nsVideoFrame.cpp18
-rw-r--r--layout/generic/nsVideoFrame.h1
-rw-r--r--layout/generic/nsViewportFrame.cpp9
-rw-r--r--layout/generic/nsViewportFrame.h1
-rw-r--r--layout/ipc/RenderFrameParent.cpp1
-rw-r--r--layout/ipc/RenderFrameParent.h1
-rw-r--r--layout/mathml/nsMathMLContainerFrame.cpp4
-rw-r--r--layout/mathml/nsMathMLContainerFrame.h1
-rw-r--r--layout/mathml/nsMathMLSelectedFrame.cpp5
-rw-r--r--layout/mathml/nsMathMLSelectedFrame.h1
-rw-r--r--layout/mathml/nsMathMLmencloseFrame.cpp3
-rw-r--r--layout/mathml/nsMathMLmencloseFrame.h1
-rw-r--r--layout/mathml/nsMathMLmfencedFrame.cpp3
-rw-r--r--layout/mathml/nsMathMLmfencedFrame.h1
-rw-r--r--layout/mathml/nsMathMLmfracFrame.cpp3
-rw-r--r--layout/mathml/nsMathMLmfracFrame.h1
-rw-r--r--layout/mathml/nsMathMLmoFrame.cpp3
-rw-r--r--layout/mathml/nsMathMLmoFrame.h1
-rw-r--r--layout/mathml/nsMathMLmrootFrame.cpp3
-rw-r--r--layout/mathml/nsMathMLmrootFrame.h1
-rw-r--r--layout/svg/SVGFEUnstyledLeafFrame.cpp1
-rw-r--r--layout/svg/SVGTextFrame.cpp1
-rw-r--r--layout/svg/SVGTextFrame.h1
-rw-r--r--layout/svg/nsSVGClipPathFrame.h1
-rw-r--r--layout/svg/nsSVGContainerFrame.cpp3
-rw-r--r--layout/svg/nsSVGContainerFrame.h2
-rw-r--r--layout/svg/nsSVGFilterFrame.h1
-rw-r--r--layout/svg/nsSVGForeignObjectFrame.cpp3
-rw-r--r--layout/svg/nsSVGForeignObjectFrame.h1
-rw-r--r--layout/svg/nsSVGMarkerFrame.h1
-rw-r--r--layout/svg/nsSVGMaskFrame.h1
-rw-r--r--layout/svg/nsSVGOuterSVGFrame.cpp3
-rw-r--r--layout/svg/nsSVGOuterSVGFrame.h1
-rw-r--r--layout/svg/nsSVGPaintServerFrame.h1
-rw-r--r--layout/svg/nsSVGPathGeometryFrame.cpp1
-rw-r--r--layout/svg/nsSVGPathGeometryFrame.h1
-rw-r--r--layout/svg/nsSVGStopFrame.cpp1
-rw-r--r--layout/svg/nsSVGSwitchFrame.cpp4
-rw-r--r--layout/tables/nsTableCellFrame.cpp3
-rw-r--r--layout/tables/nsTableCellFrame.h1
-rw-r--r--layout/tables/nsTableColFrame.cpp3
-rw-r--r--layout/tables/nsTableColFrame.h1
-rw-r--r--layout/tables/nsTableColGroupFrame.cpp3
-rw-r--r--layout/tables/nsTableColGroupFrame.h1
-rw-r--r--layout/tables/nsTableFrame.cpp40
-rw-r--r--layout/tables/nsTableFrame.h6
-rw-r--r--layout/tables/nsTableRowFrame.cpp3
-rw-r--r--layout/tables/nsTableRowFrame.h1
-rw-r--r--layout/tables/nsTableRowGroupFrame.cpp13
-rw-r--r--layout/tables/nsTableRowGroupFrame.h1
-rw-r--r--layout/tables/nsTableWrapperFrame.cpp11
-rw-r--r--layout/tables/nsTableWrapperFrame.h2
-rw-r--r--layout/xul/nsBoxFrame.cpp6
-rw-r--r--layout/xul/nsBoxFrame.h2
-rw-r--r--layout/xul/nsButtonBoxFrame.cpp3
-rw-r--r--layout/xul/nsButtonBoxFrame.h1
-rw-r--r--layout/xul/nsDeckFrame.cpp6
-rw-r--r--layout/xul/nsDeckFrame.h2
-rw-r--r--layout/xul/nsGroupBoxFrame.cpp4
-rw-r--r--layout/xul/nsImageBoxFrame.cpp3
-rw-r--r--layout/xul/nsImageBoxFrame.h1
-rw-r--r--layout/xul/nsLeafBoxFrame.cpp1
-rw-r--r--layout/xul/nsLeafBoxFrame.h1
-rw-r--r--layout/xul/nsListItemFrame.cpp3
-rw-r--r--layout/xul/nsListItemFrame.h1
-rw-r--r--layout/xul/nsMenuFrame.cpp5
-rw-r--r--layout/xul/nsMenuFrame.h1
-rw-r--r--layout/xul/nsRootBoxFrame.cpp8
-rw-r--r--layout/xul/nsSliderFrame.cpp8
-rw-r--r--layout/xul/nsSliderFrame.h2
-rw-r--r--layout/xul/nsSplitterFrame.cpp3
-rw-r--r--layout/xul/nsSplitterFrame.h1
-rw-r--r--layout/xul/nsStackFrame.cpp4
-rw-r--r--layout/xul/nsStackFrame.h1
-rw-r--r--layout/xul/nsTextBoxFrame.cpp3
-rw-r--r--layout/xul/nsTextBoxFrame.h1
-rw-r--r--layout/xul/nsTitleBarFrame.cpp3
-rw-r--r--layout/xul/nsTitleBarFrame.h1
-rw-r--r--layout/xul/tree/nsTreeBodyFrame.cpp3
-rw-r--r--layout/xul/tree/nsTreeBodyFrame.h1
-rw-r--r--layout/xul/tree/nsTreeColFrame.cpp5
-rw-r--r--layout/xul/tree/nsTreeColFrame.h1
154 files changed, 259 insertions, 430 deletions
diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp
index 8a34d108f..b08fe4219 100644
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -864,10 +864,9 @@ nsDisplayListBuilder::FindAnimatedGeometryRootFor(nsDisplayItem* aItem)
void nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame,
- nsIFrame* aFrame,
- const nsRect& aDirtyRect)
+ nsIFrame* aFrame)
{
- nsRect dirtyRectRelativeToDirtyFrame = aDirtyRect;
+ nsRect dirtyRectRelativeToDirtyFrame = GetDirtyRect();
if (nsLayoutUtils::IsFixedPosFrameInDisplayPort(aFrame) &&
IsPaintingToWindow()) {
NS_ASSERTION(aDirtyFrame == aFrame->GetParent(), "Dirty frame should be viewport frame");
@@ -882,7 +881,9 @@ void nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame,
dirtyRectRelativeToDirtyFrame.SizeTo(aDirtyFrame->GetSize());
}
}
- nsRect dirty = dirtyRectRelativeToDirtyFrame - aFrame->GetOffsetTo(aDirtyFrame);
+
+ nsPoint offset = aFrame->GetOffsetTo(aDirtyFrame);
+ nsRect dirty = dirtyRectRelativeToDirtyFrame - offset;
nsRect overflowRect = aFrame->GetVisualOverflowRect();
if (aFrame->IsTransformed() &&
@@ -1094,8 +1095,7 @@ nsDisplayListBuilder::ResetMarkedFramesForDisplayList()
void
nsDisplayListBuilder::MarkFramesForDisplayList(nsIFrame* aDirtyFrame,
- const nsFrameList& aFrames,
- const nsRect& aDirtyRect) {
+ const nsFrameList& aFrames) {
for (nsIFrame* e : aFrames) {
// Skip the AccessibleCaret frame when building no caret.
if (!IsBuildingCaret()) {
@@ -1107,9 +1107,8 @@ nsDisplayListBuilder::MarkFramesForDisplayList(nsIFrame* aDirtyFrame,
}
}
}
-
mFramesMarkedForDisplay.AppendElement(e);
- MarkOutOfFlowFrameForDisplay(aDirtyFrame, e, aDirtyRect);
+ MarkOutOfFlowFrameForDisplay(aDirtyFrame, e);
}
}
@@ -2626,7 +2625,6 @@ SpecialCutoutRegionCase(nsDisplayListBuilder* aBuilder,
return true;
}
-
/*static*/ bool
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame,
diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h
index 9cee7b517..e4fb57e8a 100644
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -444,6 +444,10 @@ public:
* BuildDisplayList on right now).
*/
const nsRect& GetDirtyRect() { return mDirtyRect; }
+
+ void SetDirtyRect(const nsRect& aDirtyRect) { mDirtyRect = aDirtyRect; }
+ void IntersectDirtyRect(const nsRect& aDirtyRect) { mDirtyRect.IntersectRect(mDirtyRect, aDirtyRect); }
+
const nsIFrame* GetCurrentFrame() { return mCurrentFrame; }
const nsIFrame* GetCurrentReferenceFrame() { return mCurrentReferenceFrame; }
const nsPoint& GetCurrentFrameOffsetToReferenceFrame() { return mCurrentOffsetToReferenceFrame; }
@@ -493,11 +497,10 @@ public:
/**
* Display the caret if needed.
*/
- void DisplayCaret(nsIFrame* aFrame, const nsRect& aDirtyRect,
- nsDisplayList* aList) {
+ void DisplayCaret(nsIFrame* aFrame, nsDisplayList* aList) {
nsIFrame* frame = GetCaretFrame();
if (aFrame == frame) {
- frame->DisplayCaret(this, aDirtyRect, aList);
+ frame->DisplayCaret(this, aList);
}
}
/**
@@ -602,8 +605,7 @@ public:
* destroyed.
*/
void MarkFramesForDisplayList(nsIFrame* aDirtyFrame,
- const nsFrameList& aFrames,
- const nsRect& aDirtyRect);
+ const nsFrameList& aFrames);
/**
* Mark all child frames that Preserve3D() as needing display.
* Because these frames include transforms set on their parent, dirty rects
@@ -700,8 +702,8 @@ public:
friend class AutoBuildingDisplayList;
class AutoBuildingDisplayList {
public:
- AutoBuildingDisplayList(nsDisplayListBuilder* aBuilder,
- nsIFrame* aForChild,
+
+ AutoBuildingDisplayList(nsDisplayListBuilder* aBuilder, nsIFrame* aForChild,
const nsRect& aDirtyRect, bool aIsRoot)
: mBuilder(aBuilder),
mPrevFrame(aBuilder->mCurrentFrame),
@@ -1120,11 +1122,11 @@ public:
Preserves3DContext mSavedCtx;
};
- const nsRect GetPreserves3DDirtyRect(const nsIFrame *aFrame) const {
+ const nsRect GetPreserves3DRects() const {
return mPreserves3DCtx.mDirtyRect;
}
- void SetPreserves3DDirtyRect(const nsRect &aDirtyRect) {
- mPreserves3DCtx.mDirtyRect = aDirtyRect;
+ void SavePreserves3DRects() {
+ mPreserves3DCtx.mDirtyRect = mDirtyRect;
}
bool IsBuildingInvisibleItems() const { return mBuildingInvisibleItems; }
@@ -1133,8 +1135,7 @@ public:
}
private:
- void MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame, nsIFrame* aFrame,
- const nsRect& aDirtyRect);
+ void MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame, nsIFrame* aFrame);
/**
* Returns whether a frame acts as an animated geometry root, optionally
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
index 04ac9ef52..fb0b42a6c 100644
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -3190,7 +3190,8 @@ nsLayoutUtils::GetFramesForArea(nsIFrame* aFrame, const nsRect& aRect,
}
builder.EnterPresShell(aFrame);
- aFrame->BuildDisplayListForStackingContext(&builder, aRect, &list);
+ builder.SetDirtyRect(aRect);
+ aFrame->BuildDisplayListForStackingContext(&builder, &list);
builder.LeavePresShell(aFrame, nullptr);
#ifdef MOZ_DUMP_PAINTING
@@ -3539,7 +3540,8 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
PROFILER_LABEL("nsLayoutUtils", "PaintFrame::BuildDisplayList",
js::ProfileEntry::Category::GRAPHICS);
- aFrame->BuildDisplayListForStackingContext(&builder, dirtyRect, &list);
+ builder.SetDirtyRect(dirtyRect);
+ aFrame->BuildDisplayListForStackingContext(&builder, &list);
}
nsIAtom* frameType = aFrame->GetType();
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp
index 2615bbc49..63f512af4 100644
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -4898,8 +4898,8 @@ PresShell::CreateRangePaintInfo(nsIDOMRange* aRange,
nsIFrame* frame = aNode->AsContent()->GetPrimaryFrame();
// XXX deal with frame being null due to display:contents
for (; frame; frame = nsLayoutUtils::GetNextContinuationOrIBSplitSibling(frame)) {
- frame->BuildDisplayListForStackingContext(&info->mBuilder,
- frame->GetVisualOverflowRect(), &info->mList);
+ info->mBuilder.SetDirtyRect(frame->GetVisualOverflowRect());
+ frame->BuildDisplayListForStackingContext(&info->mBuilder, &info->mList);
}
};
if (startParent->NodeType() == nsIDOMNode::TEXT_NODE) {
diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp
index 78185616f..1fa3c9c06 100644
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -1294,7 +1294,6 @@ public:
nsReflowStatus& aStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
protected:
@@ -1335,11 +1334,10 @@ nsComboboxDisplayFrame::Reflow(nsPresContext* aPresContext,
void
nsComboboxDisplayFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
nsDisplayListCollection set;
- nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, set);
+ nsBlockFrame::BuildDisplayList(aBuilder, set);
// remove background items if parent frame is themed
if (mComboBox->IsThemed()) {
@@ -1547,13 +1545,8 @@ void nsDisplayComboboxFocus::Paint(nsDisplayListBuilder* aBuilder,
void
nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
-#ifdef NOISY
- printf("%p paint at (%d, %d, %d, %d)\n", this,
- aDirtyRect.x, aDirtyRect.y, aDirtyRect.width, aDirtyRect.height);
-#endif
if (aBuilder->IsForEventDelivery()) {
// Don't allow children to receive events.
@@ -1562,7 +1555,7 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
} else {
// REVIEW: Our in-flow child frames are inline-level so they will paint in our
// content list, so we don't need to mess with layers.
- nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsBlockFrame::BuildDisplayList(aBuilder, aLists);
}
// draw a focus indicator only when focus rings should be drawn
diff --git a/layout/forms/nsComboboxControlFrame.h b/layout/forms/nsComboboxControlFrame.h
index 22849e8d1..d83726d81 100644
--- a/layout/forms/nsComboboxControlFrame.h
+++ b/layout/forms/nsComboboxControlFrame.h
@@ -89,7 +89,6 @@ public:
nsEventStatus* aEventStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
void PaintFocus(DrawTarget& aDrawTarget, nsPoint aPt);
diff --git a/layout/forms/nsFieldSetFrame.cpp b/layout/forms/nsFieldSetFrame.cpp
index fc9f0571b..087f44728 100644
--- a/layout/forms/nsFieldSetFrame.cpp
+++ b/layout/forms/nsFieldSetFrame.cpp
@@ -153,7 +153,6 @@ nsDisplayFieldSetBorderBackground::ComputeInvalidationRegion(nsDisplayListBuilde
void
nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
// Paint our background and border in a special way.
// REVIEW: We don't really need to check frame emptiness here; if it's empty,
@@ -180,7 +179,7 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
if (GetPrevInFlow()) {
- DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
+ DisplayOverflowContainers(aBuilder, aLists);
}
nsDisplayListCollection contentDisplayItems;
@@ -191,13 +190,13 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// legend. However, we want the inner frame's display items to be
// after the legend's display items in z-order, so we need to save them
// and append them later.
- BuildDisplayListForChild(aBuilder, inner, aDirtyRect, contentDisplayItems);
+ BuildDisplayListForChild(aBuilder, inner, contentDisplayItems);
}
if (nsIFrame* legend = GetLegend()) {
// The legend's background goes on our BlockBorderBackgrounds list because
// it's a block child.
nsDisplayListSet set(aLists, aLists.BlockBorderBackgrounds());
- BuildDisplayListForChild(aBuilder, legend, aDirtyRect, set);
+ BuildDisplayListForChild(aBuilder, legend, set);
}
// Put the inner frame's display items on the master list. Note that this
// moves its border/background display items to our BorderBackground() list,
diff --git a/layout/forms/nsFieldSetFrame.h b/layout/forms/nsFieldSetFrame.h
index 5eb67c320..7c162515e 100644
--- a/layout/forms/nsFieldSetFrame.h
+++ b/layout/forms/nsFieldSetFrame.h
@@ -53,7 +53,6 @@ public:
nscoord* aBaseline) const override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
DrawResult PaintBorder(nsDisplayListBuilder* aBuilder,
diff --git a/layout/forms/nsFileControlFrame.cpp b/layout/forms/nsFileControlFrame.cpp
index 659371615..d60e4fb46 100644
--- a/layout/forms/nsFileControlFrame.cpp
+++ b/layout/forms/nsFileControlFrame.cpp
@@ -485,10 +485,9 @@ nsFileControlFrame::SetFormProperty(nsIAtom* aName,
void
nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
+ BuildDisplayListForInline(aBuilder, aLists);
}
#ifdef ACCESSIBILITY
diff --git a/layout/forms/nsFileControlFrame.h b/layout/forms/nsFileControlFrame.h
index 55c51d426..4f975af29 100644
--- a/layout/forms/nsFileControlFrame.h
+++ b/layout/forms/nsFileControlFrame.h
@@ -33,7 +33,6 @@ public:
nsIFrame* aPrevInFlow) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
NS_DECL_QUERYFRAME
diff --git a/layout/forms/nsFormControlFrame.h b/layout/forms/nsFormControlFrame.h
index fd3e95d93..41bb1d9e8 100644
--- a/layout/forms/nsFormControlFrame.h
+++ b/layout/forms/nsFormControlFrame.h
@@ -40,7 +40,6 @@ public:
// nsIFrame replacements
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override {
DO_GLOBAL_REFLOW_COUNT_DSP("nsFormControlFrame");
DisplayBorderBackgroundOutline(aBuilder, aLists);
diff --git a/layout/forms/nsGfxCheckboxControlFrame.cpp b/layout/forms/nsGfxCheckboxControlFrame.cpp
index 061c92349..80009eff2 100644
--- a/layout/forms/nsGfxCheckboxControlFrame.cpp
+++ b/layout/forms/nsGfxCheckboxControlFrame.cpp
@@ -107,10 +107,9 @@ nsGfxCheckboxControlFrame::AccessibleType()
//------------------------------------------------------------
void
nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- nsFormControlFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsFormControlFrame::BuildDisplayList(aBuilder, aLists);
// Get current checked state through content model.
if ((!IsChecked() && !IsIndeterminate()) || !IsVisibleForPainting(aBuilder))
diff --git a/layout/forms/nsGfxCheckboxControlFrame.h b/layout/forms/nsGfxCheckboxControlFrame.h
index 70b8d8d6a..9234b5057 100644
--- a/layout/forms/nsGfxCheckboxControlFrame.h
+++ b/layout/forms/nsGfxCheckboxControlFrame.h
@@ -23,7 +23,6 @@ public:
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
#ifdef ACCESSIBILITY
diff --git a/layout/forms/nsGfxRadioControlFrame.cpp b/layout/forms/nsGfxRadioControlFrame.cpp
index e4a35a998..9c1ec070b 100644
--- a/layout/forms/nsGfxRadioControlFrame.cpp
+++ b/layout/forms/nsGfxRadioControlFrame.cpp
@@ -70,10 +70,9 @@ PaintCheckedRadioButton(nsIFrame* aFrame,
void
nsGfxRadioControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- nsFormControlFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsFormControlFrame::BuildDisplayList(aBuilder, aLists);
if (!IsVisibleForPainting(aBuilder))
return;
diff --git a/layout/forms/nsGfxRadioControlFrame.h b/layout/forms/nsGfxRadioControlFrame.h
index f91e6b94c..dd268dec1 100644
--- a/layout/forms/nsGfxRadioControlFrame.h
+++ b/layout/forms/nsGfxRadioControlFrame.h
@@ -25,7 +25,6 @@ public:
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
};
diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp
index c6d8e1c4f..10f24e1e0 100644
--- a/layout/forms/nsHTMLButtonControlFrame.cpp
+++ b/layout/forms/nsHTMLButtonControlFrame.cpp
@@ -98,7 +98,6 @@ nsHTMLButtonControlFrame::ShouldClipPaintingToBorderBox()
void
nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// Clip to our border area for event hit testing.
@@ -132,7 +131,7 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
clipState.ClipContainingBlockDescendants(rect, hasRadii ? radii : nullptr);
}
- BuildDisplayListForChild(aBuilder, mFrames.FirstChild(), aDirtyRect, set,
+ BuildDisplayListForChild(aBuilder, mFrames.FirstChild(), set,
DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT);
// That should put the display items in set.Content()
}
diff --git a/layout/forms/nsHTMLButtonControlFrame.h b/layout/forms/nsHTMLButtonControlFrame.h
index 432afa12c..8837daf74 100644
--- a/layout/forms/nsHTMLButtonControlFrame.h
+++ b/layout/forms/nsHTMLButtonControlFrame.h
@@ -27,7 +27,6 @@ public:
NS_DECL_FRAMEARENA_HELPERS
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp
index 58e81039f..2233c5996 100644
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -155,7 +155,6 @@ nsListControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
void
nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// We allow visibility:hidden <select>s to contain visible options.
@@ -180,7 +179,7 @@ nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
mLastDropdownBackstopColor));
}
- nsHTMLScrollFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsHTMLScrollFrame::BuildDisplayList(aBuilder, aLists);
}
/**
diff --git a/layout/forms/nsListControlFrame.h b/layout/forms/nsListControlFrame.h
index 47f033a9b..d8df9ebd6 100644
--- a/layout/forms/nsListControlFrame.h
+++ b/layout/forms/nsListControlFrame.h
@@ -81,7 +81,6 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsContainerFrame* GetContentInsertionFrame() override;
diff --git a/layout/forms/nsProgressFrame.cpp b/layout/forms/nsProgressFrame.cpp
index 2445defd3..1e3519f0e 100644
--- a/layout/forms/nsProgressFrame.cpp
+++ b/layout/forms/nsProgressFrame.cpp
@@ -101,10 +101,9 @@ NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
void
nsProgressFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
+ BuildDisplayListForInline(aBuilder, aLists);
}
void
diff --git a/layout/forms/nsProgressFrame.h b/layout/forms/nsProgressFrame.h
index 01465ff7c..9cc72612f 100644
--- a/layout/forms/nsProgressFrame.h
+++ b/layout/forms/nsProgressFrame.h
@@ -32,7 +32,6 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void Reflow(nsPresContext* aCX,
diff --git a/layout/forms/nsRangeFrame.cpp b/layout/forms/nsRangeFrame.cpp
index 7590da066..9370acb87 100644
--- a/layout/forms/nsRangeFrame.cpp
+++ b/layout/forms/nsRangeFrame.cpp
@@ -259,7 +259,6 @@ nsDisplayRangeFocusRing::Paint(nsDisplayListBuilder* aBuilder,
void
nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (IsThemed()) {
@@ -274,10 +273,10 @@ nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsIFrame* thumb = mThumbDiv->GetPrimaryFrame();
if (thumb) {
nsDisplayListSet set(aLists, aLists.Content());
- BuildDisplayListForChild(aBuilder, thumb, aDirtyRect, set, DISPLAY_CHILD_INLINE);
+ BuildDisplayListForChild(aBuilder, thumb, set, DISPLAY_CHILD_INLINE);
}
} else {
- BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
+ BuildDisplayListForInline(aBuilder, aLists);
}
// Draw a focus outline if appropriate:
diff --git a/layout/forms/nsRangeFrame.h b/layout/forms/nsRangeFrame.h
index 8a2d34a40..b913b3002 100644
--- a/layout/forms/nsRangeFrame.h
+++ b/layout/forms/nsRangeFrame.h
@@ -43,7 +43,6 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void Reflow(nsPresContext* aPresContext,
diff --git a/layout/forms/nsSelectsAreaFrame.cpp b/layout/forms/nsSelectsAreaFrame.cpp
index dd613ae9f..0177b9e77 100644
--- a/layout/forms/nsSelectsAreaFrame.cpp
+++ b/layout/forms/nsSelectsAreaFrame.cpp
@@ -126,16 +126,15 @@ public:
void
nsSelectsAreaFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!aBuilder->IsForEventDelivery()) {
- BuildDisplayListInternal(aBuilder, aDirtyRect, aLists);
+ BuildDisplayListInternal(aBuilder, aLists);
return;
}
nsDisplayListCollection set;
- BuildDisplayListInternal(aBuilder, aDirtyRect, set);
+ BuildDisplayListInternal(aBuilder, set);
nsOptionEventGrabberWrapper wrapper;
wrapper.WrapLists(aBuilder, this, set, aLists);
@@ -143,10 +142,9 @@ nsSelectsAreaFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
void
nsSelectsAreaFrame::BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsBlockFrame::BuildDisplayList(aBuilder, aLists);
nsListControlFrame* listFrame = GetEnclosingListFrame(this);
if (listFrame && listFrame->IsFocused()) {
diff --git a/layout/forms/nsSelectsAreaFrame.h b/layout/forms/nsSelectsAreaFrame.h
index 3aac8a837..9b0a5b723 100644
--- a/layout/forms/nsSelectsAreaFrame.h
+++ b/layout/forms/nsSelectsAreaFrame.h
@@ -18,11 +18,9 @@ public:
nsFrameState aFlags);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
void BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void Reflow(nsPresContext* aCX,
diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp
index a65e5b972..fa64e3937 100644
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -1434,7 +1434,6 @@ nsTextControlFrame::PeekOffset(nsPeekOffsetStruct *aPos)
void
nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
/*
@@ -1462,7 +1461,7 @@ nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// placeholder has to be visible.
if (kid->GetContent() != txtCtrl->GetPlaceholderNode() ||
txtCtrl->GetPlaceholderVisibility()) {
- BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set, 0);
+ BuildDisplayListForChild(aBuilder, kid, set, 0);
}
kid = kid->GetNextSibling();
}
diff --git a/layout/forms/nsTextControlFrame.h b/layout/forms/nsTextControlFrame.h
index 7fa39c5fb..620cc92b9 100644
--- a/layout/forms/nsTextControlFrame.h
+++ b/layout/forms/nsTextControlFrame.h
@@ -127,7 +127,6 @@ public:
nsFrameList& aChildList) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual mozilla::dom::Element*
diff --git a/layout/generic/nsBackdropFrame.cpp b/layout/generic/nsBackdropFrame.cpp
index 687c5b2e3..ae847f460 100644
--- a/layout/generic/nsBackdropFrame.cpp
+++ b/layout/generic/nsBackdropFrame.cpp
@@ -39,7 +39,6 @@ nsBackdropFrame::GetParentStyleContext(nsIFrame** aProviderFrame) const
/* virtual */ void
nsBackdropFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
DO_GLOBAL_REFLOW_COUNT_DSP("nsBackdropFrame");
diff --git a/layout/generic/nsBackdropFrame.h b/layout/generic/nsBackdropFrame.h
index 74d366bef..f3159da31 100644
--- a/layout/generic/nsBackdropFrame.h
+++ b/layout/generic/nsBackdropFrame.h
@@ -27,7 +27,6 @@ public:
virtual nsStyleContext*
GetParentStyleContext(nsIFrame** aProviderFrame) const override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual mozilla::LogicalSize
ComputeAutoSize(nsRenderingContext* aRenderingContext,
diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp
index a37bfc06b..464ddfd34 100644
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -6527,13 +6527,13 @@ static void DebugOutputDrawLine(int32_t aDepth, nsLineBox* aLine, bool aDrawn) {
static void
DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
- const nsRect& aDirtyRect, nsBlockFrame::LineIterator& aLine,
+ nsBlockFrame::LineIterator& aLine,
int32_t aDepth, int32_t& aDrawnLines, const nsDisplayListSet& aLists,
nsBlockFrame* aFrame, TextOverflow* aTextOverflow) {
// If the line's combined area (which includes child frames that
// stick outside of the line's bounding box or our bounding box)
// intersects the dirty rect then paint the line.
- bool intersect = aLineArea.Intersects(aDirtyRect);
+ bool intersect = aLineArea.Intersects(aBuilder->GetDirtyRect());
#ifdef DEBUG
if (nsBlockFrame::gLamePaintMetrics) {
aDrawnLines++;
@@ -6568,8 +6568,7 @@ DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
nsIFrame* kid = aLine->mFirstChild;
int32_t n = aLine->GetChildCount();
while (--n >= 0) {
- aFrame->BuildDisplayListForChild(aBuilder, kid, aDirtyRect,
- childLists, flags);
+ aFrame->BuildDisplayListForChild(aBuilder, kid, childLists, flags);
kid = kid->GetNextSibling();
}
@@ -6582,13 +6581,13 @@ DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
void
nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
int32_t drawnLines; // Will only be used if set (gLamePaintMetrics).
int32_t depth = 0;
#ifdef DEBUG
if (gNoisyDamageRepair) {
+ nsRect dirty = aBuilder->GetDirtyRect();
depth = GetDepth();
nsRect ca;
::ComputeVisualOverflowArea(mLines, mRect.width, mRect.height, ca);
@@ -6596,7 +6595,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
ListTag(stdout);
printf(": bounds=%d,%d,%d,%d dirty(absolute)=%d,%d,%d,%d ca=%d,%d,%d,%d\n",
mRect.x, mRect.y, mRect.width, mRect.height,
- aDirtyRect.x, aDirtyRect.y, aDirtyRect.width, aDirtyRect.height,
+ dirty.x, dirty.y, dirty.width, dirty.height,
ca.x, ca.y, ca.width, ca.height);
}
PRTime start = 0; // Initialize these variables to silence the compiler.
@@ -6609,14 +6608,14 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayBorderBackgroundOutline(aBuilder, aLists);
if (GetPrevInFlow()) {
- DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
+ DisplayOverflowContainers(aBuilder, aLists);
for (nsIFrame* f : mFloats) {
if (f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT)
- BuildDisplayListForChild(aBuilder, f, aDirtyRect, aLists);
+ BuildDisplayListForChild(aBuilder, f, aLists);
}
}
- aBuilder->MarkFramesForDisplayList(this, mFloats, aDirtyRect);
+ aBuilder->MarkFramesForDisplayList(this, mFloats);
// Prepare for text-overflow processing.
UniquePtr<TextOverflow> textOverflow(
@@ -6633,7 +6632,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// approximate it by checking it on |this|; if it's true for any
// frame in our child list, it's also true for |this|.
nsLineBox* cursor = aBuilder->ShouldDescendIntoFrame(this) ?
- nullptr : GetFirstLineContaining(aDirtyRect.y);
+ nullptr : GetFirstLineContaining(aBuilder->GetDirtyRect().y);
LineIterator line_end = LinesEnd();
if (cursor) {
@@ -6644,10 +6643,10 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (!lineArea.IsEmpty()) {
// Because we have a cursor, the combinedArea.ys are non-decreasing.
// Once we've passed aDirtyRect.YMost(), we can never see it again.
- if (lineArea.y >= aDirtyRect.YMost()) {
+ if (lineArea.y >= aBuilder->GetDirtyRect().YMost()) {
break;
}
- DisplayLine(aBuilder, lineArea, aDirtyRect, line, depth, drawnLines,
+ DisplayLine(aBuilder, lineArea, line, depth, drawnLines,
linesDisplayListCollection, this, textOverflow.get());
}
}
@@ -6660,7 +6659,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
line != line_end;
++line) {
nsRect lineArea = line->GetVisualOverflowArea();
- DisplayLine(aBuilder, lineArea, aDirtyRect, line, depth, drawnLines,
+ DisplayLine(aBuilder, lineArea, line, depth, drawnLines,
linesDisplayListCollection, this, textOverflow.get());
if (!lineArea.IsEmpty()) {
if (lineArea.y < lastY
@@ -6690,7 +6689,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (HasOutsideBullet()) {
// Display outside bullets manually
nsIFrame* bullet = GetOutsideBullet();
- BuildDisplayListForChild(aBuilder, bullet, aDirtyRect, aLists);
+ BuildDisplayListForChild(aBuilder, bullet, aLists);
}
#ifdef DEBUG
diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h
index f515cc26f..4775fa626 100644
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -139,7 +139,6 @@ public:
virtual nsSplittableType GetSplittableType() const override;
virtual bool IsFloatContainingBlock() const override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsIAtom* GetType() const override;
virtual bool IsFrameOfType(uint32_t aFlags) const override
diff --git a/layout/generic/nsBulletFrame.cpp b/layout/generic/nsBulletFrame.cpp
index f6595e8f6..db9a70aff 100644
--- a/layout/generic/nsBulletFrame.cpp
+++ b/layout/generic/nsBulletFrame.cpp
@@ -274,7 +274,6 @@ void nsDisplayBullet::Paint(nsDisplayListBuilder* aBuilder,
void
nsBulletFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
diff --git a/layout/generic/nsBulletFrame.h b/layout/generic/nsBulletFrame.h
index e35ed0923..30f4e23cd 100644
--- a/layout/generic/nsBulletFrame.h
+++ b/layout/generic/nsBulletFrame.h
@@ -68,7 +68,6 @@ public:
// nsIFrame
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsIAtom* GetType() const override;
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) override;
diff --git a/layout/generic/nsCanvasFrame.cpp b/layout/generic/nsCanvasFrame.cpp
index 1a8812fb7..31baa040c 100644
--- a/layout/generic/nsCanvasFrame.cpp
+++ b/layout/generic/nsCanvasFrame.cpp
@@ -410,11 +410,10 @@ public:
void
nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (GetPrevInFlow()) {
- DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
+ DisplayOverflowContainers(aBuilder, aLists);
}
// Force a background to be shown. We may have a background propagated to us,
@@ -488,7 +487,7 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
for (nsIFrame* kid : PrincipalChildList()) {
// Put our child into its own pseudo-stack.
- BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
+ BuildDisplayListForChild(aBuilder, kid, aLists);
}
#ifdef DEBUG_CANVAS_FOCUS
@@ -504,7 +503,7 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
docShell->GetHasFocus(&hasFocus);
printf("%p - nsCanvasFrame::Paint R:%d,%d,%d,%d DR: %d,%d,%d,%d\n", this,
mRect.x, mRect.y, mRect.width, mRect.height,
- aDirtyRect.x, aDirtyRect.y, aDirtyRect.width, aDirtyRect.height);
+ dirty.x, dirty.y, dirty.width, dirty.height);
}
printf("%p - Focus: %s c: %p DoPaint:%s\n", docShell.get(), hasFocus?"Y":"N",
focusContent.get(), mDoPaintFocus?"Y":"N");
diff --git a/layout/generic/nsCanvasFrame.h b/layout/generic/nsCanvasFrame.h
index 8bd9dbf79..8c59f18c0 100644
--- a/layout/generic/nsCanvasFrame.h
+++ b/layout/generic/nsCanvasFrame.h
@@ -107,7 +107,6 @@ public:
NS_IMETHOD SetHasFocus(bool aHasFocus);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
void PaintFocus(mozilla::gfx::DrawTarget* aRenderingContext, nsPoint aPt);
diff --git a/layout/generic/nsColumnSetFrame.cpp b/layout/generic/nsColumnSetFrame.cpp
index 6ea15d4d2..90d425ccf 100644
--- a/layout/generic/nsColumnSetFrame.cpp
+++ b/layout/generic/nsColumnSetFrame.cpp
@@ -1115,7 +1115,6 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext,
void
nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
DisplayBorderBackgroundOutline(aBuilder, aLists);
@@ -1128,7 +1127,7 @@ nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// Our children won't have backgrounds so it doesn't matter where we put them.
for (nsFrameList::Enumerator e(mFrames); !e.AtEnd(); e.Next()) {
- BuildDisplayListForChild(aBuilder, e.get(), aDirtyRect, aLists);
+ BuildDisplayListForChild(aBuilder, e.get(), aLists);
}
}
diff --git a/layout/generic/nsColumnSetFrame.h b/layout/generic/nsColumnSetFrame.h
index db44183d6..4195742c2 100644
--- a/layout/generic/nsColumnSetFrame.h
+++ b/layout/generic/nsColumnSetFrame.h
@@ -67,7 +67,6 @@ public:
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsIAtom* GetType() const override;
diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp
index 8d58dc3bb..47afed9de 100644
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -331,17 +331,15 @@ nsContainerFrame::GetChildLists(nsTArray<ChildList>* aLists) const
void
nsContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
DisplayBorderBackgroundOutline(aBuilder, aLists);
- BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
+ BuildDisplayListForNonBlockChildren(aBuilder, aLists);
}
void
nsContainerFrame::BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
uint32_t aFlags)
{
@@ -350,7 +348,7 @@ nsContainerFrame::BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aB
nsDisplayListSet set(aLists, aLists.Content());
// The children should be in content order
while (kid) {
- BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set, aFlags);
+ BuildDisplayListForChild(aBuilder, kid, set, aFlags);
kid = kid->GetNextSibling();
}
}
@@ -1340,13 +1338,12 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
void
nsContainerFrame::DisplayOverflowContainers(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
nsFrameList* overflowconts = GetPropTableFrames(OverflowContainersProperty());
if (overflowconts) {
for (nsIFrame* frame : *overflowconts) {
- BuildDisplayListForChild(aBuilder, frame, aDirtyRect, aLists);
+ BuildDisplayListForChild(aBuilder, frame, aLists);
}
}
}
diff --git a/layout/generic/nsContainerFrame.h b/layout/generic/nsContainerFrame.h
index ddf993d91..e3cc54b0b 100644
--- a/layout/generic/nsContainerFrame.h
+++ b/layout/generic/nsContainerFrame.h
@@ -437,7 +437,6 @@ public:
* Add overflow containers to the display list
*/
void DisplayOverflowContainers(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
/**
@@ -450,7 +449,6 @@ public:
* to emulate what nsContainerFrame::Paint did.
*/
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
static void PlaceFrameView(nsIFrame* aFrame)
@@ -576,7 +574,6 @@ protected:
* display items) go into the Content() list.
*/
void BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
uint32_t aFlags = 0);
@@ -585,11 +582,9 @@ protected:
* Intended as a convenience for derived classes.
*/
void BuildDisplayListForInline(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
DisplayBorderBackgroundOutline(aBuilder, aLists);
- BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists,
- DISPLAY_CHILD_INLINE);
+ BuildDisplayListForNonBlockChildren(aBuilder, aLists, DISPLAY_CHILD_INLINE);
}
diff --git a/layout/generic/nsFirstLetterFrame.cpp b/layout/generic/nsFirstLetterFrame.cpp
index 980e1e9be..426e3caa7 100644
--- a/layout/generic/nsFirstLetterFrame.cpp
+++ b/layout/generic/nsFirstLetterFrame.cpp
@@ -50,10 +50,9 @@ nsFirstLetterFrame::GetType() const
void
nsFirstLetterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
+ BuildDisplayListForInline(aBuilder, aLists);
}
void
diff --git a/layout/generic/nsFirstLetterFrame.h b/layout/generic/nsFirstLetterFrame.h
index 40e4ef0cf..c8d416a85 100644
--- a/layout/generic/nsFirstLetterFrame.h
+++ b/layout/generic/nsFirstLetterFrame.h
@@ -20,7 +20,6 @@ public:
explicit nsFirstLetterFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void Init(nsIContent* aContent,
diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp
index 94bce1e7a..69200117b 100644
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -2433,7 +2433,6 @@ GetDisplayFlagsForFlexItem(nsIFrame* aFrame)
void
nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// XXXdholbert hacky temporary band-aid for bug 1059138: Trivially pass this
@@ -2452,7 +2451,7 @@ nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// the BlockBorderBackgrounds list.
nsDisplayListSet childLists(aLists, aLists.BlockBorderBackgrounds());
for (nsIFrame* childFrame : mFrames) {
- BuildDisplayListForChild(aBuilder, childFrame, aDirtyRect, childLists,
+ BuildDisplayListForChild(aBuilder, childFrame, childLists,
GetDisplayFlagsForFlexItem(childFrame));
}
}
diff --git a/layout/generic/nsFlexContainerFrame.h b/layout/generic/nsFlexContainerFrame.h
index 459ae8e20..ac2cc72f6 100644
--- a/layout/generic/nsFlexContainerFrame.h
+++ b/layout/generic/nsFlexContainerFrame.h
@@ -64,7 +64,6 @@ public:
nsIFrame* aPrevInFlow) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
void MarkIntrinsicISizesDirty() override;
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp
index 6b0848e74..0bcc3f4c7 100644
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1815,7 +1815,7 @@ nsFrame::DisplayOutline(nsDisplayListBuilder* aBuilder,
void
nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect, nsDisplayList* aList)
+ nsDisplayList* aList)
{
if (!IsVisibleForPainting(aBuilder))
return;
@@ -2074,13 +2074,12 @@ ItemParticipatesIn3DContext(nsIFrame* aAncestor, nsDisplayItem* aItem)
static void
WrapSeparatorTransform(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
- nsRect& aDirtyRect,
nsDisplayList* aSource, nsDisplayList* aTarget,
int aIndex) {
if (!aSource->IsEmpty()) {
nsDisplayTransform *sepIdItem =
new (aBuilder) nsDisplayTransform(aBuilder, aFrame, aSource,
- aDirtyRect, Matrix4x4(), aIndex);
+ aBuilder->GetDirtyRect(), Matrix4x4(), aIndex);
sepIdItem->SetNoExtendContext();
aTarget->AppendToTop(sepIdItem);
}
@@ -2088,7 +2087,6 @@ WrapSeparatorTransform(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
void
nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
nsDisplayList* aList) {
if (GetStateBits() & NS_FRAME_TOO_DEEP_IN_FRAME_TREE)
return;
@@ -2132,13 +2130,13 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
autoPreserves3DContext.emplace(aBuilder);
// Save dirty rect on the builder to avoid being distorted for
// multiple transforms along the chain.
- aBuilder->SetPreserves3DDirtyRect(aDirtyRect);
+ aBuilder->SavePreserves3DRects();
}
// For preserves3d, use the dirty rect already installed on the
// builder, since aDirtyRect maybe distorted for transforms along
// the chain.
- nsRect dirtyRect = aDirtyRect;
+ nsRect dirtyRect = aBuilder->GetDirtyRect();
bool inTransform = aBuilder->IsInTransform();
bool isTransformed = IsTransformed();
@@ -2163,7 +2161,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
// If we're in preserve-3d then grab the dirty rect that was given to the root
// and transform using the combined transform.
if (Combines3DTransformWithAncestors()) {
- dirtyRect = aBuilder->GetPreserves3DDirtyRect(this);
+ dirtyRect = aBuilder->GetPreserves3DRects();
}
nsRect untransformedDirtyRect;
@@ -2283,7 +2281,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
Maybe<nsRect> clipPropClip = GetClipPropClipRect(disp, effects, GetSize());
if (clipPropClip) {
- dirtyRect.IntersectRect(dirtyRect, *clipPropClip);
+ aBuilder->IntersectDirtyRect(*clipPropClip);
nestedClipState.ClipContentDescendants(
*clipPropClip + aBuilder->ToReferenceFrame(this));
}
@@ -2296,7 +2294,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
aBuilder->MarkPreserve3DFramesForDisplayList(this);
}
- MarkAbsoluteFramesForDisplayList(aBuilder, dirtyRect);
+ MarkAbsoluteFramesForDisplayList(aBuilder);
nsDisplayLayerEventRegions* eventRegions = nullptr;
if (aBuilder->IsBuildingLayerEventRegions()) {
@@ -2305,7 +2303,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
aBuilder->SetLayerEventRegions(eventRegions);
}
aBuilder->AdjustWindowDraggingRegion(this);
- BuildDisplayList(aBuilder, dirtyRect, set);
+ BuildDisplayList(aBuilder, set);
if (eventRegions) {
// If the event regions item ended up empty, throw it away rather than
// adding it to the display list.
@@ -2411,7 +2409,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
clipState.ExitStackingContextContents(&containerItemScrollClip);
}
// Revert to the post-filter dirty rect.
- buildingDisplayList.SetDirtyRect(dirtyRectOutsideSVGEffects);
+ aBuilder->SetDirtyRect(dirtyRectOutsideSVGEffects);
// Skip all filter effects while generating glyph mask.
if (usingFilter && !aBuilder->IsForGenerateGlyphMask()) {
@@ -2476,8 +2474,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
while (nsDisplayItem* item = resultList.RemoveBottom()) {
if (ItemParticipatesIn3DContext(this, item) && !item->GetClip().HasClip()) {
// The frame of this item participates the same 3D context.
- WrapSeparatorTransform(aBuilder, this, dirtyRect,
- &nonparticipants, &participants, index++);
+ WrapSeparatorTransform(aBuilder, this, &nonparticipants, &participants, index++);
participants.AppendToTop(item);
} else {
// The frame of the item doesn't participate the current
@@ -2490,8 +2487,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
nonparticipants.AppendToTop(item);
}
}
- WrapSeparatorTransform(aBuilder, this, dirtyRect,
- &nonparticipants, &participants, index++);
+ WrapSeparatorTransform(aBuilder, this, &nonparticipants, &participants, index++);
resultList.AppendToTop(&participants);
}
@@ -2502,7 +2498,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
}
// Revert to the dirtyrect coming in from the parent, without our transform
// taken into account.
- buildingDisplayList.SetDirtyRect(dirtyRectOutsideTransform);
+ aBuilder->SetDirtyRect(dirtyRectOutsideTransform);
// Revert to the outer reference frame and offset because all display
// items we create from now on are outside the transform.
nsPoint toOuterReferenceFrame;
@@ -2606,7 +2602,6 @@ WrapInWrapList(nsDisplayListBuilder* aBuilder,
void
nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
nsIFrame* aChild,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
uint32_t aFlags) {
// If painting is restricted to just the background of the top level frame,
@@ -2639,12 +2634,15 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
pseudoStackingContext = true;
}
- // dirty rect in child-relative coordinates
- nsRect dirty = aDirtyRect - child->GetOffsetTo(this);
-
nsIAtom* childType = child->GetType();
nsDisplayListBuilder::OutOfFlowDisplayData* savedOutOfFlowData = nullptr;
bool isPlaceholder = false;
+
+ // dirty rect in child-relative coordinates
+ NS_ASSERTION(aBuilder->GetCurrentFrame() == this, "Wrong coord space!");
+ nsPoint offset = child->GetOffsetTo(this);
+ nsRect dirty = aBuilder->GetDirtyRect() - offset;
+
if (childType == nsGkAtoms::placeholderFrame) {
isPlaceholder = true;
nsPlaceholderFrame* placeholder = static_cast<nsPlaceholderFrame*>(child);
@@ -2712,8 +2710,9 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
(shell->IgnoringViewportScrolling() && child == shell->GetRootScrollFrame());
if (!keepDescending) {
nsRect childDirty;
- if (!childDirty.IntersectRect(dirty, child->GetVisualOverflowRect()))
+ if (!childDirty.IntersectRect(dirty, child->GetVisualOverflowRect())) {
return;
+ }
// Usually we could set dirty to childDirty now but there's no
// benefit, and it can be confusing. It can especially confuse
// situations where we're going to ignore a scrollframe's clipping;
@@ -2773,6 +2772,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
nsDisplayListBuilder::AutoBuildingDisplayList
buildingForChild(aBuilder, child, dirty, pseudoStackingContext);
+
DisplayListClipState::AutoClipMultiple clipState(aBuilder);
CheckForApzAwareEventHandlers(aBuilder, child);
@@ -2785,7 +2785,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
savedOutOfFlowData->mContainingBlockScrollClip);
} else if (GetStateBits() & NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO &&
isPlaceholder) {
- NS_ASSERTION(dirty.IsEmpty(), "should have empty dirty rect");
+ NS_ASSERTION(dirty.IsEmpty(), "should have empty visible rect");
// Every item we build from now until we descent into an out of flow that
// does have saved out of flow data should be invisible. This state gets
// restored when AutoBuildingDisplayList gets out of scope.
@@ -2821,18 +2821,18 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
// True stacking context.
// For stacking contexts, BuildDisplayListForStackingContext handles
// clipping and MarkAbsoluteFramesForDisplayList.
- child->BuildDisplayListForStackingContext(aBuilder, dirty, &list);
- aBuilder->DisplayCaret(child, dirty, &list);
+ child->BuildDisplayListForStackingContext(aBuilder, &list);
+ aBuilder->DisplayCaret(child, &list);
} else {
Maybe<nsRect> clipPropClip =
child->GetClipPropClipRect(disp, effects, child->GetSize());
if (clipPropClip) {
- dirty.IntersectRect(dirty, *clipPropClip);
+ aBuilder->IntersectDirtyRect(*clipPropClip);
clipState.ClipContentDescendants(
*clipPropClip + aBuilder->ToReferenceFrame(child));
}
- child->MarkAbsoluteFramesForDisplayList(aBuilder, dirty);
+ child->MarkAbsoluteFramesForDisplayList(aBuilder);
if (aBuilder->IsBuildingLayerEventRegions()) {
// If this frame has a different animated geometry root than its parent,
@@ -2864,8 +2864,8 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
// return early.
aBuilder->AdjustWindowDraggingRegion(child);
- child->BuildDisplayList(aBuilder, dirty, aLists);
- aBuilder->DisplayCaret(child, dirty, aLists.Content());
+ child->BuildDisplayList(aBuilder, aLists);
+ aBuilder->DisplayCaret(child, aLists.Content());
#ifdef DEBUG
DisplayDebugBorders(aBuilder, child, aLists);
#endif
@@ -2878,8 +2878,8 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
// z-index:non-auto
nsDisplayListCollection pseudoStack;
aBuilder->AdjustWindowDraggingRegion(child);
- child->BuildDisplayList(aBuilder, dirty, pseudoStack);
- aBuilder->DisplayCaret(child, dirty, pseudoStack.Content());
+ child->BuildDisplayList(aBuilder, pseudoStack);
+ aBuilder->DisplayCaret(child, pseudoStack.Content());
list.AppendToTop(pseudoStack.BorderBackground());
list.AppendToTop(pseudoStack.BlockBorderBackgrounds());
@@ -2929,11 +2929,10 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
}
void
-nsIFrame::MarkAbsoluteFramesForDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect)
+nsIFrame::MarkAbsoluteFramesForDisplayList(nsDisplayListBuilder* aBuilder)
{
if (IsAbsoluteContainer()) {
- aBuilder->MarkFramesForDisplayList(this, GetAbsoluteContainingBlock()->GetChildList(), aDirtyRect);
+ aBuilder->MarkFramesForDisplayList(this, GetAbsoluteContainingBlock()->GetChildList());
}
}
diff --git a/layout/generic/nsFrameSetFrame.cpp b/layout/generic/nsFrameSetFrame.cpp
index 87cb31fd0..4315b9b8a 100644
--- a/layout/generic/nsFrameSetFrame.cpp
+++ b/layout/generic/nsFrameSetFrame.cpp
@@ -100,7 +100,6 @@ public:
nsIFrame::Cursor& aCursor) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void Reflow(nsPresContext* aPresContext,
@@ -149,7 +148,6 @@ public:
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void Reflow(nsPresContext* aPresContext,
@@ -672,10 +670,9 @@ nsHTMLFramesetFrame::GetCursor(const nsPoint& aPoint,
void
nsHTMLFramesetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
+ BuildDisplayListForInline(aBuilder, aLists);
if (mDragger && aBuilder->IsForEventDelivery()) {
aLists.Content()->AppendNewToTop(
@@ -1429,7 +1426,6 @@ void nsDisplayFramesetBorder::Paint(nsDisplayListBuilder* aBuilder,
void
nsHTMLFramesetBorderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
aLists.Content()->AppendNewToTop(
@@ -1640,7 +1636,6 @@ void nsDisplayFramesetBlank::Paint(nsDisplayListBuilder* aBuilder,
void
nsHTMLFramesetBlankFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
aLists.Content()->AppendNewToTop(
diff --git a/layout/generic/nsFrameSetFrame.h b/layout/generic/nsFrameSetFrame.h
index ac6ab07ce..b97d10c58 100644
--- a/layout/generic/nsFrameSetFrame.h
+++ b/layout/generic/nsFrameSetFrame.h
@@ -97,7 +97,6 @@ public:
nsIFrame::Cursor& aCursor) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void Reflow(nsPresContext* aPresContext,
diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp
index 3ed3b0bb3..fea4110c0 100644
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -3031,7 +3031,6 @@ struct HoveredStateComparator
void
ScrollFrameHelper::AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
bool aCreateLayer,
bool aPositioned)
@@ -3093,23 +3092,25 @@ ScrollFrameHelper::AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
// zoomable, and where the scrollbar sizes are bounded by the widget.
nsRect dirty = mIsRoot && mOuter->PresContext()->IsRootContentDocument()
? scrollParts[i]->GetVisualOverflowRectRelativeToParent()
- : aDirtyRect;
- nsDisplayListBuilder::AutoBuildingDisplayList
- buildingForChild(aBuilder, scrollParts[i],
- dirty + mOuter->GetOffsetTo(scrollParts[i]), true);
+ : aBuilder->GetDirtyRect();
// Always create layers for overlay scrollbars so that we don't create a
// giant layer covering the whole scrollport if both scrollbars are visible.
bool isOverlayScrollbar = (flags != 0) && overlayScrollbars;
bool createLayer = aCreateLayer || isOverlayScrollbar;
- nsDisplayListBuilder::AutoCurrentScrollbarInfoSetter
- infoSetter(aBuilder, scrollTargetId, flags, createLayer);
nsDisplayListCollection partList;
- mOuter->BuildDisplayListForChild(
- aBuilder, scrollParts[i], dirty, partList,
- nsIFrame::DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
-
+ {
+ nsDisplayListBuilder::AutoBuildingDisplayList
+ buildingForChild(aBuilder, mOuter,
+ dirty, true);
+
+ nsDisplayListBuilder::AutoCurrentScrollbarInfoSetter
+ infoSetter(aBuilder, scrollTargetId, flags, createLayer);
+ mOuter->BuildDisplayListForChild(
+ aBuilder, scrollParts[i], partList,
+ nsIFrame::DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
+ }
if (createLayer) {
appendToTopFlags |= APPEND_OWN_LAYER;
}
@@ -3117,11 +3118,18 @@ ScrollFrameHelper::AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
appendToTopFlags |= APPEND_POSITIONED;
}
+ {
+ nsDisplayListBuilder::AutoBuildingDisplayList
+ buildingForChild(aBuilder, scrollParts[i],
+ dirty + mOuter->GetOffsetTo(scrollParts[i]), true);
+ nsDisplayListBuilder::AutoCurrentScrollbarInfoSetter
+ infoSetter(aBuilder, scrollTargetId, flags, createLayer);
// DISPLAY_CHILD_FORCE_STACKING_CONTEXT put everything into
// partList.PositionedDescendants().
::AppendToTop(aBuilder, aLists,
partList.PositionedDescendants(), scrollParts[i],
appendToTopFlags);
+ }
}
}
@@ -3246,7 +3254,6 @@ ClipListsExceptCaret(nsDisplayListCollection* aLists,
void
ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (aBuilder->IsForFrameVisibility()) {
@@ -3283,7 +3290,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// had dirty rects saved for them by their parent frames calling
// MarkOutOfFlowChildrenForDisplayList, so it's safe to restrict our
// dirty rect here.
- nsRect dirtyRect = aDirtyRect;
+ nsRect dirtyRect = aBuilder->GetDirtyRect();
if (!ignoringThisScrollFrame) {
dirtyRect = dirtyRect.Intersect(mScrollPort);
}
@@ -3325,20 +3332,20 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (addScrollBars) {
// Add classic scrollbars.
- AppendScrollPartsTo(aBuilder, aDirtyRect, aLists,
- createLayersForScrollbars, false);
+ AppendScrollPartsTo(aBuilder, aLists, createLayersForScrollbars, false);
}
+ nsDisplayListBuilder::AutoBuildingDisplayList
+ building(aBuilder, mOuter, dirtyRect, aBuilder->IsAtRootOfPseudoStackingContext());
+
// Don't clip the scrolled child, and don't paint scrollbars/scrollcorner.
// The scrolled frame shouldn't have its own background/border, so we
// can just pass aLists directly.
- mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame,
- dirtyRect, aLists);
+ mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, aLists);
if (addScrollBars) {
// Add overlay scrollbars.
- AppendScrollPartsTo(aBuilder, aDirtyRect, aLists,
- createLayersForScrollbars, true);
+ AppendScrollPartsTo(aBuilder, aLists, createLayersForScrollbars, true);
}
return;
@@ -3376,8 +3383,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// Note that this does not apply for overlay scrollbars; those are drawn
// in the positioned-elements layer on top of everything else by the call
// to AppendScrollPartsTo(..., true) further down.
- AppendScrollPartsTo(aBuilder, aDirtyRect, aLists,
- createLayersForScrollbars, false);
+ AppendScrollPartsTo(aBuilder, aLists, createLayersForScrollbars, false);
const nsStyleDisplay* disp = mOuter->StyleDisplay();
if (disp && (disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_SCROLL)) {
@@ -3506,7 +3512,10 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
scrolledRectClipState.ClipContainingBlockDescendants(
scrolledRectClip + aBuilder->ToReferenceFrame(mOuter));
- mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, dirtyRect, scrolledContent);
+ nsDisplayListBuilder::AutoBuildingDisplayList
+ building(aBuilder, mOuter, dirtyRect, aBuilder->IsAtRootOfPseudoStackingContext());
+
+ mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, scrolledContent);
}
if (contentBoxClipForNonCaretContent) {
@@ -3593,8 +3602,8 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
}
// Now display overlay scrollbars and the resizer, if we have one.
- AppendScrollPartsTo(aBuilder, aDirtyRect, scrolledContent,
- createLayersForScrollbars, true);
+ AppendScrollPartsTo(aBuilder, scrolledContent, createLayersForScrollbars, true);
+
scrolledContent.MoveTo(aLists);
}
@@ -6175,3 +6184,4 @@ ScrollFrameHelper::UsesContainerScrolling() const
}
return false;
}
+
diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h
index 81bbb358f..296867856 100644
--- a/layout/generic/nsGfxScrollFrame.h
+++ b/layout/generic/nsGfxScrollFrame.h
@@ -70,11 +70,9 @@ public:
void Destroy();
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
void AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
bool aCreateLayer,
bool aPositioned);
@@ -687,9 +685,8 @@ public:
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override {
- mHelper.BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ mHelper.BuildDisplayList(aBuilder, aLists);
}
bool TryLayout(ScrollReflowInput* aState,
@@ -1105,9 +1102,8 @@ public:
bool aClipAllDescendants);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override {
- mHelper.BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ mHelper.BuildDisplayList(aBuilder, aLists);
}
// XXXldb Is this actually used?
diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp
index f771c9d7c..d7120d91e 100644
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -6643,12 +6643,11 @@ nsGridContainerFrame::GetType() const
void
nsGridContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
DisplayBorderBackgroundOutline(aBuilder, aLists);
if (GetPrevInFlow()) {
- DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
+ DisplayOverflowContainers(aBuilder, aLists);
}
// Our children are all grid-level boxes, which behave the same as
@@ -6662,8 +6661,7 @@ nsGridContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
GridItemCSSOrderIterator::eIncludeAll, order);
for (; !iter.AtEnd(); iter.Next()) {
nsIFrame* child = *iter;
- BuildDisplayListForChild(aBuilder, child, aDirtyRect, aLists,
- ::GetDisplayFlagsForGridItem(child));
+ BuildDisplayListForChild(aBuilder, child, aLists, ::GetDisplayFlagsForGridItem(child));
}
}
diff --git a/layout/generic/nsGridContainerFrame.h b/layout/generic/nsGridContainerFrame.h
index 960558421..c9163b95c 100644
--- a/layout/generic/nsGridContainerFrame.h
+++ b/layout/generic/nsGridContainerFrame.h
@@ -98,7 +98,6 @@ public:
}
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
nscoord GetLogicalBaseline(mozilla::WritingMode aWM) const override
diff --git a/layout/generic/nsHTMLCanvasFrame.cpp b/layout/generic/nsHTMLCanvasFrame.cpp
index bad3a710f..f86ec1136 100644
--- a/layout/generic/nsHTMLCanvasFrame.cpp
+++ b/layout/generic/nsHTMLCanvasFrame.cpp
@@ -367,7 +367,6 @@ nsHTMLCanvasFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
void
nsHTMLCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
diff --git a/layout/generic/nsHTMLCanvasFrame.h b/layout/generic/nsHTMLCanvasFrame.h
index e4235deae..b2d159627 100644
--- a/layout/generic/nsHTMLCanvasFrame.h
+++ b/layout/generic/nsHTMLCanvasFrame.h
@@ -45,7 +45,6 @@ public:
nsIFrame* aPrevInFlow) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h
index 93eb95099..bfe5d4118 100644
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -1435,21 +1435,14 @@ public:
* BuildDisplayListForChild.
*
* See nsDisplayList.h for more information about display lists.
- *
- * @param aDirtyRect content outside this rectangle can be ignored; the
- * rectangle is in frame coordinates
*/
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {}
/**
* Displays the caret onto the given display list builder. The caret is
* painted on top of the rest of the display list items.
- *
- * @param aDirtyRect is the dirty rectangle that we're repainting.
*/
void DisplayCaret(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
nsDisplayList* aList);
/**
@@ -1483,11 +1476,8 @@ public:
/**
* Builds a display list for the content represented by this frame,
* treating this frame as the root of a stacking context.
- * @param aDirtyRect content outside this rectangle can be ignored; the
- * rectangle is in frame coordinates
*/
void BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
nsDisplayList* aList);
enum {
@@ -1506,7 +1496,6 @@ public:
*/
void BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
nsIFrame* aChild,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
uint32_t aFlags = 0);
@@ -3535,7 +3524,7 @@ private:
nsIFrame* mNextSibling; // doubly-linked list of frames
nsIFrame* mPrevSibling; // Do not touch outside SetNextSibling!
- void MarkAbsoluteFramesForDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect);
+ void MarkAbsoluteFramesForDisplayList(nsDisplayListBuilder* aBuilder);
static void DestroyPaintedPresShellList(nsTArray<nsWeakPtr>* list) {
list->Clear();
diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp
index c64520f2e..342370050 100644
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -1730,7 +1730,6 @@ nsImageFrame::PaintImage(nsRenderingContext& aRenderingContext, nsPoint aPt,
void
nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
diff --git a/layout/generic/nsImageFrame.h b/layout/generic/nsImageFrame.h
index 5bc59c042..fceecc43d 100644
--- a/layout/generic/nsImageFrame.h
+++ b/layout/generic/nsImageFrame.h
@@ -82,7 +82,6 @@ public:
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp
index 7e188c247..fb77422a3 100644
--- a/layout/generic/nsInlineFrame.cpp
+++ b/layout/generic/nsInlineFrame.cpp
@@ -243,10 +243,9 @@ nsInlineFrame::StealFrame(nsIFrame* aChild)
void
nsInlineFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
+ BuildDisplayListForInline(aBuilder, aLists);
// The sole purpose of this is to trigger display of the selection
// window for Named Anchors, which don't have any children and
diff --git a/layout/generic/nsInlineFrame.h b/layout/generic/nsInlineFrame.h
index 36df6be93..c1e0d7fe3 100644
--- a/layout/generic/nsInlineFrame.h
+++ b/layout/generic/nsInlineFrame.h
@@ -31,7 +31,6 @@ public:
// nsIFrame overrides
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
#ifdef ACCESSIBILITY
diff --git a/layout/generic/nsLeafFrame.h b/layout/generic/nsLeafFrame.h
index 407f9846d..7087fb6cf 100644
--- a/layout/generic/nsLeafFrame.h
+++ b/layout/generic/nsLeafFrame.h
@@ -24,7 +24,6 @@ public:
// nsIFrame replacements
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override {
DO_GLOBAL_REFLOW_COUNT_DSP("nsLeafFrame");
DisplayBorderBackgroundOutline(aBuilder, aLists);
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
diff --git a/layout/generic/nsPageFrame.h b/layout/generic/nsPageFrame.h
index aab2ac7b8..86516fe73 100644
--- a/layout/generic/nsPageFrame.h
+++ b/layout/generic/nsPageFrame.h
@@ -29,7 +29,6 @@ public:
nsReflowStatus& aStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
/**
diff --git a/layout/generic/nsPlaceholderFrame.cpp b/layout/generic/nsPlaceholderFrame.cpp
index bd380a2d9..f234b2f2d 100644
--- a/layout/generic/nsPlaceholderFrame.cpp
+++ b/layout/generic/nsPlaceholderFrame.cpp
@@ -240,7 +240,6 @@ PaintDebugPlaceholder(nsIFrame* aFrame, DrawTarget* aDrawTarget,
void
nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
DO_GLOBAL_REFLOW_COUNT_DSP("nsPlaceholderFrame");
diff --git a/layout/generic/nsPlaceholderFrame.h b/layout/generic/nsPlaceholderFrame.h
index 0c23a4f75..11cb98592 100644
--- a/layout/generic/nsPlaceholderFrame.h
+++ b/layout/generic/nsPlaceholderFrame.h
@@ -107,7 +107,6 @@ public:
#if defined(DEBUG) || (defined(MOZ_REFLOW_PERF_DSP) && defined(MOZ_REFLOW_PERF))
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
#endif // DEBUG || (MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF)
diff --git a/layout/generic/nsPluginFrame.cpp b/layout/generic/nsPluginFrame.cpp
index 34ed12d44..6e9e072e7 100644
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -1182,7 +1182,6 @@ nsPluginFrame::IsTransparentMode() const
void
nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// XXX why are we painting collapsed object frames?
diff --git a/layout/generic/nsPluginFrame.h b/layout/generic/nsPluginFrame.h
index 5d9f9f475..57db78acc 100644
--- a/layout/generic/nsPluginFrame.h
+++ b/layout/generic/nsPluginFrame.h
@@ -81,7 +81,6 @@ public:
const ReflowInput* aReflowInput,
nsDidReflowStatus aStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult HandleEvent(nsPresContext* aPresContext,
diff --git a/layout/generic/nsRubyTextFrame.cpp b/layout/generic/nsRubyTextFrame.cpp
index b4a26ff33..2848cb6fc 100644
--- a/layout/generic/nsRubyTextFrame.cpp
+++ b/layout/generic/nsRubyTextFrame.cpp
@@ -63,14 +63,13 @@ nsRubyTextFrame::GetFrameName(nsAString& aResult) const
/* virtual */ void
nsRubyTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (IsAutoHidden()) {
return;
}
- nsRubyContentFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsRubyContentFrame::BuildDisplayList(aBuilder, aLists);
}
/* virtual */ void
diff --git a/layout/generic/nsRubyTextFrame.h b/layout/generic/nsRubyTextFrame.h
index 841b5081f..83c24d49d 100644
--- a/layout/generic/nsRubyTextFrame.h
+++ b/layout/generic/nsRubyTextFrame.h
@@ -34,7 +34,6 @@ public:
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void Reflow(nsPresContext* aPresContext,
diff --git a/layout/generic/nsSimplePageSequenceFrame.cpp b/layout/generic/nsSimplePageSequenceFrame.cpp
index 2e74afc3b..d8ec898a6 100644
--- a/layout/generic/nsSimplePageSequenceFrame.cpp
+++ b/layout/generic/nsSimplePageSequenceFrame.cpp
@@ -808,7 +808,6 @@ ComputePageSequenceTransform(nsIFrame* aFrame, float aAppUnitsPerPixel)
void
nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
DisplayBorderBackgroundOutline(aBuilder, aLists);
@@ -822,13 +821,16 @@ nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
clipState.Clear();
nsIFrame* child = PrincipalChildList().FirstChild();
- nsRect dirty = aDirtyRect;
+ nsRect dirty = aBuilder->GetDirtyRect();
dirty.ScaleInverseRoundOut(PresContext()->GetPrintPreviewScale());
while (child) {
if (child->GetVisualOverflowRectRelativeToParent().Intersects(dirty)) {
- child->BuildDisplayListForStackingContext(aBuilder,
- dirty - child->GetPosition(), &content);
+ nsDisplayListBuilder::AutoBuildingDisplayList
+ buildingForChild(aBuilder, child,
+ dirty - child->GetPosition(),
+ aBuilder->IsAtRootOfPseudoStackingContext());
+ child->BuildDisplayListForStackingContext(aBuilder, &content);
aBuilder->ResetMarkedFramesForDisplayList();
}
child = child->GetNextSibling();
diff --git a/layout/generic/nsSimplePageSequenceFrame.h b/layout/generic/nsSimplePageSequenceFrame.h
index c4e1e84b6..4981c67a8 100644
--- a/layout/generic/nsSimplePageSequenceFrame.h
+++ b/layout/generic/nsSimplePageSequenceFrame.h
@@ -69,7 +69,6 @@ public:
nsReflowStatus& aStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
// nsIPageSequenceFrame
diff --git a/layout/generic/nsSubDocumentFrame.cpp b/layout/generic/nsSubDocumentFrame.cpp
index 47026b73c..215cd5376 100644
--- a/layout/generic/nsSubDocumentFrame.cpp
+++ b/layout/generic/nsSubDocumentFrame.cpp
@@ -327,7 +327,6 @@ WrapBackgroundColorInOwnLayer(nsDisplayListBuilder* aBuilder,
void
nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
@@ -368,7 +367,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
if (rfp) {
- rfp->BuildDisplayList(aBuilder, this, aDirtyRect, aLists);
+ rfp->BuildDisplayList(aBuilder, this, aLists);
return;
}
@@ -393,17 +392,18 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsIFrame* savedIgnoreScrollFrame = nullptr;
if (subdocRootFrame) {
// get the dirty rect relative to the root frame of the subdoc
- dirty = aDirtyRect + GetOffsetToCrossDoc(subdocRootFrame);
+ dirty = aBuilder->GetDirtyRect() + GetOffsetToCrossDoc(subdocRootFrame);
// and convert into the appunits of the subdoc
dirty = dirty.ScaleToOtherAppUnitsRoundOut(parentAPD, subdocAPD);
if (nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame()) {
nsIScrollableFrame* rootScrollableFrame = presShell->GetRootScrollFrameAsScrollable();
MOZ_ASSERT(rootScrollableFrame);
- // Use a copy, so the dirty rect doesn't get modified to the display port.
- nsRect copy = dirty;
+ // Use a copy, so the rects don't get modified.
+ nsRect copyOfDirty = dirty;
haveDisplayPort = rootScrollableFrame->DecideScrollableLayer(aBuilder,
- &copy, /* aAllowCreateDisplayPort = */ true);
+ &copyOfDirty,
+ /* aAllowCreateDisplayPort = */ true);
if (!gfxPrefs::LayoutUseContainersForRootFrames()) {
haveDisplayPort = false;
}
@@ -417,7 +417,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
aBuilder->EnterPresShell(subdocRootFrame, pointerEventsNone);
} else {
- dirty = aDirtyRect;
+ dirty = aBuilder->GetDirtyRect();
}
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
@@ -456,6 +456,13 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nestedClipState.EnterStackingContextContents(true);
}
+ // Invoke AutoBuildingDisplayList to ensure that the correct dirty rect
+ // is used to compute the visible rect if AddCanvasBackgroundColorItem
+ // creates a display item.
+ nsIFrame* frame = subdocRootFrame ? subdocRootFrame : this;
+ nsDisplayListBuilder::AutoBuildingDisplayList
+ building(aBuilder, frame, dirty, true);
+
if (subdocRootFrame) {
nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
nsDisplayListBuilder::AutoCurrentScrollParentIdSetter idSetter(
@@ -466,7 +473,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
aBuilder->SetAncestorHasApzAwareEventHandler(false);
subdocRootFrame->
- BuildDisplayListForStackingContext(aBuilder, dirty, &childItems);
+ BuildDisplayListForStackingContext(aBuilder, &childItems);
}
if (!aBuilder->IsForEventDelivery()) {
@@ -485,15 +492,8 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// painted on the page itself.
if (nsLayoutUtils::NeedsPrintPreviewBackground(presContext)) {
presShell->AddPrintPreviewBackgroundItem(
- *aBuilder, childItems, subdocRootFrame ? subdocRootFrame : this,
- bounds);
+ *aBuilder, childItems, frame, bounds);
} else {
- // Invoke AutoBuildingDisplayList to ensure that the correct dirty rect
- // is used to compute the visible rect if AddCanvasBackgroundColorItem
- // creates a display item.
- nsIFrame* frame = subdocRootFrame ? subdocRootFrame : this;
- nsDisplayListBuilder::AutoBuildingDisplayList
- building(aBuilder, frame, dirty, true);
// Add the canvas background color to the bottom of the list. This
// happens after we've built the list so that AddCanvasBackgroundColorItem
// can monkey with the contents if necessary.
diff --git a/layout/generic/nsSubDocumentFrame.h b/layout/generic/nsSubDocumentFrame.h
index 54f08d4fe..93d908dcc 100644
--- a/layout/generic/nsSubDocumentFrame.h
+++ b/layout/generic/nsSubDocumentFrame.h
@@ -79,7 +79,6 @@ public:
nsReflowStatus& aStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
index 59ef020ce..4bc542626 100644
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -4998,7 +4998,6 @@ nsDisplayText::Paint(nsDisplayListBuilder* aBuilder,
void
nsTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
diff --git a/layout/generic/nsTextFrame.h b/layout/generic/nsTextFrame.h
index 425dbb737..43a4f5f1c 100644
--- a/layout/generic/nsTextFrame.h
+++ b/layout/generic/nsTextFrame.h
@@ -65,7 +65,6 @@ public:
// nsIFrame
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void Init(nsIContent* aContent,
diff --git a/layout/generic/nsVideoFrame.cpp b/layout/generic/nsVideoFrame.cpp
index 9f27684a7..cea209cb5 100644
--- a/layout/generic/nsVideoFrame.cpp
+++ b/layout/generic/nsVideoFrame.cpp
@@ -446,7 +446,6 @@ public:
void
nsVideoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
@@ -482,14 +481,15 @@ nsVideoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// but only want to draw mPosterImage conditionally. Others we
// always add to the display list.
for (nsIFrame* child : mFrames) {
- if (child->GetContent() != mPosterImage || shouldDisplayPoster) {
- child->BuildDisplayListForStackingContext(aBuilder,
- aDirtyRect - child->GetOffsetTo(this),
- aLists.Content());
- } else if (child->GetType() == nsGkAtoms::boxFrame) {
- child->BuildDisplayListForStackingContext(aBuilder,
- aDirtyRect - child->GetOffsetTo(this),
- aLists.Content());
+ if (child->GetContent() != mPosterImage || shouldDisplayPoster ||
+ child->GetType() == nsGkAtoms::boxFrame) {
+
+ nsDisplayListBuilder::AutoBuildingDisplayList
+ buildingForChild(aBuilder, child,
+ aBuilder->GetDirtyRect() - child->GetOffsetTo(this),
+ aBuilder->IsAtRootOfPseudoStackingContext());
+
+ child->BuildDisplayListForStackingContext(aBuilder, aLists.Content());
}
}
}
diff --git a/layout/generic/nsVideoFrame.h b/layout/generic/nsVideoFrame.h
index 36e9f9ac3..d624ae6b9 100644
--- a/layout/generic/nsVideoFrame.h
+++ b/layout/generic/nsVideoFrame.h
@@ -45,7 +45,6 @@ public:
NS_DECL_FRAMEARENA_HELPERS
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
diff --git a/layout/generic/nsViewportFrame.cpp b/layout/generic/nsViewportFrame.cpp
index 20378e766..a37d2a5a7 100644
--- a/layout/generic/nsViewportFrame.cpp
+++ b/layout/generic/nsViewportFrame.cpp
@@ -49,7 +49,6 @@ ViewportFrame::Init(nsIContent* aContent,
void
ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
PROFILER_LABEL("ViewportFrame", "BuildDisplayList",
@@ -59,7 +58,7 @@ ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// make the kid's BorderBackground our own. This ensures that the canvas
// frame's background becomes our own background and therefore appears
// below negative z-index elements.
- BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
+ BuildDisplayListForChild(aBuilder, kid, aLists);
}
nsDisplayList topLayerList;
@@ -110,8 +109,12 @@ BuildDisplayListForTopLayerFrame(nsDisplayListBuilder* aBuilder,
clipState.SetScrollClipForContainingBlockDescendants(
aBuilder, savedOutOfFlowData->mContainingBlockScrollClip);
}
+ nsDisplayListBuilder::AutoBuildingDisplayList
+ buildingForChild(aBuilder, aFrame, dirty,
+ aBuilder->IsAtRootOfPseudoStackingContext());
+
nsDisplayList list;
- aFrame->BuildDisplayListForStackingContext(aBuilder, dirty, &list);
+ aFrame->BuildDisplayListForStackingContext(aBuilder, &list);
aList->AppendToTop(&list);
}
diff --git a/layout/generic/nsViewportFrame.h b/layout/generic/nsViewportFrame.h
index 062de4054..3e5263093 100644
--- a/layout/generic/nsViewportFrame.h
+++ b/layout/generic/nsViewportFrame.h
@@ -56,7 +56,6 @@ public:
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
void BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
diff --git a/layout/ipc/RenderFrameParent.cpp b/layout/ipc/RenderFrameParent.cpp
index 8162d02d7..0f4aa11bb 100644
--- a/layout/ipc/RenderFrameParent.cpp
+++ b/layout/ipc/RenderFrameParent.cpp
@@ -266,7 +266,6 @@ RenderFrameParent::GetLayerTreeId() const
void
RenderFrameParent::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsSubDocumentFrame* aFrame,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// We're the subdoc for <browser remote="true"> and it has
diff --git a/layout/ipc/RenderFrameParent.h b/layout/ipc/RenderFrameParent.h
index 274f8ff6d..f91cfe614 100644
--- a/layout/ipc/RenderFrameParent.h
+++ b/layout/ipc/RenderFrameParent.h
@@ -64,7 +64,6 @@ public:
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsSubDocumentFrame* aFrame,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
diff --git a/layout/mathml/nsMathMLContainerFrame.cpp b/layout/mathml/nsMathMLContainerFrame.cpp
index 93b631c9d..8e22ba204 100644
--- a/layout/mathml/nsMathMLContainerFrame.cpp
+++ b/layout/mathml/nsMathMLContainerFrame.cpp
@@ -618,7 +618,6 @@ nsMathMLContainerFrame::PropagatePresentationDataFromChildAt(nsIFrame* aPa
void
nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// report an error if something wrong was found in this frame
@@ -633,8 +632,7 @@ nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayBorderBackgroundOutline(aBuilder, aLists);
- BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists,
- DISPLAY_CHILD_INLINE);
+ BuildDisplayListForNonBlockChildren(aBuilder, aLists, DISPLAY_CHILD_INLINE);
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
// for visual debug
diff --git a/layout/mathml/nsMathMLContainerFrame.h b/layout/mathml/nsMathMLContainerFrame.h
index 94ccf70d2..61c59a4fe 100644
--- a/layout/mathml/nsMathMLContainerFrame.h
+++ b/layout/mathml/nsMathMLContainerFrame.h
@@ -126,7 +126,6 @@ public:
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual bool ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas) override;
diff --git a/layout/mathml/nsMathMLSelectedFrame.cpp b/layout/mathml/nsMathMLSelectedFrame.cpp
index 2378d0763..11eb14d83 100644
--- a/layout/mathml/nsMathMLSelectedFrame.cpp
+++ b/layout/mathml/nsMathMLSelectedFrame.cpp
@@ -71,14 +71,13 @@ nsMathMLSelectedFrame::SetInitialChildList(ChildListID aListID,
// Only paint the selected child...
void
nsMathMLSelectedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// Report an error if something wrong was found in this frame.
// We can't call nsDisplayMathMLError from here,
// so ask nsMathMLContainerFrame to do the work for us.
if (NS_MATHML_HAS_ERROR(mPresentationData.flags)) {
- nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsMathMLContainerFrame::BuildDisplayList(aBuilder, aLists);
return;
}
@@ -89,7 +88,7 @@ nsMathMLSelectedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// Put the child's background directly onto the content list
nsDisplayListSet set(aLists, aLists.Content());
// The children should be in content order
- BuildDisplayListForChild(aBuilder, childFrame, aDirtyRect, set);
+ BuildDisplayListForChild(aBuilder, childFrame, set);
}
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
diff --git a/layout/mathml/nsMathMLSelectedFrame.h b/layout/mathml/nsMathMLSelectedFrame.h
index ad523a594..872351829 100644
--- a/layout/mathml/nsMathMLSelectedFrame.h
+++ b/layout/mathml/nsMathMLSelectedFrame.h
@@ -26,7 +26,6 @@ public:
ChildListChanged(int32_t aModType) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult
diff --git a/layout/mathml/nsMathMLmencloseFrame.cpp b/layout/mathml/nsMathMLmencloseFrame.cpp
index 64277a92e..236a5ab07 100644
--- a/layout/mathml/nsMathMLmencloseFrame.cpp
+++ b/layout/mathml/nsMathMLmencloseFrame.cpp
@@ -201,12 +201,11 @@ nsMathMLmencloseFrame::TransmitAutomaticData()
void
nsMathMLmencloseFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
/////////////
// paint the menclosed content
- nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsMathMLContainerFrame::BuildDisplayList(aBuilder, aLists);
if (NS_MATHML_HAS_ERROR(mPresentationData.flags))
return;
diff --git a/layout/mathml/nsMathMLmencloseFrame.h b/layout/mathml/nsMathMLmencloseFrame.h
index 82d73b2cf..e9e7a2b0a 100644
--- a/layout/mathml/nsMathMLmencloseFrame.h
+++ b/layout/mathml/nsMathMLmencloseFrame.h
@@ -70,7 +70,6 @@ public:
GetAdditionalStyleContext(int32_t aIndex) const override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
NS_IMETHOD
diff --git a/layout/mathml/nsMathMLmfencedFrame.cpp b/layout/mathml/nsMathMLmfencedFrame.cpp
index a5f5ed4d9..bc663a571 100644
--- a/layout/mathml/nsMathMLmfencedFrame.cpp
+++ b/layout/mathml/nsMathMLmfencedFrame.cpp
@@ -161,12 +161,11 @@ nsMathMLmfencedFrame::CreateFencesAndSeparators(nsPresContext* aPresContext)
void
nsMathMLmfencedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
/////////////
// display the content
- nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsMathMLContainerFrame::BuildDisplayList(aBuilder, aLists);
////////////
// display fences and separators
diff --git a/layout/mathml/nsMathMLmfencedFrame.h b/layout/mathml/nsMathMLmfencedFrame.h
index 2d7535d0c..472e5aed9 100644
--- a/layout/mathml/nsMathMLmfencedFrame.h
+++ b/layout/mathml/nsMathMLmfencedFrame.h
@@ -41,7 +41,6 @@ public:
nsReflowStatus& aStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void
diff --git a/layout/mathml/nsMathMLmfracFrame.cpp b/layout/mathml/nsMathMLmfracFrame.cpp
index 4e74faea2..731cca7d0 100644
--- a/layout/mathml/nsMathMLmfracFrame.cpp
+++ b/layout/mathml/nsMathMLmfracFrame.cpp
@@ -149,12 +149,11 @@ nsMathMLmfracFrame::CalcLineThickness(nsPresContext* aPresContext,
void
nsMathMLmfracFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
/////////////
// paint the numerator and denominator
- nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsMathMLContainerFrame::BuildDisplayList(aBuilder, aLists);
/////////////
// paint the fraction line
diff --git a/layout/mathml/nsMathMLmfracFrame.h b/layout/mathml/nsMathMLmfracFrame.h
index 330a31180..8ced03694 100644
--- a/layout/mathml/nsMathMLmfracFrame.h
+++ b/layout/mathml/nsMathMLmfracFrame.h
@@ -67,7 +67,6 @@ public:
ReflowOutput& aDesiredSize) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult
diff --git a/layout/mathml/nsMathMLmoFrame.cpp b/layout/mathml/nsMathMLmoFrame.cpp
index 591b46309..3ef7b88d0 100644
--- a/layout/mathml/nsMathMLmoFrame.cpp
+++ b/layout/mathml/nsMathMLmoFrame.cpp
@@ -78,14 +78,13 @@ nsMathMLmoFrame::UseMathMLChar()
void
nsMathMLmoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
bool useMathMLChar = UseMathMLChar();
if (!useMathMLChar) {
// let the base class do everything
- nsMathMLTokenFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsMathMLTokenFrame::BuildDisplayList(aBuilder, aLists);
} else {
DisplayBorderBackgroundOutline(aBuilder, aLists);
diff --git a/layout/mathml/nsMathMLmoFrame.h b/layout/mathml/nsMathMLmoFrame.h
index f25107a20..15df62ac2 100644
--- a/layout/mathml/nsMathMLmoFrame.h
+++ b/layout/mathml/nsMathMLmoFrame.h
@@ -29,7 +29,6 @@ public:
GetAdditionalStyleContext(int32_t aIndex) const override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
NS_IMETHOD
diff --git a/layout/mathml/nsMathMLmrootFrame.cpp b/layout/mathml/nsMathMLmrootFrame.cpp
index 4c81bde3d..300adcb91 100644
--- a/layout/mathml/nsMathMLmrootFrame.cpp
+++ b/layout/mathml/nsMathMLmrootFrame.cpp
@@ -77,12 +77,11 @@ nsMathMLmrootFrame::TransmitAutomaticData()
void
nsMathMLmrootFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
/////////////
// paint the content we are square-rooting
- nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsMathMLContainerFrame::BuildDisplayList(aBuilder, aLists);
/////////////
// paint the sqrt symbol
diff --git a/layout/mathml/nsMathMLmrootFrame.h b/layout/mathml/nsMathMLmrootFrame.h
index 0996af26b..ddf6f89a6 100644
--- a/layout/mathml/nsMathMLmrootFrame.h
+++ b/layout/mathml/nsMathMLmrootFrame.h
@@ -51,7 +51,6 @@ public:
ReflowOutput& aDesiredSize) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
uint8_t
diff --git a/layout/svg/SVGFEUnstyledLeafFrame.cpp b/layout/svg/SVGFEUnstyledLeafFrame.cpp
index 083c0f27d..bc9258527 100644
--- a/layout/svg/SVGFEUnstyledLeafFrame.cpp
+++ b/layout/svg/SVGFEUnstyledLeafFrame.cpp
@@ -25,7 +25,6 @@ public:
NS_DECL_FRAMEARENA_HELPERS
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override {}
virtual bool IsFrameOfType(uint32_t aFlags) const override
diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp
index ebb5298b7..fe4df3f4d 100644
--- a/layout/svg/SVGTextFrame.cpp
+++ b/layout/svg/SVGTextFrame.cpp
@@ -3162,7 +3162,6 @@ SVGTextFrame::Init(nsIContent* aContent,
void
SVGTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (NS_SUBTREE_DIRTY(this)) {
diff --git a/layout/svg/SVGTextFrame.h b/layout/svg/SVGTextFrame.h
index 9c672c6a5..508ed1724 100644
--- a/layout/svg/SVGTextFrame.h
+++ b/layout/svg/SVGTextFrame.h
@@ -224,7 +224,6 @@ public:
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
/**
diff --git a/layout/svg/nsSVGClipPathFrame.h b/layout/svg/nsSVGClipPathFrame.h
index 42a8d16ff..046ebb169 100644
--- a/layout/svg/nsSVGClipPathFrame.h
+++ b/layout/svg/nsSVGClipPathFrame.h
@@ -37,7 +37,6 @@ public:
// nsIFrame methods:
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override {}
// nsSVGClipPathFrame methods:
diff --git a/layout/svg/nsSVGContainerFrame.cpp b/layout/svg/nsSVGContainerFrame.cpp
index 15af5da99..5c18cad42 100644
--- a/layout/svg/nsSVGContainerFrame.cpp
+++ b/layout/svg/nsSVGContainerFrame.cpp
@@ -141,7 +141,6 @@ nsSVGDisplayContainerFrame::Init(nsIContent* aContent,
void
nsSVGDisplayContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// mContent could be a XUL element so check for an SVG element before casting
@@ -150,7 +149,7 @@ nsSVGDisplayContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return;
}
DisplayOutline(aBuilder, aLists);
- return BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
+ return BuildDisplayListForNonBlockChildren(aBuilder, aLists);
}
void
diff --git a/layout/svg/nsSVGContainerFrame.h b/layout/svg/nsSVGContainerFrame.h
index f4a01e155..8a6cdd7ce 100644
--- a/layout/svg/nsSVGContainerFrame.h
+++ b/layout/svg/nsSVGContainerFrame.h
@@ -83,7 +83,6 @@ public:
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override {}
virtual bool ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas) override;
@@ -133,7 +132,6 @@ public:
nsIFrame* aPrevInFlow) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual bool IsSVGTransformed(Matrix *aOwnTransform = nullptr,
diff --git a/layout/svg/nsSVGFilterFrame.h b/layout/svg/nsSVGFilterFrame.h
index 223c787f6..f2f321522 100644
--- a/layout/svg/nsSVGFilterFrame.h
+++ b/layout/svg/nsSVGFilterFrame.h
@@ -45,7 +45,6 @@ public:
// nsIFrame methods:
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override {}
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
diff --git a/layout/svg/nsSVGForeignObjectFrame.cpp b/layout/svg/nsSVGForeignObjectFrame.cpp
index afa5912d2..f8584a4f1 100644
--- a/layout/svg/nsSVGForeignObjectFrame.cpp
+++ b/layout/svg/nsSVGForeignObjectFrame.cpp
@@ -163,14 +163,13 @@ nsSVGForeignObjectFrame::Reflow(nsPresContext* aPresContext,
void
nsSVGForeignObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions()) {
return;
}
DisplayOutline(aBuilder, aLists);
- BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
+ BuildDisplayListForNonBlockChildren(aBuilder, aLists);
}
bool
diff --git a/layout/svg/nsSVGForeignObjectFrame.h b/layout/svg/nsSVGForeignObjectFrame.h
index 57df6d5b5..4bb94bdab 100644
--- a/layout/svg/nsSVGForeignObjectFrame.h
+++ b/layout/svg/nsSVGForeignObjectFrame.h
@@ -47,7 +47,6 @@ public:
nsReflowStatus& aStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
/**
diff --git a/layout/svg/nsSVGMarkerFrame.h b/layout/svg/nsSVGMarkerFrame.h
index 22ac01709..187aed140 100644
--- a/layout/svg/nsSVGMarkerFrame.h
+++ b/layout/svg/nsSVGMarkerFrame.h
@@ -52,7 +52,6 @@ public:
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override {}
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
diff --git a/layout/svg/nsSVGMaskFrame.h b/layout/svg/nsSVGMaskFrame.h
index 380306a48..2a9486fa5 100644
--- a/layout/svg/nsSVGMaskFrame.h
+++ b/layout/svg/nsSVGMaskFrame.h
@@ -73,7 +73,6 @@ public:
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override {}
/**
diff --git a/layout/svg/nsSVGOuterSVGFrame.cpp b/layout/svg/nsSVGOuterSVGFrame.cpp
index 306b3de7a..16dfc2b37 100644
--- a/layout/svg/nsSVGOuterSVGFrame.cpp
+++ b/layout/svg/nsSVGOuterSVGFrame.cpp
@@ -734,7 +734,6 @@ nsSVGOuterSVGFrame::AttributeChanged(int32_t aNameSpaceID,
void
nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (GetStateBits() & NS_FRAME_IS_NONDISPLAY) {
@@ -758,7 +757,7 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsDisplayList *contentList = aLists.Content();
nsDisplayListSet set(contentList, contentList, contentList,
contentList, contentList, contentList);
- BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, set);
+ BuildDisplayListForNonBlockChildren(aBuilder, set);
} else if (IsVisibleForPainting(aBuilder) || !aBuilder->IsForPainting()) {
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayOuterSVG(aBuilder, this));
diff --git a/layout/svg/nsSVGOuterSVGFrame.h b/layout/svg/nsSVGOuterSVGFrame.h
index 6d29234ac..ee59b7d1c 100644
--- a/layout/svg/nsSVGOuterSVGFrame.h
+++ b/layout/svg/nsSVGOuterSVGFrame.h
@@ -66,7 +66,6 @@ public:
virtual void UnionChildOverflow(nsOverflowAreas& aOverflowAreas) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void Init(nsIContent* aContent,
diff --git a/layout/svg/nsSVGPaintServerFrame.h b/layout/svg/nsSVGPaintServerFrame.h
index 6b568f872..ff2c6f8b4 100644
--- a/layout/svg/nsSVGPaintServerFrame.h
+++ b/layout/svg/nsSVGPaintServerFrame.h
@@ -58,7 +58,6 @@ public:
// nsIFrame methods:
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override {}
virtual bool IsFrameOfType(uint32_t aFlags) const override
diff --git a/layout/svg/nsSVGPathGeometryFrame.cpp b/layout/svg/nsSVGPathGeometryFrame.cpp
index 32cd0e496..50eec2b92 100644
--- a/layout/svg/nsSVGPathGeometryFrame.cpp
+++ b/layout/svg/nsSVGPathGeometryFrame.cpp
@@ -259,7 +259,6 @@ nsSVGPathGeometryFrame::IsSVGTransformed(gfx::Matrix *aOwnTransform,
void
nsSVGPathGeometryFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions() ||
diff --git a/layout/svg/nsSVGPathGeometryFrame.h b/layout/svg/nsSVGPathGeometryFrame.h
index 6b7c75d97..d2d63f043 100644
--- a/layout/svg/nsSVGPathGeometryFrame.h
+++ b/layout/svg/nsSVGPathGeometryFrame.h
@@ -88,7 +88,6 @@ public:
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
// nsSVGPathGeometryFrame methods
diff --git a/layout/svg/nsSVGStopFrame.cpp b/layout/svg/nsSVGStopFrame.cpp
index 1b75fa102..28875ad25 100644
--- a/layout/svg/nsSVGStopFrame.cpp
+++ b/layout/svg/nsSVGStopFrame.cpp
@@ -36,7 +36,6 @@ public:
#endif
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override {}
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
diff --git a/layout/svg/nsSVGSwitchFrame.cpp b/layout/svg/nsSVGSwitchFrame.cpp
index e68043228..3b71ff3fb 100644
--- a/layout/svg/nsSVGSwitchFrame.cpp
+++ b/layout/svg/nsSVGSwitchFrame.cpp
@@ -45,7 +45,6 @@ public:
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
// nsISVGChildFrame interface:
@@ -94,12 +93,11 @@ nsSVGSwitchFrame::GetType() const
void
nsSVGSwitchFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
nsIFrame* kid = GetActiveChildFrame();
if (kid) {
- BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
+ BuildDisplayListForChild(aBuilder, kid, aLists);
}
}
diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp
index 8b811df1e..64e7d2cfe 100644
--- a/layout/tables/nsTableCellFrame.cpp
+++ b/layout/tables/nsTableCellFrame.cpp
@@ -450,7 +450,6 @@ nsTableCellFrame::ShouldPaintBackground(nsDisplayListBuilder* aBuilder)
void
nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
DO_GLOBAL_REFLOW_COUNT_DSP("nsTableCellFrame");
@@ -506,7 +505,7 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// because that/ would put the child's background in the Content() list
// which isn't right (e.g., would end up on top of our child floats for
// event handling).
- BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
+ BuildDisplayListForChild(aBuilder, kid, aLists);
}
nsIFrame::LogicalSides
diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h
index f626a45b0..a822e309d 100644
--- a/layout/tables/nsTableCellFrame.h
+++ b/layout/tables/nsTableCellFrame.h
@@ -104,7 +104,6 @@ public:
virtual bool NeedsToObserve(const ReflowInput& aReflowInput) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult ProcessBorders(nsTableFrame* aFrame,
diff --git a/layout/tables/nsTableColFrame.cpp b/layout/tables/nsTableColFrame.cpp
index 54b03522b..659f0fd35 100644
--- a/layout/tables/nsTableColFrame.cpp
+++ b/layout/tables/nsTableColFrame.cpp
@@ -110,10 +110,9 @@ nsTableColFrame::Reflow(nsPresContext* aPresContext,
void
nsTableColFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists);
+ nsTableFrame::DisplayGenericTablePart(aBuilder, this, aLists);
}
int32_t nsTableColFrame::GetSpan()
diff --git a/layout/tables/nsTableColFrame.h b/layout/tables/nsTableColFrame.h
index fb989061f..ed6a843b6 100644
--- a/layout/tables/nsTableColFrame.h
+++ b/layout/tables/nsTableColFrame.h
@@ -60,7 +60,6 @@ public:
nsReflowStatus& aStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
/**
diff --git a/layout/tables/nsTableColGroupFrame.cpp b/layout/tables/nsTableColGroupFrame.cpp
index 6ee7f0b24..732783428 100644
--- a/layout/tables/nsTableColGroupFrame.cpp
+++ b/layout/tables/nsTableColGroupFrame.cpp
@@ -385,10 +385,9 @@ nsTableColGroupFrame::Reflow(nsPresContext* aPresContext,
void
nsTableColGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists);
+ nsTableFrame::DisplayGenericTablePart(aBuilder, this, aLists);
}
nsTableColFrame * nsTableColGroupFrame::GetFirstColumn()
diff --git a/layout/tables/nsTableColGroupFrame.h b/layout/tables/nsTableColGroupFrame.h
index b3dfb94e7..88ed67c2a 100644
--- a/layout/tables/nsTableColGroupFrame.h
+++ b/layout/tables/nsTableColGroupFrame.h
@@ -44,7 +44,6 @@ public:
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
/** A colgroup can be caused by three things:
diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp
index 648fa7ddf..99838f217 100644
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -1165,7 +1165,7 @@ nsDisplayTableBorderCollapse::Paint(nsDisplayListBuilder* aBuilder,
/* static */ void
nsTableFrame::GenericTraversal(nsDisplayListBuilder* aBuilder, nsFrame* aFrame,
- const nsRect& aDirtyRect, const nsDisplayListSet& aLists)
+ const nsDisplayListSet& aLists)
{
// This is similar to what nsContainerFrame::BuildDisplayListForNonBlockChildren
// does, except that we allow the children's background and borders to go
@@ -1176,11 +1176,11 @@ nsTableFrame::GenericTraversal(nsDisplayListBuilder* aBuilder, nsFrame* aFrame,
// BorderBackground list anyway. It does affect cell borders though; this
// lets us get cell borders into the nsTableFrame's BorderBackground list.
for (nsIFrame* kid : aFrame->GetChildList(kColGroupList)) {
- aFrame->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
+ aFrame->BuildDisplayListForChild(aBuilder, kid, aLists);
}
for (nsIFrame* kid : aFrame->PrincipalChildList()) {
- aFrame->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
+ aFrame->BuildDisplayListForChild(aBuilder, kid, aLists);
}
}
@@ -1189,7 +1189,6 @@ PaintRowBackground(nsTableRowFrame* aRow,
nsIFrame* aFrame,
nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
- const nsRect& aDirtyRect,
const nsPoint& aOffset = nsPoint())
{
// Compute background rect by iterating over all cell frames.
@@ -1199,7 +1198,7 @@ PaintRowBackground(nsTableRowFrame* aRow,
}
auto cellRect = cell->GetRectRelativeToSelf() + cell->GetNormalPosition() + aOffset;
- if (!aDirtyRect.Intersects(cellRect)) {
+ if (!aBuilder->GetDirtyRect().Intersects(cellRect)) {
continue;
}
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, aFrame, cellRect,
@@ -1214,14 +1213,14 @@ static void
PaintRowGroupBackground(nsTableRowGroupFrame* aRowGroup,
nsIFrame* aFrame,
nsDisplayListBuilder* aBuilder,
- const nsDisplayListSet& aLists,
- const nsRect& aDirtyRect)
+ const nsDisplayListSet& aLists)
{
for (nsTableRowFrame* row = aRowGroup->GetFirstRow(); row; row = row->GetNextRow()) {
- if (!aDirtyRect.Intersects(nsRect(row->GetNormalPosition(), row->GetSize()))) {
+ if (!aBuilder->GetDirtyRect().Intersects(nsRect(row->GetNormalPosition(),
+ row->GetSize()))) {
continue;
}
- PaintRowBackground(row, aFrame, aBuilder, aLists, aDirtyRect, row->GetNormalPosition());
+ PaintRowBackground(row, aFrame, aBuilder, aLists, row->GetNormalPosition());
}
}
@@ -1230,7 +1229,6 @@ PaintRowGroupBackgroundByColIdx(nsTableRowGroupFrame* aRowGroup,
nsIFrame* aFrame,
nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
- const nsRect& aDirtyRect,
const nsTArray<uint32_t>& aColIdx,
const nsPoint& aOffset)
{
@@ -1238,7 +1236,7 @@ PaintRowGroupBackgroundByColIdx(nsTableRowGroupFrame* aRowGroup,
"Must be painting backgrounds for something");
for (nsTableRowFrame* row = aRowGroup->GetFirstRow(); row; row = row->GetNextRow()) {
auto rowPos = row->GetNormalPosition() + aOffset;
- if (!aDirtyRect.Intersects(nsRect(rowPos, row->GetSize()))) {
+ if (!aBuilder->GetDirtyRect().Intersects(nsRect(rowPos, row->GetSize()))) {
continue;
}
for (nsTableCellFrame* cell = row->GetFirstCell(); cell; cell = cell->GetNextCell()) {
@@ -1258,7 +1256,7 @@ PaintRowGroupBackgroundByColIdx(nsTableRowGroupFrame* aRowGroup,
auto cellPos = cell->GetNormalPosition() + rowPos;
auto cellRect = nsRect(cellPos, cell->GetSize());
- if (!aDirtyRect.Intersects(cellRect)) {
+ if (!aBuilder->GetDirtyRect().Intersects(cellRect)) {
continue;
}
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, aFrame, cellRect,
@@ -1341,7 +1339,6 @@ void nsTableFrame::CalcHasBCBorders()
/* static */ void
nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
nsFrame* aFrame,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
DisplayGenericTablePartTraversal aTraversal)
{
@@ -1374,10 +1371,10 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
// See spec at https://drafts.csswg.org/css-tables-3/#drawing-cell-backgrounds
if (aFrame->GetType() == nsGkAtoms::tableRowGroupFrame) {
nsTableRowGroupFrame* rowGroup = static_cast<nsTableRowGroupFrame*>(aFrame);
- PaintRowGroupBackground(rowGroup, aFrame, aBuilder, aLists, aDirtyRect);
+ PaintRowGroupBackground(rowGroup, aFrame, aBuilder, aLists);
} else if (aFrame->GetType() == nsGkAtoms::tableRowFrame) {
nsTableRowFrame* row = static_cast<nsTableRowFrame*>(aFrame);
- PaintRowBackground(row, aFrame, aBuilder, aLists, aDirtyRect);
+ PaintRowBackground(row, aFrame, aBuilder, aLists);
} else if (aFrame->GetType() == nsGkAtoms::tableColGroupFrame) {
// Compute background rect by iterating all cell frame.
nsTableColGroupFrame* colGroup = static_cast<nsTableColGroupFrame*>(aFrame);
@@ -1396,10 +1393,10 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
table->OrderRowGroups(rowGroups);
for (nsTableRowGroupFrame* rowGroup : rowGroups) {
auto offset = rowGroup->GetNormalPosition() - colGroup->GetNormalPosition();
- if (!aDirtyRect.Intersects(nsRect(offset, rowGroup->GetSize()))) {
+ if (!aBuilder->GetDirtyRect().Intersects(nsRect(offset, rowGroup->GetSize()))) {
continue;
}
- PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, aDirtyRect, colIdx, offset);
+ PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, colIdx, offset);
}
}
} else if (aFrame->GetType() == nsGkAtoms::tableColFrame) {
@@ -1415,10 +1412,10 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
auto offset = rowGroup->GetNormalPosition() -
col->GetNormalPosition() -
col->GetTableColGroupFrame()->GetNormalPosition();
- if (!aDirtyRect.Intersects(nsRect(offset, rowGroup->GetSize()))) {
+ if (!aBuilder->GetDirtyRect().Intersects(nsRect(offset, rowGroup->GetSize()))) {
continue;
}
- PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, aDirtyRect, colIdx, offset);
+ PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, colIdx, offset);
}
} else if (isVisible) {
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, aFrame,
@@ -1438,7 +1435,7 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
}
}
- aTraversal(aBuilder, aFrame, aDirtyRect, aLists);
+ aTraversal(aBuilder, aFrame, aLists);
if (isVisible) {
if (isTable) {
@@ -1466,12 +1463,11 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
// SEC: TODO: adjust the rect for captions
void
nsTableFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
DO_GLOBAL_REFLOW_COUNT_DSP_COLOR("nsTableFrame", NS_RGB(255,128,255));
- DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists);
+ DisplayGenericTablePart(aBuilder, this, aLists);
}
nsMargin
diff --git a/layout/tables/nsTableFrame.h b/layout/tables/nsTableFrame.h
index d739faa72..8a2384134 100644
--- a/layout/tables/nsTableFrame.h
+++ b/layout/tables/nsTableFrame.h
@@ -231,9 +231,9 @@ public:
typedef void (* DisplayGenericTablePartTraversal)
(nsDisplayListBuilder* aBuilder, nsFrame* aFrame,
- const nsRect& aDirtyRect, const nsDisplayListSet& aLists);
+ const nsDisplayListSet& aLists);
static void GenericTraversal(nsDisplayListBuilder* aBuilder, nsFrame* aFrame,
- const nsRect& aDirtyRect, const nsDisplayListSet& aLists);
+ const nsDisplayListSet& aLists);
/**
* Helper method to handle display common to table frames, rowgroup frames
@@ -248,7 +248,6 @@ public:
*/
static void DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
nsFrame* aFrame,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
DisplayGenericTablePartTraversal aTraversal = GenericTraversal);
@@ -268,7 +267,6 @@ public:
virtual void GetChildLists(nsTArray<ChildList>* aLists) const override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
/** Get the outer half (i.e., the part outside the height and width of
diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp
index 02b85a141..685f4fdea 100644
--- a/layout/tables/nsTableRowFrame.cpp
+++ b/layout/tables/nsTableRowFrame.cpp
@@ -551,10 +551,9 @@ nsTableRowFrame::CalcBSize(const ReflowInput& aReflowInput)
void
nsTableRowFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists);
+ nsTableFrame::DisplayGenericTablePart(aBuilder, this, aLists);
}
nsIFrame::LogicalSides
diff --git a/layout/tables/nsTableRowFrame.h b/layout/tables/nsTableRowFrame.h
index c53c81ff1..350b4f6f7 100644
--- a/layout/tables/nsTableRowFrame.h
+++ b/layout/tables/nsTableRowFrame.h
@@ -79,7 +79,6 @@ public:
virtual nsMargin GetUsedPadding() const override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
// Implemented in nsTableCellFrame.h, because it needs to know about the
diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp
index 37f577f5c..1b7f029c8 100644
--- a/layout/tables/nsTableRowGroupFrame.cpp
+++ b/layout/tables/nsTableRowGroupFrame.cpp
@@ -156,7 +156,7 @@ nsTableRowGroupFrame::InitRepeatedFrame(nsTableRowGroupFrame* aHeaderFooterFrame
// Handle the child-traversal part of DisplayGenericTablePart
static void
DisplayRows(nsDisplayListBuilder* aBuilder, nsFrame* aFrame,
- const nsRect& aDirtyRect, const nsDisplayListSet& aLists)
+ const nsDisplayListSet& aLists)
{
nscoord overflowAbove;
nsTableRowGroupFrame* f = static_cast<nsTableRowGroupFrame*>(aFrame);
@@ -169,15 +169,15 @@ DisplayRows(nsDisplayListBuilder* aBuilder, nsFrame* aFrame,
// approximate it by checking it for |f|: if it's true for any row
// in |f| then it's true for |f| itself.
nsIFrame* kid = aBuilder->ShouldDescendIntoFrame(f) ?
- nullptr : f->GetFirstRowContaining(aDirtyRect.y, &overflowAbove);
+ nullptr : f->GetFirstRowContaining(aBuilder->GetDirtyRect().y, &overflowAbove);
if (kid) {
// If we have a cursor, use it
while (kid) {
- if (kid->GetRect().y - overflowAbove >= aDirtyRect.YMost()) {
+ if (kid->GetRect().y - overflowAbove >= aBuilder->GetDirtyRect().YMost()) {
break;
}
- f->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
+ f->BuildDisplayListForChild(aBuilder, kid, aLists);
kid = kid->GetNextSibling();
}
return;
@@ -187,7 +187,7 @@ DisplayRows(nsDisplayListBuilder* aBuilder, nsFrame* aFrame,
nsTableRowGroupFrame::FrameCursorData* cursor = f->SetupRowCursor();
kid = f->PrincipalChildList().FirstChild();
while (kid) {
- f->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
+ f->BuildDisplayListForChild(aBuilder, kid, aLists);
if (cursor) {
if (!cursor->AppendFrame(kid)) {
@@ -205,10 +205,9 @@ DisplayRows(nsDisplayListBuilder* aBuilder, nsFrame* aFrame,
void
nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect,
+ nsTableFrame::DisplayGenericTablePart(aBuilder, this,
aLists, DisplayRows);
}
diff --git a/layout/tables/nsTableRowGroupFrame.h b/layout/tables/nsTableRowGroupFrame.h
index 721d91046..eb9f6205e 100644
--- a/layout/tables/nsTableRowGroupFrame.h
+++ b/layout/tables/nsTableRowGroupFrame.h
@@ -75,7 +75,6 @@ public:
virtual nsMargin GetUsedPadding() const override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
/** calls Reflow for all of its child rows.
diff --git a/layout/tables/nsTableWrapperFrame.cpp b/layout/tables/nsTableWrapperFrame.cpp
index da71375d5..043522fb2 100644
--- a/layout/tables/nsTableWrapperFrame.cpp
+++ b/layout/tables/nsTableWrapperFrame.cpp
@@ -168,7 +168,6 @@ nsTableWrapperFrame::RemoveFrame(ChildListID aListID,
void
nsTableWrapperFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// No border, background or outline are painted because they all belong
@@ -177,16 +176,15 @@ nsTableWrapperFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// If there's no caption, take a short cut to avoid having to create
// the special display list set and then sort it.
if (mCaptionFrames.IsEmpty()) {
- BuildDisplayListForInnerTable(aBuilder, aDirtyRect, aLists);
+ BuildDisplayListForInnerTable(aBuilder, aLists);
return;
}
nsDisplayListCollection set;
- BuildDisplayListForInnerTable(aBuilder, aDirtyRect, set);
+ BuildDisplayListForInnerTable(aBuilder, set);
nsDisplayListSet captionSet(set, set.BlockBorderBackgrounds());
- BuildDisplayListForChild(aBuilder, mCaptionFrames.FirstChild(),
- aDirtyRect, captionSet);
+ BuildDisplayListForChild(aBuilder, mCaptionFrames.FirstChild(), captionSet);
// Now we have to sort everything by content order, since the caption
// may be somewhere inside the table
@@ -200,7 +198,6 @@ nsTableWrapperFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
void
nsTableWrapperFrame::BuildDisplayListForInnerTable(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// Just paint the regular children, but the children's background is our
@@ -208,7 +205,7 @@ nsTableWrapperFrame::BuildDisplayListForInnerTable(nsDisplayListBuilder* aBuil
nsIFrame* kid = mFrames.FirstChild();
// The children should be in content order
while (kid) {
- BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
+ BuildDisplayListForChild(aBuilder, kid, aLists);
kid = kid->GetNextSibling();
}
}
diff --git a/layout/tables/nsTableWrapperFrame.h b/layout/tables/nsTableWrapperFrame.h
index 45d7c33e4..8095c7fc4 100644
--- a/layout/tables/nsTableWrapperFrame.h
+++ b/layout/tables/nsTableWrapperFrame.h
@@ -59,11 +59,9 @@ public:
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
void BuildDisplayListForInnerTable(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const override;
diff --git a/layout/xul/nsBoxFrame.cpp b/layout/xul/nsBoxFrame.cpp
index 9ca351d94..131f3afc7 100644
--- a/layout/xul/nsBoxFrame.cpp
+++ b/layout/xul/nsBoxFrame.cpp
@@ -1310,7 +1310,6 @@ PaintXULDebugBackground(nsIFrame* aFrame, DrawTarget* aDrawTarget,
void
nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
bool forceLayer = false;
@@ -1344,7 +1343,7 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
#endif
- BuildDisplayListForChildren(aBuilder, aDirtyRect, destination);
+ BuildDisplayListForChildren(aBuilder, destination);
// see if we have to draw a selection frame around this container
DisplaySelectionOverlay(aBuilder, destination.Content());
@@ -1370,7 +1369,6 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
void
nsBoxFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
nsIFrame* kid = mFrames.FirstChild();
@@ -1379,7 +1377,7 @@ nsBoxFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
nsDisplayListSet set(aLists, aLists.BlockBorderBackgrounds());
// The children should be in the right order
while (kid) {
- BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set);
+ BuildDisplayListForChild(aBuilder, kid, set);
kid = kid->GetNextSibling();
}
}
diff --git a/layout/xul/nsBoxFrame.h b/layout/xul/nsBoxFrame.h
index ad405222f..7b15f4f5e 100644
--- a/layout/xul/nsBoxFrame.h
+++ b/layout/xul/nsBoxFrame.h
@@ -148,11 +148,9 @@ public:
// virtual so nsStackFrame, nsButtonBoxFrame, nsSliderFrame and nsMenuFrame
// can override it
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
#ifdef DEBUG_LAYOUT
diff --git a/layout/xul/nsButtonBoxFrame.cpp b/layout/xul/nsButtonBoxFrame.cpp
index e69c91929..ba0b7fb2a 100644
--- a/layout/xul/nsButtonBoxFrame.cpp
+++ b/layout/xul/nsButtonBoxFrame.cpp
@@ -92,13 +92,12 @@ nsButtonBoxFrame::DestroyFrom(nsIFrame* aDestructRoot)
void
nsButtonBoxFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// override, since we don't want children to get events
if (aBuilder->IsForEventDelivery())
return;
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aLists);
}
nsresult
diff --git a/layout/xul/nsButtonBoxFrame.h b/layout/xul/nsButtonBoxFrame.h
index e9bfd99a5..0dc8b517f 100644
--- a/layout/xul/nsButtonBoxFrame.h
+++ b/layout/xul/nsButtonBoxFrame.h
@@ -23,7 +23,6 @@ public:
nsIFrame* aPrevInFlow) override;
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
diff --git a/layout/xul/nsDeckFrame.cpp b/layout/xul/nsDeckFrame.cpp
index b0c0296b2..91359c177 100644
--- a/layout/xul/nsDeckFrame.cpp
+++ b/layout/xul/nsDeckFrame.cpp
@@ -145,14 +145,13 @@ nsDeckFrame::GetSelectedBox()
void
nsDeckFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// if a tab is hidden all its children are too.
if (!StyleVisibility()->mVisible)
return;
- nsBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsBoxFrame::BuildDisplayList(aBuilder, aLists);
}
void
@@ -185,7 +184,6 @@ nsDeckFrame::RemoveFrame(ChildListID aListID,
void
nsDeckFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// only paint the selected box
@@ -196,7 +194,7 @@ nsDeckFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
// Putting the child in the background list. This is a little weird but
// it matches what we were doing before.
nsDisplayListSet set(aLists, aLists.BlockBorderBackgrounds());
- BuildDisplayListForChild(aBuilder, box, aDirtyRect, set);
+ BuildDisplayListForChild(aBuilder, box, set);
}
NS_IMETHODIMP
diff --git a/layout/xul/nsDeckFrame.h b/layout/xul/nsDeckFrame.h
index 2c7ae1445..143745236 100644
--- a/layout/xul/nsDeckFrame.h
+++ b/layout/xul/nsDeckFrame.h
@@ -34,14 +34,12 @@ public:
NS_IMETHOD DoXULLayout(nsBoxLayoutState& aState) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void RemoveFrame(ChildListID aListID,
nsIFrame* aOldFrame) override;
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void Init(nsIContent* aContent,
diff --git a/layout/xul/nsGroupBoxFrame.cpp b/layout/xul/nsGroupBoxFrame.cpp
index 514287a24..fcdc1d190 100644
--- a/layout/xul/nsGroupBoxFrame.cpp
+++ b/layout/xul/nsGroupBoxFrame.cpp
@@ -28,7 +28,6 @@ public:
virtual nsresult GetXULBorderAndPadding(nsMargin& aBorderAndPadding) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
#ifdef DEBUG_FRAME_DUMP
@@ -145,7 +144,6 @@ nsDisplayXULGroupBorder::Paint(nsDisplayListBuilder* aBuilder,
void
nsGroupBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// Paint our background and border
@@ -159,7 +157,7 @@ nsGroupBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayOutline(aBuilder, aLists);
}
- BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
+ BuildDisplayListForChildren(aBuilder, aLists);
}
nsRect
diff --git a/layout/xul/nsImageBoxFrame.cpp b/layout/xul/nsImageBoxFrame.cpp
index fd7c7becf..e88b502ab 100644
--- a/layout/xul/nsImageBoxFrame.cpp
+++ b/layout/xul/nsImageBoxFrame.cpp
@@ -320,10 +320,9 @@ nsImageBoxFrame::UpdateLoadFlags()
void
nsImageBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- nsLeafBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsLeafBoxFrame::BuildDisplayList(aBuilder, aLists);
if ((0 == mRect.width) || (0 == mRect.height)) {
// Do not render when given a zero area. This avoids some useless
diff --git a/layout/xul/nsImageBoxFrame.h b/layout/xul/nsImageBoxFrame.h
index 7faccccae..46c8d5614 100644
--- a/layout/xul/nsImageBoxFrame.h
+++ b/layout/xul/nsImageBoxFrame.h
@@ -87,7 +87,6 @@ public:
void UpdateLoadFlags();
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual ~nsImageBoxFrame();
diff --git a/layout/xul/nsLeafBoxFrame.cpp b/layout/xul/nsLeafBoxFrame.cpp
index 6d1783c11..8342b7485 100644
--- a/layout/xul/nsLeafBoxFrame.cpp
+++ b/layout/xul/nsLeafBoxFrame.cpp
@@ -106,7 +106,6 @@ void nsLeafBoxFrame::UpdateMouseThrough()
void
nsLeafBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// REVIEW: GetFrameForPoint used to not report events for the background
diff --git a/layout/xul/nsLeafBoxFrame.h b/layout/xul/nsLeafBoxFrame.h
index 8aea598c8..7a63d9a79 100644
--- a/layout/xul/nsLeafBoxFrame.h
+++ b/layout/xul/nsLeafBoxFrame.h
@@ -64,7 +64,6 @@ public:
nsIFrame* asPrevInFlow) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
diff --git a/layout/xul/nsListItemFrame.cpp b/layout/xul/nsListItemFrame.cpp
index 1776f1b6c..720df3827 100644
--- a/layout/xul/nsListItemFrame.cpp
+++ b/layout/xul/nsListItemFrame.cpp
@@ -39,7 +39,6 @@ nsListItemFrame::GetXULPrefSize(nsBoxLayoutState& aState)
void
nsListItemFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (aBuilder->IsForEventDelivery()) {
@@ -48,7 +47,7 @@ nsListItemFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
return;
}
- nsGridRowLeafFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
+ nsGridRowLeafFrame::BuildDisplayListForChildren(aBuilder, aLists);
}
// Creation Routine ///////////////////////////////////////////////////////////////////////
diff --git a/layout/xul/nsListItemFrame.h b/layout/xul/nsListItemFrame.h
index 40e731efa..aa41dbbbf 100644
--- a/layout/xul/nsListItemFrame.h
+++ b/layout/xul/nsListItemFrame.h
@@ -20,7 +20,6 @@ public:
// overridden so that children of listitems don't handle mouse events,
// unless allowevents="true" is specified on the listitem
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsSize GetXULPrefSize(nsBoxLayoutState& aState) override;
diff --git a/layout/xul/nsMenuFrame.cpp b/layout/xul/nsMenuFrame.cpp
index cb12dfc0a..c3347486e 100644
--- a/layout/xul/nsMenuFrame.cpp
+++ b/layout/xul/nsMenuFrame.cpp
@@ -357,16 +357,15 @@ nsMenuFrame::DestroyFrom(nsIFrame* aDestructRoot)
void
nsMenuFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!aBuilder->IsForEventDelivery()) {
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aLists);
return;
}
nsDisplayListCollection set;
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, set);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, set);
WrapListsInRedirector(aBuilder, set, aLists);
}
diff --git a/layout/xul/nsMenuFrame.h b/layout/xul/nsMenuFrame.h
index 1941ec69e..43cbd0a04 100644
--- a/layout/xul/nsMenuFrame.h
+++ b/layout/xul/nsMenuFrame.h
@@ -101,7 +101,6 @@ public:
// Overridden to prevent events from going to children of the menu.
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
// this method can destroy the frame
diff --git a/layout/xul/nsRootBoxFrame.cpp b/layout/xul/nsRootBoxFrame.cpp
index fe41dce52..3e7515ea8 100644
--- a/layout/xul/nsRootBoxFrame.cpp
+++ b/layout/xul/nsRootBoxFrame.cpp
@@ -8,6 +8,7 @@
#include "nsGkAtoms.h"
#include "nsIPresShell.h"
#include "nsBoxFrame.h"
+#include "nsDisplayList.h"
#include "nsStackLayout.h"
#include "nsIRootBox.h"
#include "nsIContent.h"
@@ -75,7 +76,6 @@ public:
nsEventStatus* aEventStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
/**
@@ -176,14 +176,14 @@ nsRootBoxFrame::Reflow(nsPresContext* aPresContext,
void
nsRootBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (mContent && mContent->GetProperty(nsGkAtoms::DisplayPortMargins)) {
// The XUL document's root element may have displayport margins set in
// ChromeProcessController::InitializeRoot, and we should to supply the
// base rect.
- nsRect displayPortBase = aDirtyRect.Intersect(nsRect(nsPoint(0, 0), GetSize()));
+ nsRect displayPortBase =
+ aBuilder->GetDirtyRect().Intersect(nsRect(nsPoint(0, 0), GetSize()));
nsLayoutUtils::SetDisplayPortBase(mContent, displayPortBase);
}
@@ -192,7 +192,7 @@ nsRootBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// of a background display list element.
DisplayBorderBackgroundOutline(aBuilder, aLists, true);
- BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
+ BuildDisplayListForChildren(aBuilder, aLists);
}
nsresult
diff --git a/layout/xul/nsSliderFrame.cpp b/layout/xul/nsSliderFrame.cpp
index 3c1f9ef91..a2098144c 100644
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -311,7 +311,6 @@ nsSliderFrame::AttributeChanged(int32_t aNameSpaceID,
void
nsSliderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (aBuilder->IsForEventDelivery() && isDraggingThumb()) {
@@ -322,12 +321,11 @@ nsSliderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return;
}
- nsBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsBoxFrame::BuildDisplayList(aBuilder, aLists);
}
void
nsSliderFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// if we are too small to have a thumb don't paint it.
@@ -361,7 +359,7 @@ nsSliderFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
if (thumbGetsLayer) {
nsDisplayListCollection tempLists;
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, tempLists);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, tempLists);
// This is a bit of a hack. Collect up all descendant display items
// and merge them into a single Content() list.
@@ -382,7 +380,7 @@ nsSliderFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
}
}
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aLists);
}
NS_IMETHODIMP
diff --git a/layout/xul/nsSliderFrame.h b/layout/xul/nsSliderFrame.h
index 832065a21..e4b68fc01 100644
--- a/layout/xul/nsSliderFrame.h
+++ b/layout/xul/nsSliderFrame.h
@@ -64,11 +64,9 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
diff --git a/layout/xul/nsSplitterFrame.cpp b/layout/xul/nsSplitterFrame.cpp
index 7879a176d..468ccc682 100644
--- a/layout/xul/nsSplitterFrame.cpp
+++ b/layout/xul/nsSplitterFrame.cpp
@@ -358,10 +358,9 @@ nsSplitterFrame::HandleRelease(nsPresContext* aPresContext,
void
nsSplitterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- nsBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsBoxFrame::BuildDisplayList(aBuilder, aLists);
// if the mouse is captured always return us as the frame.
if (mInner->mDragging)
diff --git a/layout/xul/nsSplitterFrame.h b/layout/xul/nsSplitterFrame.h
index df8872255..fa1c7525f 100644
--- a/layout/xul/nsSplitterFrame.h
+++ b/layout/xul/nsSplitterFrame.h
@@ -68,7 +68,6 @@ public:
nsEventStatus* aEventStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void GetInitialOrientation(bool& aIsHorizontal) override;
diff --git a/layout/xul/nsStackFrame.cpp b/layout/xul/nsStackFrame.cpp
index 437d558f9..a2ec57adc 100644
--- a/layout/xul/nsStackFrame.cpp
+++ b/layout/xul/nsStackFrame.cpp
@@ -45,7 +45,6 @@ nsStackFrame::nsStackFrame(nsStyleContext* aContext):
// a bit more.
void
nsStackFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// BuildDisplayListForChild puts stacking contexts into the PositionedDescendants
@@ -56,8 +55,7 @@ nsStackFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
nsIFrame* kid = mFrames.FirstChild();
while (kid) {
// Force each child into its own true stacking context.
- BuildDisplayListForChild(aBuilder, kid, aDirtyRect, kidLists,
- DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
+ BuildDisplayListForChild(aBuilder, kid, kidLists, DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
kid = kid->GetNextSibling();
}
}
diff --git a/layout/xul/nsStackFrame.h b/layout/xul/nsStackFrame.h
index b90a16b21..a81a62281 100644
--- a/layout/xul/nsStackFrame.h
+++ b/layout/xul/nsStackFrame.h
@@ -33,7 +33,6 @@ public:
#endif
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
protected:
diff --git a/layout/xul/nsTextBoxFrame.cpp b/layout/xul/nsTextBoxFrame.cpp
index c82d3d6b9..e1650e0d0 100644
--- a/layout/xul/nsTextBoxFrame.cpp
+++ b/layout/xul/nsTextBoxFrame.cpp
@@ -364,13 +364,12 @@ nsDisplayXULTextBox::GetComponentAlphaBounds(nsDisplayListBuilder* aBuilder)
void
nsTextBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
return;
- nsLeafBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsLeafBoxFrame::BuildDisplayList(aBuilder, aLists);
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayXULTextBox(aBuilder, this));
diff --git a/layout/xul/nsTextBoxFrame.h b/layout/xul/nsTextBoxFrame.h
index ca1b88748..e12b97b32 100644
--- a/layout/xul/nsTextBoxFrame.h
+++ b/layout/xul/nsTextBoxFrame.h
@@ -48,7 +48,6 @@ public:
bool& aRedraw);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual ~nsTextBoxFrame();
diff --git a/layout/xul/nsTitleBarFrame.cpp b/layout/xul/nsTitleBarFrame.cpp
index 2792403dc..2f58abecb 100644
--- a/layout/xul/nsTitleBarFrame.cpp
+++ b/layout/xul/nsTitleBarFrame.cpp
@@ -42,7 +42,6 @@ nsTitleBarFrame::nsTitleBarFrame(nsStyleContext* aContext)
void
nsTitleBarFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// override, since we don't want children to get events
@@ -51,7 +50,7 @@ nsTitleBarFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
nsGkAtoms::_true, eCaseMatters))
return;
}
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aLists);
}
nsresult
diff --git a/layout/xul/nsTitleBarFrame.h b/layout/xul/nsTitleBarFrame.h
index 17279c578..594d0978b 100644
--- a/layout/xul/nsTitleBarFrame.h
+++ b/layout/xul/nsTitleBarFrame.h
@@ -19,7 +19,6 @@ public:
explicit nsTitleBarFrame(nsStyleContext* aContext);
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult HandleEvent(nsPresContext* aPresContext,
diff --git a/layout/xul/tree/nsTreeBodyFrame.cpp b/layout/xul/tree/nsTreeBodyFrame.cpp
index deba04a36..608d802ea 100644
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -2824,7 +2824,6 @@ public:
// Painting routines
void
nsTreeBodyFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// REVIEW: why did we paint if we were collapsed? that makes no sense!
@@ -2832,7 +2831,7 @@ nsTreeBodyFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return; // We're invisible. Don't paint.
// Handles painting our background, border, and outline.
- nsLeafBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsLeafBoxFrame::BuildDisplayList(aBuilder, aLists);
// Bail out now if there's no view or we can't run script because the
// document is a zombie
diff --git a/layout/xul/tree/nsTreeBodyFrame.h b/layout/xul/tree/nsTreeBodyFrame.h
index 9620c8ccb..6838b0157 100644
--- a/layout/xul/tree/nsTreeBodyFrame.h
+++ b/layout/xul/tree/nsTreeBodyFrame.h
@@ -177,7 +177,6 @@ public:
nsEventStatus* aEventStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) override;
diff --git a/layout/xul/tree/nsTreeColFrame.cpp b/layout/xul/tree/nsTreeColFrame.cpp
index 649c0b0b4..5fea7947f 100644
--- a/layout/xul/tree/nsTreeColFrame.cpp
+++ b/layout/xul/tree/nsTreeColFrame.cpp
@@ -110,16 +110,15 @@ nsDisplayXULTreeColSplitterTarget::HitTest(nsDisplayListBuilder* aBuilder, const
void
nsTreeColFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!aBuilder->IsForEventDelivery()) {
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aLists);
return;
}
nsDisplayListCollection set;
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, set);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, set);
WrapListsInRedirector(aBuilder, set, aLists);
diff --git a/layout/xul/tree/nsTreeColFrame.h b/layout/xul/tree/nsTreeColFrame.h
index 8fc3219d5..ebd16fa52 100644
--- a/layout/xul/tree/nsTreeColFrame.h
+++ b/layout/xul/tree/nsTreeColFrame.h
@@ -26,7 +26,6 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult AttributeChanged(int32_t aNameSpaceID,