| Index: Source/core/css/resolver/StyleResolver.cpp
|
| diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
|
| index 7f0c7acb3afa822111d5783cfd2c9f3b8bf1eccf..73f5b530e8c60123413ac6b7f2b47b8d6bf02138 100644
|
| --- a/Source/core/css/resolver/StyleResolver.cpp
|
| +++ b/Source/core/css/resolver/StyleResolver.cpp
|
| @@ -35,6 +35,7 @@
|
| #include "core/StylePropertyShorthand.h"
|
| #include "core/animation/AnimationTimeline.h"
|
| #include "core/animation/ElementAnimations.h"
|
| +#include "core/animation/InvalidatableStyleInterpolation.h"
|
| #include "core/animation/KeyframeEffect.h"
|
| #include "core/animation/StyleInterpolation.h"
|
| #include "core/animation/animatable/AnimatableValue.h"
|
| @@ -959,15 +960,15 @@ bool StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Ele
|
| state.setApplyPropertyToVisitedLinkStyle(true);
|
| }
|
|
|
| - const ActiveInterpolationMap& activeInterpolationsForAnimations = state.animationUpdate().activeInterpolationsForAnimations();
|
| - const ActiveInterpolationMap& activeInterpolationsForTransitions = state.animationUpdate().activeInterpolationsForTransitions();
|
| - applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsForAnimations);
|
| - applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsForTransitions);
|
| + const ActiveInterpolationsMap& activeInterpolationsMapForAnimations = state.animationUpdate().activeInterpolationsForAnimations();
|
| + const ActiveInterpolationsMap& activeInterpolationsMapForTransitions = state.animationUpdate().activeInterpolationsForTransitions();
|
| + applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsMapForAnimations);
|
| + applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsMapForTransitions);
|
|
|
| updateFont(state);
|
|
|
| - applyAnimatedProperties<LowPropertyPriority>(state, activeInterpolationsForAnimations);
|
| - applyAnimatedProperties<LowPropertyPriority>(state, activeInterpolationsForTransitions);
|
| + applyAnimatedProperties<LowPropertyPriority>(state, activeInterpolationsMapForAnimations);
|
| + applyAnimatedProperties<LowPropertyPriority>(state, activeInterpolationsMapForTransitions);
|
|
|
| // Start loading resources used by animations.
|
| loadPendingResources(state);
|
| @@ -1009,16 +1010,19 @@ StyleRuleKeyframes* StyleResolver::findKeyframesRule(const Element* element, con
|
| }
|
|
|
| template <CSSPropertyPriority priority>
|
| -void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const HashMap<PropertyHandle, RefPtr<Interpolation>>& activeInterpolations)
|
| +void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const ActiveInterpolationsMap& activeInterpolationsMap)
|
| {
|
| - for (const auto& interpolationEntry : activeInterpolations) {
|
| - if (!interpolationEntry.key.isCSSProperty())
|
| + for (const auto& interpolationsVectorEntry : activeInterpolationsMap) {
|
| + if (!interpolationsVectorEntry.key.isCSSProperty())
|
| continue;
|
| - CSSPropertyID property = interpolationEntry.key.cssProperty();
|
| + CSSPropertyID property = interpolationsVectorEntry.key.cssProperty();
|
| if (!CSSPropertyPriorityData<priority>::propertyHasPriority(property))
|
| continue;
|
| - const StyleInterpolation* interpolation = toStyleInterpolation(interpolationEntry.value.get());
|
| - interpolation->apply(state);
|
| + const Interpolation& interpolation = *interpolationsVectorEntry.value.first();
|
| + if (interpolation.isInvalidatableStyleInterpolation())
|
| + InvalidatableStyleInterpolation::applyStack(interpolationsVectorEntry.value, state);
|
| + else
|
| + toStyleInterpolation(interpolation).apply(state);
|
| }
|
| }
|
|
|
|
|