Chromium Code Reviews| Index: Source/core/rendering/RenderBlock.cpp |
| diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp |
| index 52aca14df705f914b76c23dbc286d64ce857f688..8e6431e7d79a4c4d20a03e27a410d98d47bf10c2 100644 |
| --- a/Source/core/rendering/RenderBlock.cpp |
| +++ b/Source/core/rendering/RenderBlock.cpp |
| @@ -1387,6 +1387,9 @@ void RenderBlock::layout() |
| // layoutBlock(). |
| layoutBlock(false); |
| + if (document()->view()->shouldStopPartialLayout()) |
| + return; |
| + |
| // It's safe to check for control clip here, since controls can never be table cells. |
| // If we have a lightweight clip, there can never be any overflow from children. |
| if (hasControlClip() && m_overflow) |
| @@ -1595,6 +1598,12 @@ void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeigh |
| else |
| layoutBlockChildren(relayoutChildren, maxFloatLogicalBottom); |
| + // If layout was just for one of our children, stop early (before setting setNeedsLayout=false!) |
| + if (document()->view()->shouldStopPartialLayout()) { |
| + statePusher.pop(); |
| + return; |
| + } |
| + |
| // Expand our intrinsic height to encompass floats. |
| LayoutUnit toAdd = borderAfter() + paddingAfter() + scrollbarLogicalHeight(); |
| if (lowestFloatLogicalBottom() > (logicalHeight() - toAdd) && expandsToEncloseOverhangingFloats()) |
| @@ -1642,6 +1651,9 @@ void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeigh |
| fitBorderToLinesIfNeeded(); |
| + if (document()->view()->shouldStopPartialLayout()) |
| + return; |
| + |
| if (renderView->layoutState()->m_pageLogicalHeight) |
| setPageLogicalOffset(renderView->layoutState()->pageLogicalOffset(this, logicalTop())); |
| @@ -2514,6 +2526,10 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloa |
| // Lay out the child. |
| layoutBlockChild(child, marginInfo, previousFloatLogicalBottom, maxFloatLogicalBottom); |
| + |
| + document()->view()->checkPartialLayoutComplete(child); |
|
esprehn
2013/08/18 03:43:15
you should add frameView() to RenderObject if you
pdr.
2013/08/20 06:19:10
Done.
|
| + if (document()->view()->shouldStopPartialLayout()) |
| + break; |
| } |
| // Now do the handling of the bottom of the block, adding in our bottom border/padding and |
| @@ -2578,6 +2594,9 @@ void RenderBlock::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo, Lay |
| if (childNeededLayout) |
| child->layout(); |
| + if (document()->view()->shouldStopPartialLayout()) |
| + return; |
| + |
| // Cache if we are at the top of the block right now. |
| bool atBeforeSideOfBlock = marginInfo.atBeforeSideOfBlock(); |