summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gfx/render_text.cc')
-rw-r--r--ui/gfx/render_text.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index aad57f4..7af7690 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -732,16 +732,14 @@ Point RenderText::GetAlignmentOffset() {
return Point();
}
-Point RenderText::GetOriginForSkiaDrawing() {
+Point RenderText::GetOriginForDrawing() {
Point origin(GetTextOrigin());
- // TODO(msw): Establish a vertical baseline for strings of mixed font heights.
+ // TODO(asvitkine): Use GetStringSize().height() here instead.
const Font& font = GetFont();
int height = font.GetHeight();
DCHECK_LE(height, display_rect().height());
// Center the text vertically in the display area.
origin.Offset(0, (display_rect().height() - height) / 2);
- // Offset to account for Skia expecting y to be the baseline.
- origin.Offset(0, font.GetBaseline());
return origin;
}