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

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

Issue 142523005: Web Animations: Define easing for each keyframe (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Rename s_accuracy to accuracyForKeyframeEasing Created 6 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 | « no previous file | Source/core/animation/AnimationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/Animation.cpp
diff --git a/Source/core/animation/Animation.cpp b/Source/core/animation/Animation.cpp
index eff3730f5d445f5f0db56ccdf7f0b982486b8c49..9d8e7e3056d97657ac936bd068ab23c46a2663f3 100644
--- a/Source/core/animation/Animation.cpp
+++ b/Source/core/animation/Animation.cpp
@@ -184,6 +184,14 @@ static PassRefPtr<KeyframeEffectModel> createKeyframeEffectModel(Element* elemen
if (compositeString == "add")
keyframe->setComposite(AnimationEffect::CompositeAdd);
+ String timingFunctionString;
+ if (keyframeDictionaryVector[i].get("easing", timingFunctionString)) {
+ RefPtr<CSSValue> timingFunctionValue = BisonCSSParser::parseAnimationTimingFunctionValue(timingFunctionString);
+ if (timingFunctionValue) {
+ keyframe->setEasing(CSSToStyleMap::animationTimingFunction(timingFunctionValue.get(), false));
+ }
+ }
+
Vector<String> keyframeProperties;
keyframeDictionaryVector[i].getOwnPropertyNames(keyframeProperties);
« no previous file with comments | « no previous file | Source/core/animation/AnimationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698