summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text_linux.cc
diff options
context:
space:
mode:
authorxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 04:20:56 +0000
committerxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 04:20:56 +0000
commit1a353f1ce3a2c57a94555300ad1d9868d730feba (patch)
treee9f56376a6e7f8518deb746f80eb95f9162a120a /ui/gfx/render_text_linux.cc
parent78af64517c602e388da9f5708dd0f9c2e17ad109 (diff)
downloadchromium_src-1a353f1ce3a2c57a94555300ad1d9868d730feba.zip
chromium_src-1a353f1ce3a2c57a94555300ad1d9868d730feba.tar.gz
chromium_src-1a353f1ce3a2c57a94555300ad1d9868d730feba.tar.bz2
Fix cursor in replacement mode is not drawn correctly.
Fix a cursor bound width calculation bug in RenderTextLinux when in replacement mode. When in replacement mode, fill cursor as black rectangle and draw the underline character as white. BUG=110109 TEST=manual, RenderTextTest.CursorBoundsInReplacementMode Review URL: http://codereview.chromium.org/9187076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/render_text_linux.cc')
-rw-r--r--ui/gfx/render_text_linux.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/gfx/render_text_linux.cc b/ui/gfx/render_text_linux.cc
index 820016f..fe3287c 100644
--- a/ui/gfx/render_text_linux.cc
+++ b/ui/gfx/render_text_linux.cc
@@ -128,7 +128,7 @@ Rect RenderTextLinux::GetCursorBounds(const SelectionModel& selection,
bounds.set_origin(ToViewPoint(bounds.origin()));
if (!insert_mode)
- bounds.set_width(std::abs(pos.width));
+ bounds.set_width(PANGO_PIXELS(std::abs(pos.width)));
return bounds;
}