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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGMarkerData.h

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/core/layout/svg/SVGMarkerData.h
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGMarkerData.h b/third_party/WebKit/Source/core/layout/svg/SVGMarkerData.h
index 5dec45f6b0c75c58a19633ffb7749bd4d745589b..d3af587023fc25c449eebe1083074cceaeeadc3d 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGMarkerData.h
+++ b/third_party/WebKit/Source/core/layout/svg/SVGMarkerData.h
@@ -20,7 +20,6 @@
#ifndef SVGMarkerData_h
#define SVGMarkerData_h
-#include "platform/FloatConversion.h"
#include "platform/graphics/Path.h"
#include "wtf/Allocator.h"
#include "wtf/MathExtras.h"
@@ -111,14 +110,14 @@ private:
case StartMarker:
if (m_autoStartReverse)
outAngle += 180;
- return narrowPrecisionToFloat(outAngle);
+ return clampTo<float>(outAngle);
case MidMarker:
// WK193015: Prevent bugs due to angles being non-continuous.
if (fabs(inAngle - outAngle) > 180)
inAngle += 360;
- return narrowPrecisionToFloat((inAngle + outAngle) / 2);
+ return clampTo<float>((inAngle + outAngle) / 2);
case EndMarker:
- return narrowPrecisionToFloat(inAngle);
+ return clampTo<float>(inAngle);
}
ASSERT_NOT_REACHED();

Powered by Google App Engine
This is Rietveld 408576698