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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 194673002: Web Animations: Refactor KeyframeEffectModel to work via an InterpolationEffect. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@interpolationWrap
Patch Set: 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/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 53348df162a2e4dbeb211c5f3735659ab860ba47..b06632ac545d7faaca921f9c717c92f3a393c07f 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -1072,12 +1072,12 @@ void StyleResolver::applyAnimatedProperties(StyleResolverState& state, Element*
if (!state.animationUpdate())
return;
- const AnimationEffect::CompositableValueMap& compositableValuesForAnimations = state.animationUpdate()->compositableValuesForAnimations();
- const AnimationEffect::CompositableValueMap& compositableValuesForTransitions = state.animationUpdate()->compositableValuesForTransitions();
- applyAnimatedProperties<HighPriorityProperties>(state, compositableValuesForAnimations);
- applyAnimatedProperties<HighPriorityProperties>(state, compositableValuesForTransitions);
- applyAnimatedProperties<LowPriorityProperties>(state, compositableValuesForAnimations);
- applyAnimatedProperties<LowPriorityProperties>(state, compositableValuesForTransitions);
+ const HashMap<CSSPropertyID, RefPtr<Interpolation> >& activeInterpolationsForAnimations = state.animationUpdate()->activeInterpolationsForAnimations();
+ const HashMap<CSSPropertyID, RefPtr<Interpolation> >& activeInterpolationsForTransitions = state.animationUpdate()->activeInterpolationsForTransitions();
+ applyAnimatedProperties<HighPriorityProperties>(state, activeInterpolationsForAnimations);
+ applyAnimatedProperties<HighPriorityProperties>(state, activeInterpolationsForTransitions);
+ applyAnimatedProperties<LowPriorityProperties>(state, activeInterpolationsForAnimations);
+ applyAnimatedProperties<LowPriorityProperties>(state, activeInterpolationsForTransitions);
// If the animations/transitions change opacity or transform, we need to update
// the style to impose the stacking rules. Note that this is also
@@ -1088,17 +1088,16 @@ void StyleResolver::applyAnimatedProperties(StyleResolverState& state, Element*
}
template <StyleResolver::StyleApplicationPass pass>
-void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const AnimationEffect::CompositableValueMap& compositableValues)
+void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const HashMap<CSSPropertyID, RefPtr<Interpolation> >& activeInterpolations)
{
ASSERT(pass != AnimationProperties);
- for (AnimationEffect::CompositableValueMap::const_iterator iter = compositableValues.begin(); iter != compositableValues.end(); ++iter) {
+ for (HashMap<CSSPropertyID, RefPtr<Interpolation> >::const_iterator iter = activeInterpolations.begin(); iter != activeInterpolations.end(); ++iter) {
CSSPropertyID property = iter->key;
if (!isPropertyForPass<pass>(property))
continue;
- ASSERT_WITH_MESSAGE(!iter->value->dependsOnUnderlyingValue(), "Web Animations not yet implemented: An interface for compositing onto the underlying value.");
- RefPtr<AnimatableValue> animatableValue = iter->value->compositeOnto(0);
- AnimatedStyleBuilder::applyProperty(property, state, animatableValue.get());
+ const StyleInterpolation *interpolation = toStyleInterpolation(iter->value.get());
+ interpolation->apply(state);
}
}
« Source/core/animation/css/CSSAnimations.h ('K') | « Source/core/css/resolver/StyleResolver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698