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

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

Issue 2342913003: Replace narrowPrecisionToFloat with clampTo<float> (Closed)
Patch Set: Created 4 years, 3 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/FloatSize.cpp
diff --git a/third_party/WebKit/Source/platform/geometry/FloatSize.cpp b/third_party/WebKit/Source/platform/geometry/FloatSize.cpp
index d54d55d8979fd84fcaa027369e768b84f9096d46..7049b0b4cb213001c9fc306ab8f176a4083b3ce0 100644
--- a/third_party/WebKit/Source/platform/geometry/FloatSize.cpp
+++ b/third_party/WebKit/Source/platform/geometry/FloatSize.cpp
@@ -26,9 +26,9 @@
#include "platform/geometry/FloatSize.h"
-#include "platform/FloatConversion.h"
#include "platform/geometry/IntSize.h"
#include "platform/geometry/LayoutSize.h"
+#include "wtf/MathExtras.h"
#include "wtf/text/WTFString.h"
#include <limits>
#include <math.h>
@@ -58,7 +58,7 @@ bool FloatSize::isExpressibleAsIntSize() const
FloatSize FloatSize::narrowPrecision(double width, double height)
{
- return FloatSize(narrowPrecisionToFloat(width), narrowPrecisionToFloat(height));
+ return FloatSize(clampTo<float>(width), clampTo<float>(height));
}
String FloatSize::toString() const

Powered by Google App Engine
This is Rietveld 408576698