Chromium Code Reviews| Index: Source/core/rendering/RenderDeprecatedFlexibleBox.cpp |
| diff --git a/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp b/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp |
| index 0405fda927edea2b1cc314932f1286cf27e71997..f3d341eba34d84d5d0c2cb41714782ed51046579 100644 |
| --- a/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp |
| +++ b/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp |
| @@ -258,46 +258,48 @@ void RenderDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren) |
| return; |
| LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); |
| - LayoutStateMaintainer statePusher(*this, locationOffset()); |
| - RenderFlowThread* flowThread = flowThreadContainingBlock(); |
| - if (updateRegionsAndShapesLogicalSize(flowThread)) |
| - relayoutChildren = true; |
| + { |
| + // LayoutStateMaintainer needs this deliberate scope to pop before repaint |
| + LayoutStateMaintainer statePusher(*this, locationOffset()); |
| - LayoutSize previousSize = size(); |
| + RenderFlowThread* flowThread = flowThreadContainingBlock(); |
| + if (updateRegionsAndShapesLogicalSize(flowThread)) |
| + relayoutChildren = true; |
| - updateLogicalWidth(); |
| - updateLogicalHeight(); |
| + LayoutSize previousSize = size(); |
| - if (previousSize != size() |
| - || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOrient() == HORIZONTAL |
| - && parent()->style()->boxAlign() == BSTRETCH)) |
| - relayoutChildren = true; |
| + updateLogicalWidth(); |
| + updateLogicalHeight(); |
| - setHeight(0); |
| + if (previousSize != size() |
| + || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOrient() == HORIZONTAL |
| + && parent()->style()->boxAlign() == BSTRETCH)) |
| + relayoutChildren = true; |
| - m_stretchingChildren = false; |
| + setHeight(0); |
| - if (isHorizontal()) |
| - layoutHorizontalBox(relayoutChildren); |
| - else |
| - layoutVerticalBox(relayoutChildren); |
| + m_stretchingChildren = false; |
| - LayoutUnit oldClientAfterEdge = clientLogicalBottom(); |
| - updateLogicalHeight(); |
| + if (isHorizontal()) |
| + layoutHorizontalBox(relayoutChildren); |
| + else |
| + layoutVerticalBox(relayoutChildren); |
| - if (previousSize.height() != height()) |
| - relayoutChildren = true; |
| + LayoutUnit oldClientAfterEdge = clientLogicalBottom(); |
| + updateLogicalHeight(); |
| - layoutPositionedObjects(relayoutChildren || isRoot()); |
| + if (previousSize.height() != height()) |
| + relayoutChildren = true; |
| - computeRegionRangeForBlock(flowThread); |
| + layoutPositionedObjects(relayoutChildren || isRoot()); |
| - computeOverflow(oldClientAfterEdge); |
| + computeRegionRangeForBlock(flowThread); |
| - statePusher.pop(); |
| + computeOverflow(oldClientAfterEdge); |
| - updateLayerTransform(); |
| + updateLayerTransform(); |
|
Julien - ping for review
2014/03/13 17:44:27
Interestingly updateLayerTransform was out of the
|
| + } |
| if (view()->layoutState()->pageLogicalHeight()) |
| setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(*this, logicalTop())); |