diff options
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/WebCore/rendering/RenderBox.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp index 03b81ac9a..355a4f958 100644 --- a/Source/WebCore/rendering/RenderBox.cpp +++ b/Source/WebCore/rendering/RenderBox.cpp @@ -2680,6 +2680,17 @@ LayoutUnit RenderBox::computePercentageLogicalHeight(const Length& height) const LayoutUnit contentBoxHeight = cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight()); availableHeight = max<LayoutUnit>(0, contentBoxHeight); } + } else if (cbstyle->logicalHeight().isViewportPercentage()) { + LayoutUnit heightWithScrollbar = valueForLength(cbstyle->logicalHeight(), 0, view()); + if (heightWithScrollbar != -1) { + LayoutUnit contentBoxHeightWithScrollbar = cb->adjustContentBoxLogicalHeightForBoxSizing(heightWithScrollbar); + // We need to adjust for min/max height because this method does + // not handle the min/max of the current block, its caller does. + // So the return value from the recursive call will not have been + // adjusted yet. + LayoutUnit contentBoxHeight = cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight()); + availableHeight = std::max<LayoutUnit>(0, contentBoxHeight); + } } else if (isOutOfFlowPositionedWithSpecifiedHeight) { // Don't allow this to affect the block' height() member variable, since this // can get called while the block is still laying out its kids. |
