Chromium Code Reviews| 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 c3f9368ccc8c86a72f400ecd57acbec015062842..a45b6ab7694316f44448fa8f699fa265c4551d97 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
| @@ -1178,12 +1178,14 @@ LayoutRect LayoutBoxModelObject::localCaretRectForEmptyElement( |
| x -= textIndentOffset / 2; |
| break; |
| case AlignRight: |
| - x = maxX - caretWidth(); |
| + x = maxX - caretWidth(frameView()->getHostWindow()); |
|
oshima
2017/02/10 19:55:16
can you just get once in this function?
malaykeshav
2017/02/10 21:00:54
Done
|
| if (!currentStyle.isLeftToRightDirection()) |
| x -= textIndentOffset; |
| break; |
| } |
| - x = std::min(x, (maxX - caretWidth()).clampNegativeToZero()); |
| + x = std::min( |
| + x, |
| + (maxX - caretWidth(frameView()->getHostWindow())).clampNegativeToZero()); |
| const Font& font = style()->font(); |
| const SimpleFontData* fontData = font.primaryFont(); |
| @@ -1199,8 +1201,10 @@ LayoutRect LayoutBoxModelObject::localCaretRectForEmptyElement( |
| height; |
| LayoutUnit y = paddingTop() + borderTop() + (verticalSpace / 2); |
| return currentStyle.isHorizontalWritingMode() |
| - ? LayoutRect(x, y, caretWidth(), height) |
| - : LayoutRect(y, x, height, caretWidth()); |
| + ? LayoutRect(x, y, caretWidth(frameView()->getHostWindow()), |
| + height) |
| + : LayoutRect(y, x, height, |
| + caretWidth(frameView()->getHostWindow())); |
| } |
| const LayoutObject* LayoutBoxModelObject::pushMappingToContainer( |