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

Unified Diff: Source/WebCore/rendering/RenderBlock.cpp

Issue 9371032: Merge 106694 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 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/WebCore/rendering/RenderBlock.h ('k') | Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderBlock.cpp
===================================================================
--- Source/WebCore/rendering/RenderBlock.cpp (revision 107302)
+++ Source/WebCore/rendering/RenderBlock.cpp (working copy)
@@ -1207,6 +1207,27 @@
clearLayoutOverflow();
}
+void RenderBlock::computeInitialRegionRangeForBlock()
+{
+ if (inRenderFlowThread()) {
+ // Set our start and end regions. No regions above or below us will be considered by our children. They are
+ // effectively clamped to our region range.
+ LayoutUnit oldHeight = logicalHeight();
+ LayoutUnit oldLogicalTop = logicalTop();
+ setLogicalHeight(numeric_limits<LayoutUnit>::max() / 2);
+ computeLogicalHeight();
+ enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage());
+ setLogicalHeight(oldHeight);
+ setLogicalTop(oldLogicalTop);
+ }
+}
+
+void RenderBlock::computeRegionRangeForBlock()
+{
+ if (inRenderFlowThread())
+ enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage());
+}
+
void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight, BlockLayoutPass layoutPass)
{
ASSERT(needsLayout());
@@ -1266,22 +1287,13 @@
RenderView* renderView = view();
RenderStyle* styleToUse = style();
LayoutStateMaintainer statePusher(renderView, this, locationOffset(), hasColumns() || hasTransform() || hasReflection() || styleToUse->isFlippedBlocksWritingMode(), pageLogicalHeight, pageLogicalHeightChanged, colInfo);
-
+
if (inRenderFlowThread()) {
// Regions changing widths can force us to relayout our children.
if (logicalWidthChangedInRegions())
relayoutChildren = true;
-
- // Set our start and end regions. No regions above or below us will be considered by our children. They are
- // effectively clamped to our region range.
- LayoutUnit oldHeight = logicalHeight();
- LayoutUnit oldLogicalTop = logicalTop();
- setLogicalHeight(numeric_limits<LayoutUnit>::max() / 2);
- computeLogicalHeight();
- enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage());
- setLogicalHeight(oldHeight);
- setLogicalTop(oldLogicalTop);
}
+ computeInitialRegionRangeForBlock();
// We use four values, maxTopPos, maxTopNeg, maxBottomPos, and maxBottomNeg, to track
// our current maximal positive and negative margins. These values are used when we
@@ -1359,8 +1371,7 @@
bool needAnotherLayoutPass = layoutPositionedObjects(relayoutChildren || isRoot());
- if (inRenderFlowThread())
- enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage());
+ computeRegionRangeForBlock();
// Add overflow from children (unless we're multi-column, since in that case all our child overflow is clipped anyway).
computeOverflow(oldClientAfterEdge);
« no previous file with comments | « Source/WebCore/rendering/RenderBlock.h ('k') | Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698