| Index: sky/engine/core/rendering/RenderBox.cpp
|
| diff --git a/sky/engine/core/rendering/RenderBox.cpp b/sky/engine/core/rendering/RenderBox.cpp
|
| index 1188048d9d1c199dc97c93da14ddf9a823691d39..2fbfd0ccfa979c2051a4560190bfe6a0397d5ae4 100644
|
| --- a/sky/engine/core/rendering/RenderBox.cpp
|
| +++ b/sky/engine/core/rendering/RenderBox.cpp
|
| @@ -1371,16 +1371,15 @@ static LayoutUnit portionOfMarginNotConsumedByFloat(LayoutUnit childMargin, Layo
|
|
|
| LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlockFlow* cb) const
|
| {
|
| - LayoutUnit logicalTopPosition = logicalTop();
|
| - LayoutUnit width = cb->availableLogicalWidthForLine(logicalTopPosition, false) - std::max<LayoutUnit>(0, childMarginStart) - std::max<LayoutUnit>(0, childMarginEnd);
|
| + LayoutUnit width = cb->availableLogicalWidthForLine(false) - std::max<LayoutUnit>(0, childMarginStart) - std::max<LayoutUnit>(0, 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
|
| // doesn't fit, we can use the line offset, but we need to grow it by the margin to reflect the fact that the margin was
|
| // "consumed" by the float. Negative margins aren't consumed by the float, and so we ignore them.
|
| - width += portionOfMarginNotConsumedByFloat(childMarginStart, cb->startOffsetForContent(), cb->startOffsetForLine(logicalTopPosition, false));
|
| - width += portionOfMarginNotConsumedByFloat(childMarginEnd, cb->endOffsetForContent(), cb->endOffsetForLine(logicalTopPosition, false));
|
| + width += portionOfMarginNotConsumedByFloat(childMarginStart, cb->startOffsetForContent(), cb->startOffsetForLine(false));
|
| + width += portionOfMarginNotConsumedByFloat(childMarginEnd, cb->endOffsetForContent(), cb->endOffsetForLine(false));
|
| return width;
|
| }
|
|
|
| @@ -1406,7 +1405,7 @@ LayoutUnit RenderBox::containingBlockAvailableLineWidth() const
|
| {
|
| RenderBlock* cb = containingBlock();
|
| if (cb->isRenderBlockFlow())
|
| - return toRenderBlockFlow(cb)->availableLogicalWidthForLine(logicalTop(), false, availableLogicalHeight(IncludeMarginBorderPadding));
|
| + return toRenderBlockFlow(cb)->availableLogicalWidthForLine(false);
|
| return 0;
|
| }
|
|
|
|
|