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

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

Issue 196413030: Web animations: Supply CSS transition easing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use iteration duration when choosing accuracy during keyframe animation Created 6 years, 9 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: Source/core/animation/InterpolationEffect.cpp
diff --git a/Source/core/animation/InterpolationEffect.cpp b/Source/core/animation/InterpolationEffect.cpp
index 579e9c51fa38272fdbb80d7b21f7d19cae2945f0..c8b41bf7eac6871b4dafa51c520fa8bcd30a6c04 100644
--- a/Source/core/animation/InterpolationEffect.cpp
+++ b/Source/core/animation/InterpolationEffect.cpp
@@ -7,11 +7,7 @@
namespace WebCore {
-namespace {
- const double accuracyForKeyframeEasing = 0.0000001;
-}
-
-PassOwnPtr<Vector<RefPtr<Interpolation> > > InterpolationEffect::getActiveInterpolations(double fraction) const
+PassOwnPtr<Vector<RefPtr<Interpolation> > > InterpolationEffect::getActiveInterpolations(double fraction, double iterationDuration) const
{
Vector<RefPtr<Interpolation> >* result = new Vector<RefPtr<Interpolation> >();
@@ -22,7 +18,7 @@ PassOwnPtr<Vector<RefPtr<Interpolation> > > InterpolationEffect::getActiveInterp
RefPtr<Interpolation> interpolation = record->m_interpolation;
double localFraction = (fraction - record->m_start) / (record->m_end - record->m_start);
if (record->m_easing)
- localFraction = record->m_easing->evaluate(localFraction, accuracyForKeyframeEasing);
+ localFraction = record->m_easing->evaluate(localFraction, accuracyForDuration(iterationDuration));
interpolation->interpolate(0, localFraction);
result->append(interpolation);
}

Powered by Google App Engine
This is Rietveld 408576698