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

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

Issue 143573004: [wip] interpolable value refactor. NOT FOR LANDING. Base URL: https://chromium.googlesource.com/chromium/blink.git@interpolationWrap
Patch Set: Created 6 years, 11 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/css/resolver/StyleResolver.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index abd3517b283415004c512f07fd016cef5c6b7606..af8d8f3f6280af02f9c8eb39938837ecb9547a49 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -1150,8 +1150,8 @@ void StyleResolver::applyAnimatedProperties(StyleResolverState& state, Element*
if (!state.animationUpdate())
return;
- const AnimationEffect::CompositableValueMap& compositableValuesForAnimations = state.animationUpdate()->compositableValuesForAnimations();
- const AnimationEffect::CompositableValueMap& compositableValuesForTransitions = state.animationUpdate()->compositableValuesForTransitions();
+ const HashMap<CSSPropertyID, RefPtr<Interpolation> >& compositableValuesForAnimations = state.animationUpdate()->compositableValuesForAnimations();
+ const HashMap<CSSPropertyID, RefPtr<Interpolation> >& compositableValuesForTransitions = state.animationUpdate()->compositableValuesForTransitions();
applyAnimatedProperties<HighPriorityProperties>(state, compositableValuesForAnimations);
applyAnimatedProperties<HighPriorityProperties>(state, compositableValuesForTransitions);
applyAnimatedProperties<LowPriorityProperties>(state, compositableValuesForAnimations);
@@ -1166,19 +1166,18 @@ 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> >& compositableValues)
{
ASSERT(RuntimeEnabledFeatures::webAnimationsCSSEnabled());
ASSERT(pass != VariableDefinitions);
ASSERT(pass != AnimationProperties);
- for (AnimationEffect::CompositableValueMap::const_iterator iter = compositableValues.begin(); iter != compositableValues.end(); ++iter) {
+ for (HashMap<CSSPropertyID, RefPtr<Interpolation> >::const_iterator iter = compositableValues.begin(); iter != compositableValues.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 = static_cast<const StyleInterpolation *>(iter->value.get());
+ interpolation->apply(state);
}
}
« no previous file with comments | « Source/core/css/resolver/StyleResolver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698