Chromium Code Reviews| 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..c1b64ec4467d0fe2b195988d6f84b90837ac869d 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 (childSize.isAuto() && child.isLayoutReplaced()) { |
|
svillar
2017/03/02 12:00:02
You might want to replace the order of those two c
Manuel Rego
2017/03/02 12:10:19
Good point. Done.
|
| + // 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, |