Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(706)

Unified Diff: third_party/WebKit/Source/platform/geometry/DoubleSize.cpp

Issue 2195903002: Add Double{Size, Point, Rect} pretty printers for logging and testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@geometryPrettyPrinters2
Patch Set: Remove unnecessary String casts Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/geometry/DoubleSize.cpp
diff --git a/third_party/WebKit/Source/platform/geometry/DoubleSize.cpp b/third_party/WebKit/Source/platform/geometry/DoubleSize.cpp
index c7c0f93b251c5af4b975d647944898c451fb8ce8..ef1642d9ae1cf845a0ea697a220dcaed2f9fb6c3 100644
--- a/third_party/WebKit/Source/platform/geometry/DoubleSize.cpp
+++ b/third_party/WebKit/Source/platform/geometry/DoubleSize.cpp
@@ -4,7 +4,6 @@
#include "platform/geometry/DoubleSize.h"
#include "platform/geometry/LayoutSize.h"
-
#include "wtf/text/WTFString.h"
#include <limits>
@@ -23,11 +22,9 @@ bool DoubleSize::isZero() const
return fabs(m_width) < std::numeric_limits<double>::epsilon() && fabs(m_height) < std::numeric_limits<double>::epsilon();
}
-#ifndef NDEBUG
String DoubleSize::toString() const
{
- return String::format("%fx%f", width(), height());
+ return String::format("%lgx%lg", width(), height());
}
-#endif
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698