| Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
|
| index b9ca8b1f631afbef88431a5d1bf0b4e7d39a9e96..50b2975d41612a7f6f914459432b318e5689b11c 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
|
| @@ -913,9 +913,9 @@ LayoutRect LayoutBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width,
|
| x -= textIndentOffset;
|
| break;
|
| }
|
| - x = std::min(x, std::max<LayoutUnit>(maxX - caretWidth(), 0));
|
| + x = std::min(x, (maxX - caretWidth()).clampToZero());
|
|
|
| - LayoutUnit height = style()->fontMetrics().height();
|
| + LayoutUnit height = LayoutUnit(style()->fontMetrics().height());
|
| LayoutUnit verticalSpace = lineHeight(true, currentStyle.isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes) - height;
|
| LayoutUnit y = paddingTop() + borderTop() + (verticalSpace / 2);
|
| return currentStyle.isHorizontalWritingMode() ? LayoutRect(x, y, caretWidth(), height) : LayoutRect(y, x, height, caretWidth());
|
|
|