| Index: Source/core/rendering/RenderBox.cpp
|
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
|
| index b4c3939d511b886855b77a039883d27d13d96512..9aaddd7f22fb7ecad4ff8baedaaca3eb57fe255d 100644
|
| --- a/Source/core/rendering/RenderBox.cpp
|
| +++ b/Source/core/rendering/RenderBox.cpp
|
| @@ -1458,14 +1458,15 @@ LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStar
|
| LayoutUnit logicalTopPosition = logicalTop();
|
| LayoutUnit startOffsetForContent = cb->startOffsetForContent();
|
| LayoutUnit endOffsetForContent = cb->endOffsetForContent();
|
| - LayoutUnit startOffsetForLine = cb->startOffsetForLine(logicalTopPosition, false);
|
| - LayoutUnit endOffsetForLine = cb->endOffsetForLine(logicalTopPosition, false);
|
| + LayoutUnit logicalHeight = cb->logicalHeightForChild(*this);
|
| + LayoutUnit startOffsetForLine = cb->startOffsetForLine(logicalTopPosition, false, logicalHeight);
|
| + LayoutUnit endOffsetForLine = cb->endOffsetForLine(logicalTopPosition, false, logicalHeight);
|
|
|
| // If there aren't any floats constraining us then allow the margins to shrink/expand the width as much as they want.
|
| if (startOffsetForContent == startOffsetForLine && endOffsetForContent == endOffsetForLine)
|
| - return cb->availableLogicalWidthForLine(logicalTopPosition, false) - childMarginStart - childMarginEnd;
|
| + return cb->availableLogicalWidthForLine(logicalTopPosition, false, logicalHeight) - childMarginStart - childMarginEnd;
|
|
|
| - LayoutUnit width = cb->availableLogicalWidthForLine(logicalTopPosition, false) - std::max(LayoutUnit(), childMarginStart) - std::max(LayoutUnit(), childMarginEnd);
|
| + LayoutUnit width = cb->availableLogicalWidthForLine(logicalTopPosition, false, logicalHeight) - std::max(LayoutUnit(), childMarginStart) - std::max(LayoutUnit(), childMarginEnd);
|
| // We need to see if margins on either the start side or the end side can contain the floats in question. If they can,
|
| // then just using the line width is inaccurate. In the case where a float completely fits, we don't need to use the line
|
| // offset at all, but can instead push all the way to the content edge of the containing block. In the case where the float
|
|
|