Index: third_party/WebKit/Source/platform/geometry/IntRect.cpp |
diff --git a/third_party/WebKit/Source/platform/geometry/IntRect.cpp b/third_party/WebKit/Source/platform/geometry/IntRect.cpp |
index 0539c8e88aae271dc0373421969fb45d2cc611a1..6fa23bb2d286ec9846b4766086d9c4cc80b45dae 100644 |
--- a/third_party/WebKit/Source/platform/geometry/IntRect.cpp |
+++ b/third_party/WebKit/Source/platform/geometry/IntRect.cpp |
@@ -29,9 +29,9 @@ |
#include "platform/geometry/LayoutRect.h" |
#include "third_party/skia/include/core/SkRect.h" |
#include "ui/gfx/geometry/rect.h" |
-#include "wtf/text/WTFString.h" |
#include <algorithm> |
+#include <ostream> // NOLINT |
namespace blink { |
@@ -187,17 +187,14 @@ IntRect unionRectEvenIfEmpty(const Vector<IntRect>& rects) |
return result; |
} |
-#ifndef NDEBUG |
- // Prints the rect to the screen. |
-void IntRect::show() const |
+std::ostream& operator<<(std::ostream& os, const IntRect& rect) |
{ |
- LayoutRect(*this).show(); |
+ os << "IntRect(" |
+ << "x=" << rect.x() << ", " |
+ << "y=" << rect.y() << ", " |
+ << "width=" << rect.width() << ", " |
+ << "height=" << rect.height() << ")"; |
+ return os; |
} |
-String IntRect::toString() const |
-{ |
- return String::format("%s %s", location().toString().ascii().data(), size().toString().ascii().data()); |
-} |
-#endif |
- |
} // namespace blink |