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

Unified Diff: ui/gfx/rect_f.cc

Issue 24883002: Uses and returns the fractional width in text eliding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win bots 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/rect_f.cc
diff --git a/ui/gfx/rect_f.cc b/ui/gfx/rect_f.cc
index c55752aa843e0dea806df6fe2c98100293c66f7f..d2abc23c421d63d587d6332525f9ae824078ae73 100644
--- a/ui/gfx/rect_f.cc
+++ b/ui/gfx/rect_f.cc
@@ -19,6 +19,12 @@ template class RectBase<RectF, PointF, SizeF, InsetsF, Vector2dF, float>;
typedef class RectBase<RectF, PointF, SizeF, InsetsF, Vector2dF,
float> RectBaseT;
+#if defined(OS_MACOSX)
+CGRect RectF::ToCGRect() const {
+ return CGRectMake(x(), y(), width(), height());
+}
+#endif
+
bool RectF::IsExpressibleAsRect() const {
return IsExpressibleAsInt(x()) && IsExpressibleAsInt(y()) &&
IsExpressibleAsInt(width()) && IsExpressibleAsInt(height()) &&

Powered by Google App Engine
This is Rietveld 408576698