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

Unified Diff: third_party/WebKit/Source/core/svg/animation/SVGSMILElement.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/core/svg/animation/SVGSMILElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
index 1dd3e14146eeef09ce7438143d0cb6e77e844d49..f638827aac56473d173ea7e849f43d032a2337ff 100644
--- a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
+++ b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
@@ -36,7 +36,6 @@
#include "core/svg/SVGSVGElement.h"
#include "core/svg/SVGURIReference.h"
#include "core/svg/animation/SMILTimeContainer.h"
-#include "platform/FloatConversion.h"
#include "platform/heap/Handle.h"
#include "wtf/MathExtras.h"
#include "wtf/StdLibExtras.h"
@@ -1084,11 +1083,11 @@ float SVGSMILElement::calculateAnimationPercentAndRepeat(SMILTime elapsed, unsig
percent = percent - floor(percent);
if (percent < std::numeric_limits<float>::epsilon() || 1 - percent < std::numeric_limits<float>::epsilon())
return 1.0f;
- return narrowPrecisionToFloat(percent);
+ return clampTo<float>(percent);
}
repeat = static_cast<unsigned>(activeTime.value() / simpleDuration.value());
SMILTime simpleTime = fmod(activeTime.value(), simpleDuration.value());
- return narrowPrecisionToFloat(simpleTime.value() / simpleDuration.value());
+ return clampTo<float>(simpleTime.value() / simpleDuration.value());
}
SMILTime SVGSMILElement::calculateNextProgressTime(SMILTime elapsed) const

Powered by Google App Engine
This is Rietveld 408576698