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

Unified Diff: gfx/platform_font_mac.mm

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_gtk.cc ('k') | gfx/platform_font_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gfx/platform_font_mac.mm
diff --git a/gfx/platform_font_mac.mm b/gfx/platform_font_mac.mm
index 1fb831661e0660b1cb27ae0e5fd1790c51902027..80b9be41340c490e3b428dea42cc59131dd81d94 100644
--- a/gfx/platform_font_mac.mm
+++ b/gfx/platform_font_mac.mm
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/scoped_nsobject.h"
#include "base/sys_string_conversions.h"
+#include "base/utf_string_conversions.h"
#include "gfx/canvas_skia.h"
#include "gfx/font.h"
@@ -57,7 +58,8 @@ int PlatformFontMac::GetAverageCharacterWidth() const {
int PlatformFontMac::GetStringWidth(const std::wstring& text) const {
int width = 0, height = 0;
- CanvasSkia::SizeStringInt(text, Font(const_cast<PlatformFontMac*>(this)),
+ CanvasSkia::SizeStringInt(WideToUTF16Hack(text),
+ Font(const_cast<PlatformFontMac*>(this)),
&width, &height, gfx::Canvas::NO_ELLIPSIS);
return width;
}
« no previous file with comments | « gfx/platform_font_gtk.cc ('k') | gfx/platform_font_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698