| Index: Source/core/rendering/RenderFlexibleBox.cpp
|
| diff --git a/Source/core/rendering/RenderFlexibleBox.cpp b/Source/core/rendering/RenderFlexibleBox.cpp
|
| index 6114d5654cd0fe113c50d191fd0a018597dff66b..b7c62fc7285aeb7e34c2825a94cd4361c786b4c8 100644
|
| --- a/Source/core/rendering/RenderFlexibleBox.cpp
|
| +++ b/Source/core/rendering/RenderFlexibleBox.cpp
|
| @@ -631,11 +631,22 @@ bool RenderFlexibleBox::childPreferredMainAxisContentExtentRequiresLayout(Render
|
| return preferredMainAxisExtentDependsOnLayout(flexBasisForChild(child), hasInfiniteLineLength) && hasOrthogonalFlow(child);
|
| }
|
|
|
| +bool RenderFlexibleBox::childHasFiniteCrossSize(RenderBox* child) const
|
| +{
|
| + if (child->style()->logicalHeight().isAuto())
|
| + return false;
|
| + if (child->style()->logicalHeight().isPercent() && !style()->logicalHeight().isFixed())
|
| + return false;
|
| + return true;
|
| +}
|
| +
|
| LayoutUnit RenderFlexibleBox::preferredMainAxisContentExtentForChild(RenderBox* child, bool hasInfiniteLineLength, bool relayoutChildren)
|
| {
|
| child->clearOverrideSize();
|
|
|
| Length flexBasis = flexBasisForChild(child);
|
| + if (child->style()->hasAspectRatio() && flexBasis.isAuto() && childHasFiniteCrossSize(child))
|
| + return child->style()->aspectRatio() * crossAxisIntrinsicExtentForChild(child);
|
| if (preferredMainAxisExtentDependsOnLayout(flexBasis, hasInfiniteLineLength)) {
|
| LayoutUnit mainAxisExtent;
|
| if (hasOrthogonalFlow(child)) {
|
|
|