| 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 9844c5910ba36e99629c48051ccd898a83dcb5e2..2f0c98f78df8b94055def04cbc67dc3db7bdd15f 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -3081,6 +3081,13 @@ LayoutUnit LayoutBox::availableLogicalHeightUsing(const Length& h, AvailableLogi
|
| return logicalHeight() - borderAndPaddingLogicalHeight();
|
| }
|
|
|
| + if (isFlexItem()) {
|
| + LayoutFlexibleBox& flexBox = toLayoutFlexibleBox(*parent());
|
| + LayoutUnit stretchedHeight = flexBox.childLogicalHeightForPercentageResolution(*this);
|
| + if (stretchedHeight != LayoutUnit(-1))
|
| + return stretchedHeight;
|
| + }
|
| +
|
| if (h.isPercentOrCalc() && isOutOfFlowPositioned()) {
|
| // FIXME: This is wrong if the containingBlock has a perpendicular writing mode.
|
| LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(containingBlock());
|
|
|