Index: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
index 4ad4ef1d1cae45de5215e1e44ec7de5619c00202..51215eb4e4871d524cc473290256d2b7d9fdf564 100644 |
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
@@ -1171,21 +1171,22 @@ bool StyleResolver::ApplyAnimatedStandardProperties( |
state.SetApplyPropertyToVisitedLinkStyle(true); |
} |
- const ActiveInterpolationsMap& active_interpolations_map_for_animations = |
- state.AnimationUpdate().ActiveInterpolationsForAnimations(); |
+ const ActiveInterpolationsMap& |
+ active_interpolations_map_for_standard_animations = |
+ state.AnimationUpdate().ActiveInterpolationsForStandardAnimations(); |
const ActiveInterpolationsMap& |
active_interpolations_map_for_standard_transitions = |
state.AnimationUpdate().ActiveInterpolationsForStandardTransitions(); |
// TODO(crbug.com/644148): Apply animations on custom properties. |
ApplyAnimatedProperties<kHighPropertyPriority>( |
- state, active_interpolations_map_for_animations); |
+ state, active_interpolations_map_for_standard_animations); |
ApplyAnimatedProperties<kHighPropertyPriority>( |
state, active_interpolations_map_for_standard_transitions); |
UpdateFont(state); |
ApplyAnimatedProperties<kLowPropertyPriority>( |
- state, active_interpolations_map_for_animations); |
+ state, active_interpolations_map_for_standard_animations); |
ApplyAnimatedProperties<kLowPropertyPriority>( |
state, active_interpolations_map_for_standard_transitions); |
@@ -1230,6 +1231,7 @@ void StyleResolver::ApplyAnimatedProperties( |
CSSPropertyID property = entry.key.IsCSSProperty() |
? entry.key.CssProperty() |
: entry.key.PresentationAttribute(); |
+ DCHECK_EQ(entry.key.IsCSSCustomProperty(), priority == kResolveVariables); |
if (!CSSPropertyPriorityData<priority>::PropertyHasPriority(property)) |
continue; |
const Interpolation& interpolation = *entry.value.front(); |
@@ -1752,7 +1754,8 @@ void StyleResolver::ApplyCustomProperties(StyleResolverState& state, |
needs_apply_pass); |
if (apply_animations == kIncludeAnimations) { |
ApplyAnimatedProperties<kResolveVariables>( |
- state, state.AnimationUpdate().ActiveInterpolationsForAnimations()); |
+ state, |
+ state.AnimationUpdate().ActiveInterpolationsForCustomAnimations()); |
ApplyAnimatedProperties<kResolveVariables>( |
state, |
state.AnimationUpdate().ActiveInterpolationsForCustomTransitions()); |
@@ -1771,7 +1774,8 @@ void StyleResolver::ApplyCustomProperties(StyleResolverState& state, |
needs_apply_pass); |
if (apply_animations == kIncludeAnimations) { |
ApplyAnimatedProperties<kResolveVariables>( |
- state, state.AnimationUpdate().ActiveInterpolationsForAnimations()); |
+ state, |
+ state.AnimationUpdate().ActiveInterpolationsForCustomAnimations()); |
ApplyAnimatedProperties<kResolveVariables>( |
state, |
state.AnimationUpdate().ActiveInterpolationsForCustomTransitions()); |
@@ -1816,17 +1820,12 @@ void StyleResolver::CalculateAnimationUpdate(StyleResolverState& state, |
return; |
} |
if (!state.AnimationUpdate() |
+ .ActiveInterpolationsForCustomAnimations() |
+ .IsEmpty() || |
+ !state.AnimationUpdate() |
.ActiveInterpolationsForCustomTransitions() |
.IsEmpty()) { |
state.SetIsAnimatingCustomProperties(true); |
- return; |
- } |
- for (const auto& property_handle : |
- state.AnimationUpdate().ActiveInterpolationsForAnimations().Keys()) { |
- if (CSSAnimations::IsCustomPropertyHandle(property_handle)) { |
- state.SetIsAnimatingCustomProperties(true); |
- return; |
- } |
} |
} |