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

Unified Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 196413030: Web animations: Supply CSS transition easing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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
« no previous file with comments | « Source/core/animation/KeyframeEffectModelTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/css/CSSAnimations.cpp
diff --git a/Source/core/animation/css/CSSAnimations.cpp b/Source/core/animation/css/CSSAnimations.cpp
index 7755f01a943c7261fe3d083049e0ec09715d5521..3b0c1b8fee057f00ceed73844dfca75bb1915d6d 100644
--- a/Source/core/animation/css/CSSAnimations.cpp
+++ b/Source/core/animation/css/CSSAnimations.cpp
@@ -545,11 +545,19 @@ void CSSAnimations::calculateTransitionUpdateForProperty(CSSPropertyID id, const
if (AnimatableValue::usesDefaultInterpolation(to.get(), from.get()))
return;
+ Timing timing;
+ bool isPaused;
+ RefPtr<TimingFunction> timingFunction = timingFromAnimationData(anim, timing, isPaused);
+ ASSERT(!isPaused);
+ // Note that the backwards part is required for delay to work.
+ timing.fillMode = Timing::FillModeBoth;
+
KeyframeEffectModel::KeyframeVector keyframes;
RefPtrWillBeRawPtr<Keyframe> startKeyframe = Keyframe::create();
startKeyframe->setPropertyValue(id, from.get());
startKeyframe->setOffset(0);
+ startKeyframe->setEasing(timingFunction);
keyframes.append(startKeyframe);
RefPtrWillBeRawPtr<Keyframe> endKeyframe = Keyframe::create();
@@ -559,14 +567,6 @@ void CSSAnimations::calculateTransitionUpdateForProperty(CSSPropertyID id, const
RefPtrWillBeRawPtr<KeyframeEffectModel> effect = KeyframeEffectModel::create(keyframes);
- Timing timing;
- bool isPaused;
- RefPtr<TimingFunction> timingFunction = timingFromAnimationData(anim, timing, isPaused);
- ASSERT(!isPaused);
- timing.timingFunction = timingFunction;
- // Note that the backwards part is required for delay to work.
- timing.fillMode = Timing::FillModeBoth;
-
update->startTransition(id, from.get(), to.get(), InertAnimation::create(effect, timing, isPaused));
ASSERT(!element->activeAnimations() || !element->activeAnimations()->isAnimationStyleChange());
}
« no previous file with comments | « Source/core/animation/KeyframeEffectModelTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698