diff options
author | Moonchild <moonchild@palemoon.org> | 2020-06-01 21:58:35 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-06-01 21:58:35 +0000 |
commit | c6ca4380e9e5e95df9de02daf8bfb9a6ebc22810 (patch) | |
tree | c7672903a2030d37f861b12900165a015f49d10a /layout/generic/nsBlockFrame.cpp | |
parent | 451509e2c0188a4164d4b3d1d9f5839ed1e95246 (diff) | |
parent | 744b044935f7d1d67fbe0df42d898efcbdd00536 (diff) | |
download | UXP-c6ca4380e9e5e95df9de02daf8bfb9a6ebc22810.tar UXP-c6ca4380e9e5e95df9de02daf8bfb9a6ebc22810.tar.gz UXP-c6ca4380e9e5e95df9de02daf8bfb9a6ebc22810.tar.lz UXP-c6ca4380e9e5e95df9de02daf8bfb9a6ebc22810.tar.xz UXP-c6ca4380e9e5e95df9de02daf8bfb9a6ebc22810.zip |
Merge remote-tracking branch 'origin/redwood' into release
Diffstat (limited to 'layout/generic/nsBlockFrame.cpp')
-rw-r--r-- | layout/generic/nsBlockFrame.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index a37bfc06b..57838207d 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++; @@ -6556,7 +6556,7 @@ DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea, // Collect our line's display items in a temporary nsDisplayListCollection, // so that we can apply any "text-overflow" clipping to the entire collection // without affecting previous lines. - nsDisplayListCollection collection; + nsDisplayListCollection collection(aBuilder); // Block-level child backgrounds go on the blockBorderBackgrounds list ... // Inline-level child backgrounds go on the regular child content list. @@ -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,21 +6608,21 @@ 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( TextOverflow::WillProcessLines(aBuilder, this)); // We'll collect our lines' display items here, & then append this to aLists. - nsDisplayListCollection linesDisplayListCollection; + nsDisplayListCollection linesDisplayListCollection(aBuilder); // Don't use the line cursor if we might have a descendant placeholder ... // it might skip lines that contain placeholders but don't themselves @@ -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 |