| Index: third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp b/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp
|
| index 51a09fbfa70d13f892d5095af0c8fe3bf4b9bdd6..1664c868cba5f4cbd255fec17eafee02b85130b9 100644
|
| --- a/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp
|
| @@ -376,8 +376,18 @@ LayoutUnit GridTrackSizingAlgorithmStrategy::minSizeForChild(
|
| isRowAxis
|
| ? child.styleRef().overflowInlineDirection() == EOverflow::kVisible
|
| : child.styleRef().overflowBlockDirection() == EOverflow::kVisible;
|
| - if (!childSize.isAuto() || (childMinSize.isAuto() && overflowIsVisible))
|
| + if (!childSize.isAuto() || (childMinSize.isAuto() && overflowIsVisible)) {
|
| + if (child.isLayoutReplaced() && childSize.isAuto()) {
|
| + // If the box has an aspect ratio and no specified size, its automatic
|
| + // minimum size is the smaller of its content size and its transferred
|
| + // size.
|
| + return isRowAxis ? std::min(child.intrinsicLogicalWidth(),
|
| + minContentForChild(child))
|
| + : std::min(child.intrinsicLogicalHeight(),
|
| + minContentForChild(child));
|
| + }
|
| return minContentForChild(child);
|
| + }
|
|
|
| bool overrideSizeHasChanged =
|
| updateOverrideContainingBlockContentSizeForChild(child,
|
|
|