summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text_linux.cc
diff options
context:
space:
mode:
authordbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-04 06:32:05 +0000
committerdbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-04 06:32:05 +0000
commitfa02121a559929746edbe8710de8af739ae2e484 (patch)
tree3393379fa630c1fc3e83c112a1c060ebed0bd273 /ui/gfx/render_text_linux.cc
parenta1ce93fef13e2f0bb9c8a48121fe239980ba6b82 (diff)
downloadchromium_src-fa02121a559929746edbe8710de8af739ae2e484.zip
chromium_src-fa02121a559929746edbe8710de8af739ae2e484.tar.gz
chromium_src-fa02121a559929746edbe8710de8af739ae2e484.tar.bz2
Revert 130447 - Use a common font baseline in RenderText classes.
This ensures the text in different runs gets aligned along a common bottom baseline and that the correct font's baseline gets used in case of font fallback. Also, uses the correct height when centering text. BUG=105550 TEST=none Review URL: https://chromiumcodereview.appspot.com/9968040 TBR=asvitkine@chromium.org Review URL: https://chromiumcodereview.appspot.com/9965140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/render_text_linux.cc')
-rw-r--r--ui/gfx/render_text_linux.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/ui/gfx/render_text_linux.cc b/ui/gfx/render_text_linux.cc
index e411cd9..f5c3a9b 100644
--- a/ui/gfx/render_text_linux.cc
+++ b/ui/gfx/render_text_linux.cc
@@ -359,10 +359,7 @@ void RenderTextLinux::SetupPangoAttributes(PangoLayout* layout) {
void RenderTextLinux::DrawVisualText(Canvas* canvas) {
DCHECK(layout_);
- Point offset(GetOriginForDrawing());
- // Skia will draw glyphs with respect to the baseline.
- offset.Offset(0, PANGO_PIXELS(pango_layout_get_baseline(layout_)));
-
+ Point offset(GetOriginForSkiaDrawing());
SkScalar x = SkIntToScalar(offset.x());
SkScalar y = SkIntToScalar(offset.y());