Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1374)

Unified Diff: Source/core/rendering/RenderDeprecatedFlexibleBox.cpp

Issue 196533012: Make LayoutState always be RAII (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated to ToT Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderEmbeddedObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
+ 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();
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderEmbeddedObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698