Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutText.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp |
| index d6cc72e451eedaad34ef2b71ad43a2af188884a5..796646bafef56944887896421c951f0f3f56ce9f 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutText.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp |
| @@ -733,8 +733,8 @@ LayoutRect LayoutText::localCaretRect(InlineBox* inlineBox, |
| InlineTextBox* box = toInlineTextBox(inlineBox); |
| - int height = box->root().selectionHeight().toInt(); |
| - int top = box->root().selectionTop().toInt(); |
| + int height = style()->font().primaryFont()->getFontMetrics().height(); |
|
yosin_UTC9
2016/11/30 01:44:02
Could you use font ascendant and descendant instea
joone
2016/12/02 01:24:43
But, we need the height value and can get it easil
yosin_UTC9
2016/12/02 01:42:35
This function returns rectangle rather than height
|
| + int top = box->root().selectionBottom().toInt() - height; |
| // Go ahead and round left to snap it to the nearest pixel. |
| LayoutUnit left = box->positionForOffset(caretOffset); |