diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-26 20:51:22 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-26 20:51:22 +0100 |
commit | 793da7dd6238ce156e29c71304e24b2c05edc11d (patch) | |
tree | 89aaa5542c8930a139a76d6b82959d70500556e5 /layout/xul | |
parent | 16abf27e653d0a845abeb542d611984a629160d2 (diff) | |
download | uxp-793da7dd6238ce156e29c71304e24b2c05edc11d.tar.gz |
Revert "Issue #1355 - Better way to create display items for column backgrounds"
This reverts commit 44c47c50388f526c2d134e16d5debebe94a0faf8.
Diffstat (limited to 'layout/xul')
30 files changed, 66 insertions, 29 deletions
diff --git a/layout/xul/nsBoxFrame.cpp b/layout/xul/nsBoxFrame.cpp index 9982a39f7b..9ca351d945 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 7b15f4f5ea..ad405222fb 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 4f2a7cbe1f..45d9345168 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 0dc8b517f1..e9bfd99a50 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 91359c177a..b0c0296b2e 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 1437452362..2c7ae14451 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 df3955cf3e..514287a24a 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 e88b502ab7..fd7c7becf5 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 46c8d56149..7faccccaee 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 8342b74854..6d1783c11c 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 7a63d9a796..8aea598c83 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 720df38279..1776f1b6cb 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 aa41dbbbfd..40e731efa5 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 6bd5b44ff9..67fcdbe431 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 43cbd0a04c..1941ec69e6 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 26e94faea6..fe41dce527 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 db22189442..3c1f9ef912 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 e4b68fc018..832065a210 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 468ccc6826..7879a176d3 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 fa1c7525ff..df8872255e 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 a2ec57adc7..437d558f91 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 a81a62281c..b90a16b213 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 e1650e0d00..c82d3d6b9b 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 e12b97b32d..ca1b887484 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 2f58abecb9..2792403dcc 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 594d0978bc..17279c578f 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 608d802ea1..deba04a36c 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 6838b01576..9620c8ccb3 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 0bedec086b..649c0b0b4c 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 ebd16fa526..8fc3219d50 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, |