| 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 988307e39943873e7b46fd9da4ccf07acff1f20d..36f9ebd4d239380a90d092fce14af6ac3d5ec6a8 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -657,7 +657,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);
|
| }
|
| @@ -2673,8 +2673,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())
|
| @@ -2986,6 +2984,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));
|
| }
|
|
|
| @@ -3012,6 +3011,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());
|
|
|