| Index: Source/core/rendering/RenderBlockFlow.cpp
|
| diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp
|
| index f340887cad6d048b4168b7872d6093b3356646a3..c0e6e018604463233b11ede31bd00fb4932194b7 100644
|
| --- a/Source/core/rendering/RenderBlockFlow.cpp
|
| +++ b/Source/core/rendering/RenderBlockFlow.cpp
|
| @@ -301,14 +301,35 @@ void RenderBlockFlow::layoutBlock(bool relayoutChildren)
|
| // number of columns.
|
| bool done = false;
|
| LayoutUnit pageLogicalHeight = 0;
|
| + LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
|
| while (!done)
|
| done = layoutBlockFlow(relayoutChildren, pageLogicalHeight, layoutScope);
|
| +
|
| + fitBorderToLinesIfNeeded();
|
| +
|
| + RenderView* renderView = view();
|
| + if (renderView->layoutState()->m_pageLogicalHeight)
|
| + setPageLogicalOffset(renderView->layoutState()->pageLogicalOffset(*this, logicalTop()));
|
| +
|
| + updateLayerTransform();
|
| +
|
| + // Update our scroll information if we're overflow:auto/scroll/hidden now that we know if
|
| + // we overflow or not.
|
| + updateScrollInfoAfterLayout();
|
| +
|
| + // Repaint with our new bounds if they are different from our old bounds.
|
| + bool didFullRepaint = repainter.repaintAfterLayout();
|
| + if (!didFullRepaint && m_repaintLogicalTop != m_repaintLogicalBottom && (style()->visibility() == VISIBLE || enclosingLayer()->hasVisibleContent())) {
|
| + if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
|
| + setShouldRepaintOverflowIfNeeded(true);
|
| + else
|
| + repaintOverflow();
|
| + }
|
| + clearNeedsLayout();
|
| }
|
|
|
| inline bool RenderBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit &pageLogicalHeight, SubtreeLayoutScope& layoutScope)
|
| {
|
| - LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
|
| -
|
| LayoutUnit oldLeft = logicalLeft();
|
| if (updateLogicalWidthAndColumnWidth())
|
| relayoutChildren = true;
|
| @@ -361,10 +382,8 @@ inline bool RenderBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit &
|
| else
|
| layoutBlockChildren(relayoutChildren, maxFloatLogicalBottom, layoutScope, beforeEdge, afterEdge);
|
|
|
| - if (frameView()->partialLayout().isStopping()) {
|
| - statePusher.pop();
|
| + if (frameView()->partialLayout().isStopping())
|
| return true;
|
| - }
|
|
|
| // Expand our intrinsic height to encompass floats.
|
| if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && createsBlockFormattingContext())
|
| @@ -373,7 +392,6 @@ inline bool RenderBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit &
|
| if (RenderMultiColumnFlowThread* flowThread = multiColumnFlowThread()) {
|
| if (flowThread->recalculateColumnHeights()) {
|
| setChildNeedsLayout(MarkOnlyThis);
|
| - statePusher.pop();
|
| return false;
|
| }
|
| } else if (hasColumns()) {
|
| @@ -386,7 +404,6 @@ inline bool RenderBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit &
|
| m_overflow = savedOverflow.release();
|
|
|
| if (!hasSpecifiedPageLogicalHeight && shouldRelayoutForPagination(pageLogicalHeight, layoutOverflowLogicalBottom)) {
|
| - statePusher.pop();
|
| setEverHadLayout(true);
|
| return false;
|
| }
|
| @@ -395,7 +412,6 @@ inline bool RenderBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit &
|
| }
|
|
|
| if (shouldBreakAtLineToAvoidWidow()) {
|
| - statePusher.pop();
|
| setEverHadLayout(true);
|
| return false;
|
| }
|
| @@ -433,33 +449,6 @@ inline bool RenderBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit &
|
| // Add overflow from children (unless we're multi-column, since in that case all our child overflow is clipped anyway).
|
| computeOverflow(oldClientAfterEdge);
|
|
|
| - statePusher.pop();
|
| -
|
| - fitBorderToLinesIfNeeded();
|
| -
|
| - if (frameView()->partialLayout().isStopping())
|
| - return true;
|
| -
|
| - RenderView* renderView = view();
|
| - if (renderView->layoutState()->m_pageLogicalHeight)
|
| - setPageLogicalOffset(renderView->layoutState()->pageLogicalOffset(*this, logicalTop()));
|
| -
|
| - updateLayerTransform();
|
| -
|
| - // Update our scroll information if we're overflow:auto/scroll/hidden now that we know if
|
| - // we overflow or not.
|
| - updateScrollInfoAfterLayout();
|
| -
|
| - // Repaint with our new bounds if they are different from our old bounds.
|
| - bool didFullRepaint = repainter.repaintAfterLayout();
|
| - if (!didFullRepaint && m_repaintLogicalTop != m_repaintLogicalBottom && (style()->visibility() == VISIBLE || enclosingLayer()->hasVisibleContent())) {
|
| - if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
|
| - setShouldRepaintOverflowIfNeeded(true);
|
| - else
|
| - repaintOverflow();
|
| - }
|
| -
|
| - clearNeedsLayout();
|
| return true;
|
| }
|
|
|
|
|