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

Unified Diff: ui/gfx/render_text.cc

Issue 24883002: Uses and returns the fractional width in text eliding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 7 years, 3 months 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
Index: ui/gfx/render_text.cc
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 6e7fbdad24469926a10a4f425faeeba0e8b7f242..d598aeaef44b04dc85646e0ac4a3c788d379110d 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -644,6 +644,11 @@ VisualCursorDirection RenderText::GetVisualDirectionOfLogicalEnd() {
CURSOR_RIGHT : CURSOR_LEFT;
}
+SizeF RenderText::GetStringSizeF() {
+ Size size = GetStringSize();
msw 2013/09/27 21:54:48 nit: const
jianli 2013/10/01 00:32:58 Done.
+ return SizeF(size.width(), size.height());
+}
+
int RenderText::GetContentWidth() {
return GetStringSize().width() + (cursor_enabled_ ? 1 : 0);
}

Powered by Google App Engine
This is Rietveld 408576698