summaryrefslogtreecommitdiffstats
path: root/layout/xul
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-02-26 20:51:22 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-02-26 20:51:22 +0100
commit793da7dd6238ce156e29c71304e24b2c05edc11d (patch)
tree89aaa5542c8930a139a76d6b82959d70500556e5 /layout/xul
parent16abf27e653d0a845abeb542d611984a629160d2 (diff)
downloadUXP-793da7dd6238ce156e29c71304e24b2c05edc11d.tar
UXP-793da7dd6238ce156e29c71304e24b2c05edc11d.tar.gz
UXP-793da7dd6238ce156e29c71304e24b2c05edc11d.tar.lz
UXP-793da7dd6238ce156e29c71304e24b2c05edc11d.tar.xz
UXP-793da7dd6238ce156e29c71304e24b2c05edc11d.zip
Revert "Issue #1355 - Better way to create display items for column backgrounds"
This reverts commit 44c47c50388f526c2d134e16d5debebe94a0faf8.
Diffstat (limited to 'layout/xul')
-rw-r--r--layout/xul/nsBoxFrame.cpp8
-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.cpp7
-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.cpp7
-rw-r--r--layout/xul/nsMenuFrame.h1
-rw-r--r--layout/xul/nsRootBoxFrame.cpp7
-rw-r--r--layout/xul/nsSliderFrame.cpp10
-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.cpp7
-rw-r--r--layout/xul/tree/nsTreeColFrame.h1
30 files changed, 66 insertions, 29 deletions
diff --git a/layout/xul/nsBoxFrame.cpp b/layout/xul/nsBoxFrame.cpp
index 9982a39f7..9ca351d94 100644
--- a/layout/xul/nsBoxFrame.cpp
+++ b/layout/xul/nsBoxFrame.cpp
@@ -1310,6 +1310,7 @@ PaintXULDebugBackground(nsIFrame* aFrame, DrawTarget* aDrawTarget,
void
nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
bool forceLayer = false;
@@ -1328,7 +1329,7 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
}
- nsDisplayListCollection tempLists (aBuilder);
+ nsDisplayListCollection tempLists;
const nsDisplayListSet& destination = forceLayer ? tempLists : aLists;
DisplayBorderBackgroundOutline(aBuilder, destination);
@@ -1343,7 +1344,7 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
#endif
- BuildDisplayListForChildren(aBuilder, destination);
+ BuildDisplayListForChildren(aBuilder, aDirtyRect, destination);
// see if we have to draw a selection frame around this container
DisplaySelectionOverlay(aBuilder, destination.Content());
@@ -1369,6 +1370,7 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
void
nsBoxFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
nsIFrame* kid = mFrames.FirstChild();
@@ -1377,7 +1379,7 @@ nsBoxFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
nsDisplayListSet set(aLists, aLists.BlockBorderBackgrounds());
// The children should be in the right order
while (kid) {
- BuildDisplayListForChild(aBuilder, kid, set);
+ BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set);
kid = kid->GetNextSibling();
}
}
diff --git a/layout/xul/nsBoxFrame.h b/layout/xul/nsBoxFrame.h
index 7b15f4f5e..ad405222f 100644
--- a/layout/xul/nsBoxFrame.h
+++ b/layout/xul/nsBoxFrame.h
@@ -148,9 +148,11 @@ 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 4f2a7cbe1..45d934516 100644
--- a/layout/xul/nsButtonBoxFrame.cpp
+++ b/layout/xul/nsButtonBoxFrame.cpp
@@ -91,12 +91,13 @@ 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, aLists);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
}
nsresult
diff --git a/layout/xul/nsButtonBoxFrame.h b/layout/xul/nsButtonBoxFrame.h
index 0dc8b517f..e9bfd99a5 100644
--- a/layout/xul/nsButtonBoxFrame.h
+++ b/layout/xul/nsButtonBoxFrame.h
@@ -23,6 +23,7 @@ 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 91359c177..b0c0296b2 100644
--- a/layout/xul/nsDeckFrame.cpp
+++ b/layout/xul/nsDeckFrame.cpp
@@ -145,13 +145,14 @@ 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, aLists);
+ nsBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
}
void
@@ -184,6 +185,7 @@ nsDeckFrame::RemoveFrame(ChildListID aListID,
void
nsDeckFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// only paint the selected box
@@ -194,7 +196,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, set);
+ BuildDisplayListForChild(aBuilder, box, aDirtyRect, set);
}
NS_IMETHODIMP
diff --git a/layout/xul/nsDeckFrame.h b/layout/xul/nsDeckFrame.h
index 143745236..2c7ae1445 100644
--- a/layout/xul/nsDeckFrame.h
+++ b/layout/xul/nsDeckFrame.h
@@ -34,12 +34,14 @@ 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 df3955cf3..514287a24 100644
--- a/layout/xul/nsGroupBoxFrame.cpp
+++ b/layout/xul/nsGroupBoxFrame.cpp
@@ -28,6 +28,7 @@ public:
virtual nsresult GetXULBorderAndPadding(nsMargin& aBorderAndPadding) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
#ifdef DEBUG_FRAME_DUMP
@@ -144,13 +145,13 @@ nsDisplayXULGroupBorder::Paint(nsDisplayListBuilder* aBuilder,
void
nsGroupBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// Paint our background and border
if (IsVisibleForPainting(aBuilder)) {
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
- aBuilder, this,
- GetBackgroundRectRelativeToSelf() + aBuilder->ToReferenceFrame(this),
+ aBuilder, this, GetBackgroundRectRelativeToSelf(),
aLists.BorderBackground());
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
nsDisplayXULGroupBorder(aBuilder, this));
@@ -158,7 +159,7 @@ nsGroupBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayOutline(aBuilder, aLists);
}
- BuildDisplayListForChildren(aBuilder, aLists);
+ BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
}
nsRect
diff --git a/layout/xul/nsImageBoxFrame.cpp b/layout/xul/nsImageBoxFrame.cpp
index e88b502ab..fd7c7becf 100644
--- a/layout/xul/nsImageBoxFrame.cpp
+++ b/layout/xul/nsImageBoxFrame.cpp
@@ -320,9 +320,10 @@ nsImageBoxFrame::UpdateLoadFlags()
void
nsImageBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- nsLeafBoxFrame::BuildDisplayList(aBuilder, aLists);
+ nsLeafBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, 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 46c8d5614..7faccccae 100644
--- a/layout/xul/nsImageBoxFrame.h
+++ b/layout/xul/nsImageBoxFrame.h
@@ -87,6 +87,7 @@ 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 8342b7485..6d1783c11 100644
--- a/layout/xul/nsLeafBoxFrame.cpp
+++ b/layout/xul/nsLeafBoxFrame.cpp
@@ -106,6 +106,7 @@ 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 7a63d9a79..8aea598c8 100644
--- a/layout/xul/nsLeafBoxFrame.h
+++ b/layout/xul/nsLeafBoxFrame.h
@@ -64,6 +64,7 @@ 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 720df3827..1776f1b6c 100644
--- a/layout/xul/nsListItemFrame.cpp
+++ b/layout/xul/nsListItemFrame.cpp
@@ -39,6 +39,7 @@ nsListItemFrame::GetXULPrefSize(nsBoxLayoutState& aState)
void
nsListItemFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (aBuilder->IsForEventDelivery()) {
@@ -47,7 +48,7 @@ nsListItemFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
return;
}
- nsGridRowLeafFrame::BuildDisplayListForChildren(aBuilder, aLists);
+ nsGridRowLeafFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
}
// Creation Routine ///////////////////////////////////////////////////////////////////////
diff --git a/layout/xul/nsListItemFrame.h b/layout/xul/nsListItemFrame.h
index aa41dbbbf..40e731efa 100644
--- a/layout/xul/nsListItemFrame.h
+++ b/layout/xul/nsListItemFrame.h
@@ -20,6 +20,7 @@ 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 6bd5b44ff..67fcdbe43 100644
--- a/layout/xul/nsMenuFrame.cpp
+++ b/layout/xul/nsMenuFrame.cpp
@@ -356,15 +356,16 @@ nsMenuFrame::DestroyFrom(nsIFrame* aDestructRoot)
void
nsMenuFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!aBuilder->IsForEventDelivery()) {
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aLists);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
return;
}
- nsDisplayListCollection set (aBuilder);
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, set);
+ nsDisplayListCollection set;
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, set);
WrapListsInRedirector(aBuilder, set, aLists);
}
diff --git a/layout/xul/nsMenuFrame.h b/layout/xul/nsMenuFrame.h
index 43cbd0a04..1941ec69e 100644
--- a/layout/xul/nsMenuFrame.h
+++ b/layout/xul/nsMenuFrame.h
@@ -101,6 +101,7 @@ 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 26e94faea..fe41dce52 100644
--- a/layout/xul/nsRootBoxFrame.cpp
+++ b/layout/xul/nsRootBoxFrame.cpp
@@ -75,6 +75,7 @@ public:
nsEventStatus* aEventStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
/**
@@ -175,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 =
- aBuilder->GetVisibleRect().Intersect(nsRect(nsPoint(0, 0), GetSize()));
+ nsRect displayPortBase = aDirtyRect.Intersect(nsRect(nsPoint(0, 0), GetSize()));
nsLayoutUtils::SetDisplayPortBase(mContent, displayPortBase);
}
@@ -191,7 +192,7 @@ nsRootBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// of a background display list element.
DisplayBorderBackgroundOutline(aBuilder, aLists, true);
- BuildDisplayListForChildren(aBuilder, aLists);
+ BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
}
nsresult
diff --git a/layout/xul/nsSliderFrame.cpp b/layout/xul/nsSliderFrame.cpp
index db2218944..3c1f9ef91 100644
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -311,6 +311,7 @@ nsSliderFrame::AttributeChanged(int32_t aNameSpaceID,
void
nsSliderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (aBuilder->IsForEventDelivery() && isDraggingThumb()) {
@@ -321,11 +322,12 @@ nsSliderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return;
}
- nsBoxFrame::BuildDisplayList(aBuilder, aLists);
+ nsBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, 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.
@@ -358,8 +360,8 @@ nsSliderFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
nsLayoutUtils::SetScrollbarThumbLayerization(thumb, thumbGetsLayer);
if (thumbGetsLayer) {
- nsDisplayListCollection tempLists (aBuilder);
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, tempLists);
+ nsDisplayListCollection tempLists;
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, tempLists);
// This is a bit of a hack. Collect up all descendant display items
// and merge them into a single Content() list.
@@ -380,7 +382,7 @@ nsSliderFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
}
}
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aLists);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
}
NS_IMETHODIMP
diff --git a/layout/xul/nsSliderFrame.h b/layout/xul/nsSliderFrame.h
index e4b68fc01..832065a21 100644
--- a/layout/xul/nsSliderFrame.h
+++ b/layout/xul/nsSliderFrame.h
@@ -64,9 +64,11 @@ 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 468ccc682..7879a176d 100644
--- a/layout/xul/nsSplitterFrame.cpp
+++ b/layout/xul/nsSplitterFrame.cpp
@@ -358,9 +358,10 @@ nsSplitterFrame::HandleRelease(nsPresContext* aPresContext,
void
nsSplitterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- nsBoxFrame::BuildDisplayList(aBuilder, aLists);
+ nsBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, 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 fa1c7525f..df8872255 100644
--- a/layout/xul/nsSplitterFrame.h
+++ b/layout/xul/nsSplitterFrame.h
@@ -68,6 +68,7 @@ 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 a2ec57adc..437d558f9 100644
--- a/layout/xul/nsStackFrame.cpp
+++ b/layout/xul/nsStackFrame.cpp
@@ -45,6 +45,7 @@ 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
@@ -55,7 +56,8 @@ nsStackFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
nsIFrame* kid = mFrames.FirstChild();
while (kid) {
// Force each child into its own true stacking context.
- BuildDisplayListForChild(aBuilder, kid, kidLists, DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
+ BuildDisplayListForChild(aBuilder, kid, aDirtyRect, kidLists,
+ DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
kid = kid->GetNextSibling();
}
}
diff --git a/layout/xul/nsStackFrame.h b/layout/xul/nsStackFrame.h
index a81a62281..b90a16b21 100644
--- a/layout/xul/nsStackFrame.h
+++ b/layout/xul/nsStackFrame.h
@@ -33,6 +33,7 @@ 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 e1650e0d0..c82d3d6b9 100644
--- a/layout/xul/nsTextBoxFrame.cpp
+++ b/layout/xul/nsTextBoxFrame.cpp
@@ -364,12 +364,13 @@ nsDisplayXULTextBox::GetComponentAlphaBounds(nsDisplayListBuilder* aBuilder)
void
nsTextBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
return;
- nsLeafBoxFrame::BuildDisplayList(aBuilder, aLists);
+ nsLeafBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayXULTextBox(aBuilder, this));
diff --git a/layout/xul/nsTextBoxFrame.h b/layout/xul/nsTextBoxFrame.h
index e12b97b32..ca1b88748 100644
--- a/layout/xul/nsTextBoxFrame.h
+++ b/layout/xul/nsTextBoxFrame.h
@@ -48,6 +48,7 @@ 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 2f58abecb..2792403dc 100644
--- a/layout/xul/nsTitleBarFrame.cpp
+++ b/layout/xul/nsTitleBarFrame.cpp
@@ -42,6 +42,7 @@ 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
@@ -50,7 +51,7 @@ nsTitleBarFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
nsGkAtoms::_true, eCaseMatters))
return;
}
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aLists);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
}
nsresult
diff --git a/layout/xul/nsTitleBarFrame.h b/layout/xul/nsTitleBarFrame.h
index 594d0978b..17279c578 100644
--- a/layout/xul/nsTitleBarFrame.h
+++ b/layout/xul/nsTitleBarFrame.h
@@ -19,6 +19,7 @@ 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 608d802ea..deba04a36 100644
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -2824,6 +2824,7 @@ 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!
@@ -2831,7 +2832,7 @@ nsTreeBodyFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return; // We're invisible. Don't paint.
// Handles painting our background, border, and outline.
- nsLeafBoxFrame::BuildDisplayList(aBuilder, aLists);
+ nsLeafBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, 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 6838b0157..9620c8ccb 100644
--- a/layout/xul/tree/nsTreeBodyFrame.h
+++ b/layout/xul/tree/nsTreeBodyFrame.h
@@ -177,6 +177,7 @@ 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 0bedec086..649c0b0b4 100644
--- a/layout/xul/tree/nsTreeColFrame.cpp
+++ b/layout/xul/tree/nsTreeColFrame.cpp
@@ -110,15 +110,16 @@ nsDisplayXULTreeColSplitterTarget::HitTest(nsDisplayListBuilder* aBuilder, const
void
nsTreeColFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
+ const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!aBuilder->IsForEventDelivery()) {
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aLists);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
return;
}
- nsDisplayListCollection set (aBuilder);
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, set);
+ nsDisplayListCollection set;
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, set);
WrapListsInRedirector(aBuilder, set, aLists);
diff --git a/layout/xul/tree/nsTreeColFrame.h b/layout/xul/tree/nsTreeColFrame.h
index ebd16fa52..8fc3219d5 100644
--- a/layout/xul/tree/nsTreeColFrame.h
+++ b/layout/xul/tree/nsTreeColFrame.h
@@ -26,6 +26,7 @@ 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,