Index: ui/gfx/rect_f.cc |
diff --git a/ui/gfx/rect_f.cc b/ui/gfx/rect_f.cc |
index fa4e99d17cbd7f12fdfe60ef605f467d053c7630..4413fb85f71832024f3b1c560aada3aabe590799 100644 |
--- a/ui/gfx/rect_f.cc |
+++ b/ui/gfx/rect_f.cc |
@@ -52,6 +52,18 @@ std::string RectF::ToString() const { |
size().ToString().c_str()); |
} |
+RectF operator+(const RectF& lhs, const Vector2dF& rhs) { |
+ RectF result(lhs); |
+ result += rhs; |
+ return result; |
+} |
+ |
+RectF operator-(const RectF& lhs, const Vector2dF& rhs) { |
+ RectF result(lhs); |
+ result -= rhs; |
+ return result; |
+} |
+ |
RectF IntersectRects(const RectF& a, const RectF& b) { |
RectF result = a; |
result.Intersect(b); |