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

Unified Diff: Source/core/animation/AnimationNodeTiming.cpp

Issue 939623002: Add TypeChecking=Unrestricted to Web Animation APIs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop AnimationAnimationPlayerTest.SetCurrentTimeUnrestrictedDouble Created 5 years, 10 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
« no previous file with comments | « Source/core/animation/AnimationNodeTiming.h ('k') | Source/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationNodeTiming.cpp
diff --git a/Source/core/animation/AnimationNodeTiming.cpp b/Source/core/animation/AnimationNodeTiming.cpp
index d469cb7556b29709094099415b650bc58cf2f902..7f0d23d7e79ce27e6dde87e3ea42fc95dce40d70 100644
--- a/Source/core/animation/AnimationNodeTiming.cpp
+++ b/Source/core/animation/AnimationNodeTiming.cpp
@@ -47,12 +47,12 @@ double AnimationNodeTiming::iterations()
return m_parent->specifiedTiming().iterationCount;
}
-void AnimationNodeTiming::duration(DoubleOrString& returnValue)
+void AnimationNodeTiming::duration(UnrestrictedDoubleOrString& returnValue)
{
if (std::isnan(m_parent->specifiedTiming().iterationDuration))
returnValue.setString("auto");
else
- returnValue.setDouble(m_parent->specifiedTiming().iterationDuration * 1000);
+ returnValue.setUnrestrictedDouble(m_parent->specifiedTiming().iterationDuration * 1000);
}
double AnimationNodeTiming::playbackRate()
@@ -105,10 +105,10 @@ void AnimationNodeTiming::setIterations(double iterations)
m_parent->updateSpecifiedTiming(timing);
}
-void AnimationNodeTiming::setDuration(const DoubleOrString& durationOrAuto)
+void AnimationNodeTiming::setDuration(const UnrestrictedDoubleOrString& durationOrAuto)
{
// Any strings other than "auto" are coerced to "auto".
- double duration = durationOrAuto.isString() ? std::numeric_limits<double>::quiet_NaN() : durationOrAuto.getAsDouble();
+ double duration = durationOrAuto.isString() ? std::numeric_limits<double>::quiet_NaN() : durationOrAuto.getAsUnrestrictedDouble();
Timing timing = m_parent->specifiedTiming();
TimingInput::setIterationDuration(timing, duration);
m_parent->updateSpecifiedTiming(timing);
« no previous file with comments | « Source/core/animation/AnimationNodeTiming.h ('k') | Source/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698