| 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 882eadfab0ba37ccc82799febfbb9f140d5083b5..ae34a224b2d83e072903c8fe5f1df443046a3b7b 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);
|
|
|