| Index: third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
|
| index 016707b546a4683afd0955029dc7a8ce243a5dd9..6c708a0e36b89e1aaa46fc1b9f7cd74b91dc39dc 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
|
| @@ -584,7 +584,7 @@ LayoutUnit LayoutReplaced::computeReplacedLogicalWidth(ShouldComputePreferred sh
|
| // This solves above equation for 'width' (== logicalWidth).
|
| LayoutUnit marginStart = minimumValueForLength(style()->marginStart(), logicalWidth);
|
| LayoutUnit marginEnd = minimumValueForLength(style()->marginEnd(), logicalWidth);
|
| - logicalWidth = std::max<LayoutUnit>(0, logicalWidth - (marginStart + marginEnd + (size().width() - clientWidth())));
|
| + logicalWidth = (logicalWidth - (marginStart + marginEnd + (size().width() - clientWidth()))).clampNegativeToZero();
|
| return computeReplacedLogicalWidthRespectingMinMaxWidth(logicalWidth, shouldComputePreferred);
|
| }
|
| }
|
| @@ -730,8 +730,8 @@ LayoutRect LayoutReplaced::localSelectionRect() const
|
| RootInlineBox& root = inlineBoxWrapper()->root();
|
| LayoutUnit newLogicalTop = root.block().style()->isFlippedBlocksWritingMode() ? inlineBoxWrapper()->logicalBottom() - root.selectionBottom() : root.selectionTop() - inlineBoxWrapper()->logicalTop();
|
| if (root.block().style()->isHorizontalWritingMode())
|
| - return LayoutRect(0, newLogicalTop, size().width(), root.selectionHeight());
|
| - return LayoutRect(newLogicalTop, 0, root.selectionHeight(), size().height());
|
| + return LayoutRect(LayoutUnit(), newLogicalTop, size().width(), root.selectionHeight());
|
| + return LayoutRect(newLogicalTop, LayoutUnit(), root.selectionHeight(), size().height());
|
| }
|
|
|
| void LayoutReplaced::setSelectionState(SelectionState state)
|
|
|