Chromium Code Reviews| Index: Source/core/rendering/RenderBlock.cpp |
| diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp |
| index 3f6f504244c271b1a0637d2eb95cce0fe7062e33..8608c756737f8b4bc6f06cbbc59b3b3989eb731b 100644 |
| --- a/Source/core/rendering/RenderBlock.cpp |
| +++ b/Source/core/rendering/RenderBlock.cpp |
| @@ -1386,6 +1386,9 @@ void RenderBlock::layout() |
| // layoutBlock(). |
| layoutBlock(false); |
| + if (frameView()->partialLayout().shouldStop()) |
| + 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) |
| @@ -1596,6 +1599,11 @@ void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeigh |
| else |
| layoutBlockChildren(relayoutChildren, maxFloatLogicalBottom, layoutScope); |
| + if (frameView()->partialLayout().shouldStop()) { |
| + statePusher.pop(); |
|
eseidel
2013/09/03 19:14:27
Is this explicit pop neeeded? Surprised this isnt
pdr.
2013/09/03 21:37:35
Great question. Unfortunately, it is needed. It's
|
| + return; |
| + } |
| + |
| // Expand our intrinsic height to encompass floats. |
| LayoutUnit toAdd = borderAfter() + paddingAfter() + scrollbarLogicalHeight(); |
| if (lowestFloatLogicalBottom() > (logicalHeight() - toAdd) && expandsToEncloseOverhangingFloats()) |
| @@ -1643,6 +1651,9 @@ void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeigh |
| fitBorderToLinesIfNeeded(); |
| + if (frameView()->partialLayout().shouldStop()) |
| + return; |
| + |
| if (renderView->layoutState()->m_pageLogicalHeight) |
| setPageLogicalOffset(renderView->layoutState()->pageLogicalOffset(this, logicalTop())); |
| @@ -2515,6 +2526,10 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloa |
| // Lay out the child. |
| layoutBlockChild(child, marginInfo, previousFloatLogicalBottom, maxFloatLogicalBottom); |
| + |
| + // If doing a partial layout and the child was the target renderer, early exit here. |
| + if (frameView()->partialLayout().checkPartialLayoutComplete(child)) |
| + break; |
| } |
| // Now do the handling of the bottom of the block, adding in our bottom border/padding and |
| @@ -2580,6 +2595,9 @@ void RenderBlock::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo, Lay |
| if (childNeededLayout) |
| child->layout(); |
| + if (frameView()->partialLayout().shouldStop()) |
| + return; |
| + |
| // Cache if we are at the top of the block right now. |
| bool atBeforeSideOfBlock = marginInfo.atBeforeSideOfBlock(); |