Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1697)

Unified Diff: Source/core/rendering/RenderBlockFlow.cpp

Issue 164553004: Convert LayoutState/LayoutStateMaintainer/LayoutStateDisabler to references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlockFlow.cpp
diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp
index 8b173388d29e68f90ad53d3ac3f57223ca860911..23336e8eb52c4db174c03fc8c595c0d7a6ccfb75 100644
--- a/Source/core/rendering/RenderBlockFlow.cpp
+++ b/Source/core/rendering/RenderBlockFlow.cpp
@@ -219,7 +219,7 @@ bool RenderBlockFlow::shouldRelayoutForPagination(LayoutUnit& pageLogicalHeight,
// maximum page break distance.
if (!pageLogicalHeight) {
LayoutUnit distanceBetweenBreaks = max<LayoutUnit>(colInfo->maximumDistanceBetweenForcedBreaks(),
- view()->layoutState()->pageLogicalOffset(this, borderBefore() + paddingBefore() + layoutOverflowLogicalBottom) - colInfo->forcedBreakOffset());
+ view()->layoutState()->pageLogicalOffset(*this, borderBefore() + paddingBefore() + layoutOverflowLogicalBottom) - colInfo->forcedBreakOffset());
columnHeight = max(colInfo->minimumColumnHeight(), distanceBetweenBreaks);
}
} else if (layoutOverflowLogicalBottom > boundedMultiply(pageLogicalHeight, desiredColumnCount)) {
@@ -291,7 +291,7 @@ inline bool RenderBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit &
bool hasSpecifiedPageLogicalHeight = false;
checkForPaginationLogicalHeightChange(pageLogicalHeight, pageLogicalHeightChanged, hasSpecifiedPageLogicalHeight);
- LayoutStateMaintainer statePusher(this, locationOffset(), pageLogicalHeight, pageLogicalHeightChanged, columnInfo());
+ LayoutStateMaintainer statePusher(*this, locationOffset(), pageLogicalHeight, pageLogicalHeightChanged, columnInfo());
// Regions changing widths can force us to relayout our children.
RenderFlowThread* flowThread = flowThreadContainingBlock();
@@ -414,7 +414,7 @@ inline bool RenderBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit &
RenderView* renderView = view();
if (renderView->layoutState()->m_pageLogicalHeight)
- setPageLogicalOffset(renderView->layoutState()->pageLogicalOffset(this, logicalTop()));
+ setPageLogicalOffset(renderView->layoutState()->pageLogicalOffset(*this, logicalTop()));
updateLayerTransform();
@@ -1560,7 +1560,7 @@ LayoutUnit RenderBlockFlow::applyBeforeBreak(RenderBox* child, LayoutUnit logica
if (flowThread->addForcedRegionBreak(offsetFromLogicalTopOfFirstPage() + logicalOffset, child, true, &offsetBreakAdjustment))
return logicalOffset + offsetBreakAdjustment;
} else {
- view()->layoutState()->addForcedColumnBreak(child, logicalOffset);
+ view()->layoutState()->addForcedColumnBreak(*child, logicalOffset);
}
}
return nextPageLogicalTop(logicalOffset, IncludePageBoundary);
@@ -1589,7 +1589,7 @@ LayoutUnit RenderBlockFlow::applyAfterBreak(RenderBox* child, LayoutUnit logical
if (flowThread->addForcedRegionBreak(offsetFromLogicalTopOfFirstPage() + logicalOffset + marginOffset, child, false, &offsetBreakAdjustment))
return logicalOffset + marginOffset + offsetBreakAdjustment;
} else {
- view()->layoutState()->addForcedColumnBreak(child, logicalOffset);
+ view()->layoutState()->addForcedColumnBreak(*child, logicalOffset);
}
}
return nextPageLogicalTop(logicalOffset, IncludePageBoundary);
@@ -1875,7 +1875,7 @@ void RenderBlockFlow::repaintOverhangingFloats(bool paintAllDescendants)
// FIXME: Avoid disabling LayoutState. At the very least, don't disable it for floats originating
// in this block. Better yet would be to push extra state for the containers of other floats.
- LayoutStateDisabler layoutStateDisabler(view());
+ LayoutStateDisabler layoutStateDisabler(*this);
const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
FloatingObjectSetIterator end = floatingObjectSet.end();
for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698