Index: ui/gfx/render_text.h |
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h |
index 598f4e1d181598e590042105ceaed5a56923eae1..ea2ea0f01b727e4859090dd46d084882224aac84 100644 |
--- a/ui/gfx/render_text.h |
+++ b/ui/gfx/render_text.h |
@@ -25,6 +25,7 @@ |
#include "ui/gfx/rect.h" |
#include "ui/gfx/selection_model.h" |
#include "ui/gfx/shadow_value.h" |
+#include "ui/gfx/size_f.h" |
#include "ui/gfx/text_constants.h" |
#include "ui/gfx/vector2d.h" |
@@ -326,6 +327,12 @@ class UI_EXPORT RenderText { |
// shadows. |
virtual Size GetStringSize() = 0; |
+ // This is same as GetStringSize except that floating-point size is returned. |
+ // The default implementation is same as GetStringSize. Certain platform, like |
msw
2013/09/27 21:54:48
nit: "Certain platforms that compute the text size
jianli
2013/10/01 00:32:58
Done.
|
+ // MacOS, that computes the text size as floating-point values, will override |
+ // this method. |
+ virtual SizeF GetStringSizeF(); |
+ |
// Returns the width of the content (which is the wrapped width in multiline |
// mode). Reserves room for the cursor if |cursor_enabled_| is true. |
int GetContentWidth(); |