Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
index defec5faeb81092d79943de82b87ce472cc96c7a..f98ab72daff52e42f04d09c19f592281d99b2453 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
@@ -471,6 +471,8 @@ inline bool LayoutBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit & |
TextAutosizer::LayoutScope textAutosizerLayoutScope(this, &layoutScope); |
+ bool preferredLogicalWidthsWereDirty = preferredLogicalWidthsDirty(); |
+ |
// Reset the flag here instead of in layoutInlineChildren() in case that |
// all inline children are removed from this block. |
setContainsInlineWithOutlineAndContinuation(false); |
@@ -479,6 +481,10 @@ inline bool LayoutBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit & |
else |
layoutBlockChildren(relayoutChildren, layoutScope, beforeEdge, afterEdge); |
+ bool preferredLogicalWidthsBecameDirty = !preferredLogicalWidthsWereDirty && preferredLogicalWidthsDirty(); |
+ if (preferredLogicalWidthsBecameDirty) |
+ return false; |
+ |
// Expand our intrinsic height to encompass floats. |
if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && createsNewFormattingContext()) |
setLogicalHeight(lowestFloatLogicalBottom() + afterEdge); |