Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Unified Diff: gfx/platform_font_win.cc

Issue 5158006: Convert SizeStringInt from taking a wstring to a string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gfx/platform_font_mac.mm ('k') | views/controls/button/text_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gfx/platform_font_win.cc
diff --git a/gfx/platform_font_win.cc b/gfx/platform_font_win.cc
index 41caddeff9a59a0be9e167047941c7304e9eed77..05db587336fc14a7a1a8e5573f71f5ec3b0469d3 100644
--- a/gfx/platform_font_win.cc
+++ b/gfx/platform_font_win.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "base/win_util.h"
#include "gfx/canvas_skia.h"
#include "gfx/font.h"
@@ -103,7 +104,8 @@ int PlatformFontWin::GetAverageCharacterWidth() const {
int PlatformFontWin::GetStringWidth(const std::wstring& text) const {
int width = 0, height = 0;
- CanvasSkia::SizeStringInt(text, Font(const_cast<PlatformFontWin*>(this)),
+ CanvasSkia::SizeStringInt(WideToUTF16Hack(text),
+ Font(const_cast<PlatformFontWin*>(this)),
&width, &height, gfx::Canvas::NO_ELLIPSIS);
return width;
}
« no previous file with comments | « gfx/platform_font_mac.mm ('k') | views/controls/button/text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698