| 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 53caeacc5a976b3f446a9904913ce4bbf3fe8a00..8c1538dce01cfdc8de249f27bd3d4faa31503065 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -620,7 +620,7 @@ LayoutUnit LayoutBox::constrainContentBoxLogicalHeightByMinMax(LayoutUnit logica
|
| LayoutUnit availableLogicalHeight(logicalHeight / styleToUse.logicalHeight().value() * 100);
|
| logicalHeight = std::min(logicalHeight, valueForLength(styleToUse.logicalMaxHeight(), availableLogicalHeight));
|
| } else {
|
| - LayoutUnit maxHeight(computeContentLogicalHeight(MaxSize, styleToUse.logicalMaxHeight(), LayoutUnit(-1)));
|
| + LayoutUnit maxHeight(computeContentLogicalHeight(MaxSize, styleToUse.logicalMaxHeight(), intrinsicContentHeight));
|
| if (maxHeight != -1)
|
| logicalHeight = std::min(logicalHeight, maxHeight);
|
| }
|
| @@ -2579,8 +2579,6 @@ LayoutUnit LayoutBox::computeIntrinsicLogicalContentHeightUsing(const Length& lo
|
| if (logicalHeightLength.isMinContent() || logicalHeightLength.isMaxContent() || logicalHeightLength.isFitContent()) {
|
| if (isAtomicInlineLevel())
|
| return intrinsicSize().height();
|
| - if (m_intrinsicContentLogicalHeight != -1)
|
| - return m_intrinsicContentLogicalHeight;
|
| return intrinsicContentHeight;
|
| }
|
| if (logicalHeightLength.isFillAvailable())
|
| @@ -2892,6 +2890,7 @@ LayoutUnit LayoutBox::computeReplacedLogicalHeightUsing(SizeType sizeType, const
|
| LayoutUnit LayoutBox::availableLogicalHeight(AvailableLogicalHeightType heightType) const
|
| {
|
| // http://www.w3.org/TR/CSS2/visudet.html#propdef-height - We are interested in the content height.
|
| + // FIXME: Should we pass intrinsicContentLogicalHeight() instead of -1 here?
|
| return constrainContentBoxLogicalHeightByMinMax(availableLogicalHeightUsing(style()->logicalHeight(), heightType), LayoutUnit(-1));
|
| }
|
|
|
| @@ -2918,6 +2917,7 @@ LayoutUnit LayoutBox::availableLogicalHeightUsing(const Length& h, AvailableLogi
|
| return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, availableHeight));
|
| }
|
|
|
| + // FIXME: Should we pass intrinsicContentLogicalHeight() instead of -1 here?
|
| LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeightUsing(MainOrPreferredSize, h, LayoutUnit(-1));
|
| if (heightIncludingScrollbar != -1)
|
| return std::max(LayoutUnit(), adjustContentBoxLogicalHeightForBoxSizing(heightIncludingScrollbar) - scrollbarLogicalHeight());
|
|
|