| Index: ui/gfx/rect_f.cc
|
| diff --git a/ui/gfx/rect_f.cc b/ui/gfx/rect_f.cc
|
| index ffa9faac1a53d73c5ea3974e33f3743afb9f5862..fa4e99d17cbd7f12fdfe60ef605f467d053c7630 100644
|
| --- a/ui/gfx/rect_f.cc
|
| +++ b/ui/gfx/rect_f.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/stringprintf.h"
|
| #include "ui/gfx/insets_f.h"
|
| #include "ui/gfx/rect_base_impl.h"
|
| +#include "ui/gfx/safe_integer_conversions.h"
|
|
|
| namespace gfx {
|
|
|
| @@ -39,6 +40,12 @@ RectF::RectF(const gfx::PointF& origin, const gfx::SizeF& size)
|
|
|
| RectF::~RectF() {}
|
|
|
| +bool RectF::IsExpressibleAsRect() const {
|
| + return IsExpressibleAsInt(x()) && IsExpressibleAsInt(y()) &&
|
| + IsExpressibleAsInt(width()) && IsExpressibleAsInt(height()) &&
|
| + IsExpressibleAsInt(right()) && IsExpressibleAsInt(bottom());
|
| +}
|
| +
|
| std::string RectF::ToString() const {
|
| return base::StringPrintf("%s %s",
|
| origin().ToString().c_str(),
|
|
|