summaryrefslogtreecommitdiffstats
path: root/layout/generic/nsBlockFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/generic/nsBlockFrame.cpp')
-rw-r--r--layout/generic/nsBlockFrame.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp
index 93de79cef..a37bfc06b 100644
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -6527,14 +6527,13 @@ static void DebugOutputDrawLine(int32_t aDepth, nsLineBox* aLine, bool aDrawn) {
static void
DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
- nsBlockFrame::LineIterator& aLine,
+ const nsRect& aDirtyRect, 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(aBuilder->GetDirtyRect());
- bool visible = aLineArea.Intersects(aBuilder->GetVisibleRect());
+ bool intersect = aLineArea.Intersects(aDirtyRect);
#ifdef DEBUG
if (nsBlockFrame::gLamePaintMetrics) {
aDrawnLines++;
@@ -6550,14 +6549,14 @@ DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
// frame in the line, it's also true for aFrame.
bool lineInline = aLine->IsInline();
bool lineMayHaveTextOverflow = aTextOverflow && lineInline;
- if (!intersect && !aBuilder->ShouldDescendIntoFrame(aFrame, visible) &&
+ if (!intersect && !aBuilder->ShouldDescendIntoFrame(aFrame) &&
!lineMayHaveTextOverflow)
return;
// 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(aBuilder);
+ nsDisplayListCollection collection;
// Block-level child backgrounds go on the blockBorderBackgrounds list ...
// Inline-level child backgrounds go on the regular child content list.
@@ -6569,7 +6568,8 @@ DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
nsIFrame* kid = aLine->mFirstChild;
int32_t n = aLine->GetChildCount();
while (--n >= 0) {
- aFrame->BuildDisplayListForChild(aBuilder, kid, childLists, flags);
+ aFrame->BuildDisplayListForChild(aBuilder, kid, aDirtyRect,
+ childLists, flags);
kid = kid->GetNextSibling();
}
@@ -6582,13 +6582,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 +6596,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,
- dirty.x, dirty.y, dirty.width, dirty.height,
+ aDirtyRect.x, aDirtyRect.y, aDirtyRect.width, aDirtyRect.height,
ca.x, ca.y, ca.width, ca.height);
}
PRTime start = 0; // Initialize these variables to silence the compiler.
@@ -6609,21 +6609,21 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayBorderBackgroundOutline(aBuilder, aLists);
if (GetPrevInFlow()) {
- DisplayOverflowContainers(aBuilder, aLists);
+ DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
for (nsIFrame* f : mFloats) {
if (f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT)
- BuildDisplayListForChild(aBuilder, f, aLists);
+ BuildDisplayListForChild(aBuilder, f, aDirtyRect, aLists);
}
}
- aBuilder->MarkFramesForDisplayList(this, mFloats);
+ aBuilder->MarkFramesForDisplayList(this, mFloats, aDirtyRect);
// 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(aBuilder);
+ nsDisplayListCollection linesDisplayListCollection;
// Don't use the line cursor if we might have a descendant placeholder ...
// it might skip lines that contain placeholders but don't themselves
@@ -6632,8 +6632,8 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// on all our child frames, but that might be expensive. So we
// 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, true)) ?
- nullptr : GetFirstLineContaining(aBuilder->GetDirtyRect().y);
+ nsLineBox* cursor = aBuilder->ShouldDescendIntoFrame(this) ?
+ nullptr : GetFirstLineContaining(aDirtyRect.y);
LineIterator line_end = LinesEnd();
if (cursor) {
@@ -6644,10 +6644,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 >= aBuilder->GetDirtyRect().YMost()) {
+ if (lineArea.y >= aDirtyRect.YMost()) {
break;
}
- DisplayLine(aBuilder, lineArea, line, depth, drawnLines,
+ DisplayLine(aBuilder, lineArea, aDirtyRect, line, depth, drawnLines,
linesDisplayListCollection, this, textOverflow.get());
}
}
@@ -6660,7 +6660,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
line != line_end;
++line) {
nsRect lineArea = line->GetVisualOverflowArea();
- DisplayLine(aBuilder, lineArea, line, depth, drawnLines,
+ DisplayLine(aBuilder, lineArea, aDirtyRect, line, depth, drawnLines,
linesDisplayListCollection, this, textOverflow.get());
if (!lineArea.IsEmpty()) {
if (lineArea.y < lastY
@@ -6690,7 +6690,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (HasOutsideBullet()) {
// Display outside bullets manually
nsIFrame* bullet = GetOutsideBullet();
- BuildDisplayListForChild(aBuilder, bullet, aLists);
+ BuildDisplayListForChild(aBuilder, bullet, aDirtyRect, aLists);
}
#ifdef DEBUG