| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| index bc1d11d1902f1394e67db899a53ef4f9ee4e4c3c..674d218fc8162ce891b1fb3f93482442972b1d64 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -312,6 +312,14 @@ void LayoutBox::styleDidChange(StyleDifference diff,
|
| updateShapeOutsideInfoAfterStyleChange(*style(), oldStyle);
|
| updateGridPositionAfterStyleChange(oldStyle);
|
|
|
| + // When we're no longer a flex item because we're now absolutely positioned,
|
| + // we need to clear the override size so we're not affected by it anymore.
|
| + // This technically covers too many cases (even when out-of-flow did not
|
| + // change) but that should be harmless.
|
| + if (isOutOfFlowPositioned() && parent() &&
|
| + parent()->styleRef().isDisplayFlexibleOrGridBox())
|
| + clearOverrideSize();
|
| +
|
| if (LayoutMultiColumnSpannerPlaceholder* placeholder =
|
| this->spannerPlaceholder())
|
| placeholder->layoutObjectInFlowThreadStyleDidChange(oldStyle);
|
|
|