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

Unified Diff: third_party/WebKit/Source/platform/geometry/FloatRect.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/FloatRect.cpp
diff --git a/third_party/WebKit/Source/platform/geometry/FloatRect.cpp b/third_party/WebKit/Source/platform/geometry/FloatRect.cpp
index 75184861aed12ecfbe6bf94f0b65d0116fe91214..391ad0215c3515de411d8bb7b9e0a8cca1969c74 100644
--- a/third_party/WebKit/Source/platform/geometry/FloatRect.cpp
+++ b/third_party/WebKit/Source/platform/geometry/FloatRect.cpp
@@ -26,7 +26,6 @@
#include "platform/geometry/FloatRect.h"
-#include "platform/FloatConversion.h"
#include "platform/geometry/IntRect.h"
#include "platform/geometry/LayoutRect.h"
#include "third_party/skia/include/core/SkRect.h"
@@ -60,7 +59,7 @@ void FloatRect::move(const IntSize& delta)
FloatRect FloatRect::narrowPrecision(double x, double y, double width, double height)
{
- return FloatRect(narrowPrecisionToFloat(x), narrowPrecisionToFloat(y), narrowPrecisionToFloat(width), narrowPrecisionToFloat(height));
+ return FloatRect(clampTo<float>(x), clampTo<float>(y), clampTo<float>(width), clampTo<float>(height));
}
#if ENABLE(ASSERT)
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/FloatPoint.cpp ('k') | third_party/WebKit/Source/platform/geometry/FloatSize.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698