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..a59b533421e38a9fd756086029b1859a7c9ed8d3 100644 |
--- a/third_party/WebKit/Source/platform/geometry/FloatRoundedRect.cpp |
+++ b/third_party/WebKit/Source/platform/geometry/FloatRoundedRect.cpp |
@@ -30,13 +30,9 @@ |
#include "platform/geometry/FloatRoundedRect.h" |
#include "platform/geometry/FloatQuad.h" |
- |
+#include "wtf/text/WTFString.h" |
#include <algorithm> |
-#ifndef NDEBUG |
-#include <stdio.h> |
-#endif |
- |
namespace blink { |
FloatRoundedRect::FloatRoundedRect(float x, float y, float width, float height) |
@@ -140,15 +136,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 +336,20 @@ void FloatRoundedRect::adjustRadii() |
m_radii.scale(widthRatio < heightRatio ? widthRatio : heightRatio); |
} |
-#ifndef NDEBUG |
-void FloatRoundedRect::show() const |
+String FloatRoundedRect::Radii::toString() const |
+{ |
+ return String::format("tl:%s; tr:%s; bl:%s; br:%s", |
+ topLeft().toString().ascii().data(), |
+ topRight().toString().ascii().data(), |
+ bottomLeft().toString().ascii().data(), |
+ bottomRight().toString().ascii().data()); |
+} |
+ |
+String FloatRoundedRect::toString() const |
{ |
- fprintf(stderr, "FloatRoundedRect:\n rect: "); |
- m_rect.show(); |
- fprintf(stderr, " radii: "); |
- m_radii.show(); |
+ return String::format("%s radii:(%s)", |
+ rect().toString().ascii().data(), |
+ getRadii().toString().ascii().data()); |
} |
-#endif |
} // namespace blink |