| Index: third_party/WebKit/Source/core/layout/LayoutBlock.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
|
| index 376b79f48e6315b0c1afdfaf9a5632d86a8feefa..5a6d943d7c540b355485afcf1080643711c11c7f 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
|
| @@ -955,9 +955,9 @@ void LayoutBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool)
|
| LayoutRect clientRect(noOverflowRect());
|
| LayoutRect rectToApply;
|
| if (isHorizontalWritingMode())
|
| - rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, std::max<LayoutUnit>(0, oldClientAfterEdge - clientRect.y()));
|
| + rectToApply = LayoutRect(clientRect.x(), clientRect.y(), LayoutUnit(1), (oldClientAfterEdge - clientRect.y()).clampNegativeToZero());
|
| else
|
| - rectToApply = LayoutRect(clientRect.x(), clientRect.y(), std::max<LayoutUnit>(0, oldClientAfterEdge - clientRect.x()), 1);
|
| + rectToApply = LayoutRect(clientRect.x(), clientRect.y(), (oldClientAfterEdge - clientRect.x()).clampNegativeToZero(), LayoutUnit(1));
|
| addLayoutOverflow(rectToApply);
|
| if (hasOverflowModel())
|
| m_overflow->setLayoutClientAfterEdge(oldClientAfterEdge);
|
| @@ -2060,8 +2060,8 @@ void LayoutBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth
|
| }
|
|
|
| // Always make sure these values are non-negative.
|
| - minLogicalWidth = std::max<LayoutUnit>(0, minLogicalWidth);
|
| - maxLogicalWidth = std::max<LayoutUnit>(0, maxLogicalWidth);
|
| + minLogicalWidth = minLogicalWidth.clampNegativeToZero();
|
| + maxLogicalWidth = maxLogicalWidth.clampNegativeToZero();
|
|
|
| maxLogicalWidth = std::max(floatLeftWidth + floatRightWidth, maxLogicalWidth);
|
| }
|
|
|