summaryrefslogtreecommitdiffstats
path: root/views/view_text_utils.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-22 18:15:25 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-22 18:15:25 +0000
commit36f1e277205d0bc6621866b1242ea7ee00166d4a (patch)
tree9d9fa8d67e2c2a4d5be66a99a04aa45d6fa9b58a /views/view_text_utils.cc
parent27a64faaaa8a1d23826794a5763d34cac5fbf9fe (diff)
downloadchromium_src-36f1e277205d0bc6621866b1242ea7ee00166d4a.zip
chromium_src-36f1e277205d0bc6621866b1242ea7ee00166d4a.tar.gz
chromium_src-36f1e277205d0bc6621866b1242ea7ee00166d4a.tar.bz2
Convert SizeStringInt from taking a wstring to a string16.
BUG=23581 Review URL: http://codereview.chromium.org/5158006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view_text_utils.cc')
-rw-r--r--views/view_text_utils.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/views/view_text_utils.cc b/views/view_text_utils.cc
index 9b4442d..73bef45 100644
--- a/views/view_text_utils.cc
+++ b/views/view_text_utils.cc
@@ -117,7 +117,7 @@ void DrawTextStartingFrom(gfx::Canvas* canvas,
word = text; // Draw the whole text at once.
int w = font.GetStringWidth(word), h = font.GetHeight();
- gfx::CanvasSkia::SizeStringInt(word, font, &w, &h, flags);
+ gfx::CanvasSkia::SizeStringInt(WideToUTF16Hack(word), font, &w, &h, flags);
// If we exceed the boundaries, we need to wrap.
WrapIfWordDoesntFit(w, font.GetHeight(), position, bounds);
@@ -131,7 +131,8 @@ void DrawTextStartingFrom(gfx::Canvas* canvas,
// left of the LTR string.
if (ltr_within_rtl && word[word.size() - 1] == L' ') {
int space_w = font.GetStringWidth(L" "), space_h = font.GetHeight();
- gfx::CanvasSkia::SizeStringInt(L" ", font, &space_w, &space_h, flags);
+ gfx::CanvasSkia::SizeStringInt(UTF8ToUTF16(" "), font, &space_w,
+ &space_h, flags);
x += space_w;
}
}