| Index: Source/core/rendering/RenderBlock.cpp
|
| diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
|
| index 5c7a9d90b55bb66764259d87e17aec1720eae4fe..71eb228dae13e927f8af09245741fb5fb99127c1 100644
|
| --- a/Source/core/rendering/RenderBlock.cpp
|
| +++ b/Source/core/rendering/RenderBlock.cpp
|
| @@ -1407,6 +1407,9 @@ void RenderBlock::layout()
|
| // layoutBlock().
|
| layoutBlock(false);
|
|
|
| + if (document()->view()->canStopPartialLayout())
|
| + 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)
|
| @@ -1537,6 +1540,8 @@ void RenderBlock::checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalH
|
| void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight)
|
| {
|
| ASSERT(needsLayout());
|
| +// if (document()->view()->canStopPartialLayout())
|
| +// return;
|
|
|
| if (isInline() && !isInlineBlockOrInlineTable()) // Inline <form>s inside various table elements can
|
| return; // cause us to come in here. Just bail.
|
| @@ -1600,6 +1605,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()->canStopPartialLayout()) {
|
| + statePusher.pop();
|
| + return;
|
| + }
|
| +
|
| // Expand our intrinsic height to encompass floats.
|
| LayoutUnit toAdd = borderAfter() + paddingAfter() + scrollbarLogicalHeight();
|
| if (lowestFloatLogicalBottom() > (logicalHeight() - toAdd) && expandsToEncloseOverhangingFloats())
|
| @@ -1647,6 +1658,9 @@ void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeigh
|
|
|
| fitBorderToLinesIfNeeded();
|
|
|
| + if (document()->view()->canStopPartialLayout())
|
| + return;
|
| +
|
| if (renderView->layoutState()->m_pageLogicalHeight)
|
| setPageLogicalOffset(renderView->layoutState()->pageLogicalOffset(this, logicalTop()));
|
|
|
| @@ -2519,6 +2533,10 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloa
|
|
|
| // Lay out the child.
|
| layoutBlockChild(child, marginInfo, previousFloatLogicalBottom, maxFloatLogicalBottom);
|
| +
|
| + document()->view()->checkPartialLayoutComplete(child);
|
| + if (document()->view()->canStopPartialLayout())
|
| + break;
|
| }
|
|
|
| // Now do the handling of the bottom of the block, adding in our bottom border/padding and
|
| @@ -2583,6 +2601,9 @@ void RenderBlock::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo, Lay
|
| if (childNeededLayout)
|
| child->layout();
|
|
|
| + if (document()->view()->canStopPartialLayout())
|
| + return;
|
| +
|
| // Cache if we are at the top of the block right now.
|
| bool atBeforeSideOfBlock = marginInfo.atBeforeSideOfBlock();
|
|
|
|
|