Index: ui/gfx/canvas_skia.cc |
diff --git a/ui/gfx/canvas_skia.cc b/ui/gfx/canvas_skia.cc |
index b6830d556c6be7b56242e9ef3f100391bb352805..099c528fb6da57a40750d98123d89097d592a679 100644 |
--- a/ui/gfx/canvas_skia.cc |
+++ b/ui/gfx/canvas_skia.cc |
@@ -169,7 +169,7 @@ int AdjustPlatformSpecificFlags(const base::string16& text, int flags) { |
// static |
void Canvas::SizeStringInt(const base::string16& text, |
const FontList& font_list, |
- int* width, int* height, |
+ float* width, float* height, |
msw
2013/09/27 21:54:48
nit: one arg per line here, perhaps the function s
jianli
2013/10/01 00:32:58
Done. We can't return SizeF since width and height
|
int line_height, |
int flags) { |
DCHECK_GE(*width, 0); |
@@ -198,12 +198,12 @@ void Canvas::SizeStringInt(const base::string16& text, |
UpdateRenderText(rect, base::string16(), font_list, flags, 0, |
render_text.get()); |
- int h = 0; |
- int w = 0; |
+ float h = 0; |
+ float w = 0; |
for (size_t i = 0; i < strings.size(); ++i) { |
StripAcceleratorChars(flags, &strings[i]); |
render_text->SetText(strings[i]); |
- const Size& string_size = render_text->GetStringSize(); |
+ const SizeF& string_size = render_text->GetStringSize(); |
w = std::max(w, string_size.width()); |
h += (i > 0 && line_height > 0) ? line_height : string_size.height(); |
} |
@@ -222,7 +222,7 @@ void Canvas::SizeStringInt(const base::string16& text, |
StripAcceleratorChars(flags, &adjusted_text); |
UpdateRenderText(rect, adjusted_text, font_list, flags, 0, |
render_text.get()); |
- const Size& string_size = render_text->GetStringSize(); |
+ const SizeF& string_size = render_text->GetStringSizeF(); |
*width = string_size.width(); |
*height = string_size.height(); |
} |