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..1d72366188e719d69c2639f53dad812df07ade19 100644 |
| --- a/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp |
| +++ b/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp |
| @@ -258,44 +258,46 @@ 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 |
|
esprehn
2014/03/20 01:10:55
We might try refactoring these functions so that w
|
| + 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(); |