| Index: ui/gfx/geometry/rect_f.h
|
| diff --git a/ui/gfx/geometry/rect_f.h b/ui/gfx/geometry/rect_f.h
|
| index 3b132667e40d321f3b0e6b0d74c1495612844af7..703ad0b1ed0c2e350afd0aa45ef36acd52167b1e 100644
|
| --- a/ui/gfx/geometry/rect_f.h
|
| +++ b/ui/gfx/geometry/rect_f.h
|
| @@ -9,6 +9,7 @@
|
| #include <string>
|
|
|
| #include "ui/gfx/geometry/point_f.h"
|
| +#include "ui/gfx/geometry/rect.h"
|
| #include "ui/gfx/geometry/size_f.h"
|
| #include "ui/gfx/geometry/vector2d_f.h"
|
|
|
| @@ -31,6 +32,13 @@ class GFX_EXPORT RectF {
|
| RectF(const PointF& origin, const SizeF& size)
|
| : origin_(origin), size_(size) {}
|
|
|
| + explicit RectF(const Rect& r)
|
| + // TODO(danakj): Change these to checked_cast?
|
| + : RectF(static_cast<float>(r.x()),
|
| + static_cast<float>(r.y()),
|
| + static_cast<float>(r.width()),
|
| + static_cast<float>(r.height())) {}
|
| +
|
| #if defined(OS_MACOSX)
|
| explicit RectF(const CGRect& r);
|
| // Construct an equivalent CoreGraphics object.
|
|
|