| Index: third_party/WebKit/Source/platform/geometry/FloatRoundedRect.cpp
|
| diff --git a/third_party/WebKit/Source/platform/geometry/FloatRoundedRect.cpp b/third_party/WebKit/Source/platform/geometry/FloatRoundedRect.cpp
|
| index 245a96b25ccda2c40f706d5053d388d86e739923..6e5b0ee4fec4a71e259f7101ab9926b43eaae242 100644
|
| --- a/third_party/WebKit/Source/platform/geometry/FloatRoundedRect.cpp
|
| +++ b/third_party/WebKit/Source/platform/geometry/FloatRoundedRect.cpp
|
| @@ -32,10 +32,7 @@
|
| #include "platform/geometry/FloatQuad.h"
|
|
|
| #include <algorithm>
|
| -
|
| -#ifndef NDEBUG
|
| -#include <stdio.h>
|
| -#endif
|
| +#include <ostream> // NOLINT
|
|
|
| namespace blink {
|
|
|
| @@ -140,15 +137,6 @@ void FloatRoundedRect::Radii::expand(float topWidth, float bottomWidth, float le
|
| }
|
| }
|
|
|
| -#ifndef NDEBUG
|
| -void FloatRoundedRect::Radii::show() const
|
| -{
|
| - fprintf(stderr, "topLeft=[%f,%f], topRight=[%f,%f], bottomLeft=[%f,%f], bottomRight=[%f,%f]\n",
|
| - topLeft().width(), topLeft().height(), topRight().width(), topRight().height(),
|
| - bottomLeft().width(), bottomLeft().height(), bottomRight().width(), bottomRight().height());
|
| -}
|
| -#endif
|
| -
|
| static inline float cornerRectIntercept(float y, const FloatRect& cornerRect)
|
| {
|
| ASSERT(cornerRect.height() > 0);
|
| @@ -349,14 +337,22 @@ void FloatRoundedRect::adjustRadii()
|
| m_radii.scale(widthRatio < heightRatio ? widthRatio : heightRatio);
|
| }
|
|
|
| -#ifndef NDEBUG
|
| -void FloatRoundedRect::show() const
|
| +std::ostream& operator<<(std::ostream& os, const FloatRoundedRect::Radii& radii)
|
| +{
|
| + os << "FloatRoundedRect::Radii("
|
| + << "topLeft=" << radii.topLeft() << ", "
|
| + << "topRight=" << radii.topRight() << ", "
|
| + << "bottomLeft" << radii.bottomLeft() << ", "
|
| + << "bottomRight=" << radii.bottomRight() << ")";
|
| + return os;
|
| +}
|
| +
|
| +std::ostream& operator<<(std::ostream& os, const FloatRoundedRect& roundedRect)
|
| {
|
| - fprintf(stderr, "FloatRoundedRect:\n rect: ");
|
| - m_rect.show();
|
| - fprintf(stderr, " radii: ");
|
| - m_radii.show();
|
| + os << "FloatRoundedRect("
|
| + << "rect=" << roundedRect.rect() << ", "
|
| + << "radii=" << roundedRect.getRadii() << ")";
|
| + return os;
|
| }
|
| -#endif
|
|
|
| } // namespace blink
|
|
|