| Index: third_party/WebKit/Source/core/layout/LayoutImage.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutImage.cpp b/third_party/WebKit/Source/core/layout/LayoutImage.cpp
|
| index 41032bd16efc128b49743304bb8253b84473600a..aa8de2252107f47fd45f9309085cfabf328eb119 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutImage.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutImage.cpp
|
| @@ -151,7 +151,7 @@ void LayoutImage::invalidatePaintAndMarkForLayoutIfNeeded()
|
| // FIXME: We only need to recompute the containing block's preferred size if the containing block's size
|
| // depends on the image's size (i.e., the container uses shrink-to-fit sizing).
|
| // There's no easy way to detect that shrink-to-fit is needed, always force a layout.
|
| - bool containingBlockNeedsToRecomputePreferredSize = style()->logicalWidth().hasPercent() || style()->logicalMaxWidth().hasPercent() || style()->logicalMinWidth().hasPercent();
|
| + bool containingBlockNeedsToRecomputePreferredSize = style()->logicalWidth().isPercentOrCalc() || style()->logicalMaxWidth().isPercentOrCalc() || style()->logicalMinWidth().isPercentOrCalc();
|
|
|
| if (imageSourceHasChangedSize && (!imageSizeIsConstrained || containingBlockNeedsToRecomputePreferredSize)) {
|
| setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::SizeChanged);
|
|
|