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

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

Issue 2831273002: Split active animation interpolation storage between standard and custom properties (Closed)
Patch Set: Review Review changes Created 3 years, 7 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 | « third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
- }
}
}
« no previous file with comments | « third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698