| Index: Source/core/rendering/RenderBoxModelObject.cpp
|
| diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp
|
| index d8e6b964a86ff8542c214b0063fbfc997faca326..0f19eef4aff7c5bc08d05f9997643a974c4e2bf3 100644
|
| --- a/Source/core/rendering/RenderBoxModelObject.cpp
|
| +++ b/Source/core/rendering/RenderBoxModelObject.cpp
|
| @@ -2561,7 +2561,6 @@ LayoutRect RenderBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width,
|
| // constructed and this kludge is not called any more. So only the caret size
|
| // of an empty :first-line'd block is wrong. I think we can live with that.
|
| RenderStyle* currentStyle = firstLineStyle();
|
| - LayoutUnit height = style()->fontMetrics().height();
|
|
|
| enum CaretAlignment { alignLeft, alignRight, alignCenter };
|
|
|
| @@ -2613,8 +2612,9 @@ LayoutRect RenderBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width,
|
| }
|
| x = std::min(x, std::max<LayoutUnit>(maxX - caretWidth, 0));
|
|
|
| - LayoutUnit y = paddingTop() + borderTop();
|
| -
|
| + LayoutUnit height = 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);
|
| }
|
|
|
|
|