summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-22 01:53:45 +0000
committerkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-22 01:53:45 +0000
commit3d0d7f26c83a2f11a66864bfb28256d538b09e06 (patch)
treea3e274e7371f8ef0c3d9bfb33349e6a0e9f9393e /ui
parent216d9164d5f41945134f4384f3e8cc3ae9a9dfcc (diff)
downloadchromium_src-3d0d7f26c83a2f11a66864bfb28256d538b09e06.zip
chromium_src-3d0d7f26c83a2f11a66864bfb28256d538b09e06.tar.gz
chromium_src-3d0d7f26c83a2f11a66864bfb28256d538b09e06.tar.bz2
Fix one-character misalignment of styles in gfx::RenderTextLinux.
This fixes the bug that underlines for IME composition text are sometimes displaced in Aura omnibox. BUG=132730 TEST=manually tested the following repro steps: 1) Run ChromeOS Chrome. 2) Open language settings and add Pinyin input, and enable it from tray. 3) Focus omnibox. 4) Type [u], [enter], [u], [u]. 5) Verify the underline is below the last two "u"s. Review URL: https://chromiumcodereview.appspot.com/10616002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143510 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/gfx/render_text_linux.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/gfx/render_text_linux.cc b/ui/gfx/render_text_linux.cc
index 0a62c89..67fed70 100644
--- a/ui/gfx/render_text_linux.cc
+++ b/ui/gfx/render_text_linux.cc
@@ -428,7 +428,6 @@ void RenderTextLinux::DrawVisualText(Canvas* canvas) {
// positioning.
pos[i].set(glyph_x + pango_units_to_double(glyph.geometry.x_offset),
y + pango_units_to_double(glyph.geometry.y_offset));
- glyph_x += pango_units_to_double(glyph.geometry.width);
// If this glyph is beyond the current style, draw the glyphs so far and
// advance to the next style.
@@ -455,6 +454,8 @@ void RenderTextLinux::DrawVisualText(Canvas* canvas) {
} while (style >= 0 && style < static_cast<int>(styles.size()) &&
!IndexInRange(style_ranges_utf8[style], glyph_byte_index));
}
+
+ glyph_x += pango_units_to_double(glyph.geometry.width);
}
// Draw the remaining glyphs.