| 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 8872d9016e7e66048e593dad232b9c7db6ef8038..aba541d0d22c1abaaba474c2ff025b8495eda1cb 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
| @@ -471,8 +471,13 @@ inline bool LayoutBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit &
|
| layoutBlockChildren(relayoutChildren, layoutScope, beforeEdge, afterEdge);
|
|
|
| bool preferredLogicalWidthsBecameDirty = !preferredLogicalWidthsWereDirty && preferredLogicalWidthsDirty();
|
| - if (preferredLogicalWidthsBecameDirty)
|
| - return false;
|
| + if (preferredLogicalWidthsBecameDirty) {
|
| + // The only thing that should dirty preferred widths at this point is the addition of
|
| + // overflow:auto scrollbars in a descendant. To avoid a potential infinite loop,
|
| + // run layout again with auto scrollbars frozen in their current state.
|
| + PaintLayerScrollableArea::FreezeScrollbarsScope freezeScrollbars;
|
| + return layoutBlockFlow(relayoutChildren, pageLogicalHeight, layoutScope);
|
| + }
|
|
|
| // Expand our intrinsic height to encompass floats.
|
| if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && createsNewFormattingContext())
|
|
|