Commit 7df5c3a0 authored by Anders Hartvoll Ruud's avatar Anders Hartvoll Ruud Committed by Commit Bot

Move CalculateTransitionUpdate for PropertyPass::kCustom

Previously, animated custom properties were part of the base style,
and the call to CalculateAnimationUpdate _could_ take place during the
base style calculation if custom properties were animated or undergoing
a transition. In that world it made sense to compute transitions for
custom properties early, since it could affect the base computed style.

However, after the introduction of StyleCascade,
CalculateAnimationUpdate now always takes place after the base computed
style has already been produced. It therefore no longer makes sense to
separate kCustom/kStandard transition passes. The two passes can be
merged to one, but for now this CL just moves the two passes together.

Change-Id: Ibc2b82d4c58af168ceaf2572f98dc09744795702
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2307222
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: default avatarKevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791551}
parent 1d1e5c2e
...@@ -1323,6 +1323,9 @@ bool StyleResolver::ApplyAnimatedStyle(StyleResolverState& state, ...@@ -1323,6 +1323,9 @@ bool StyleResolver::ApplyAnimatedStyle(StyleResolverState& state,
CSSAnimations::CalculateTransitionUpdate( CSSAnimations::CalculateTransitionUpdate(
state.AnimationUpdate(), CSSAnimations::PropertyPass::kStandard, state.AnimationUpdate(), CSSAnimations::PropertyPass::kStandard,
animating_element, *state.Style()); animating_element, *state.Style());
CSSAnimations::CalculateTransitionUpdate(state.AnimationUpdate(),
CSSAnimations::PropertyPass::kCustom,
animating_element, *state.Style());
CSSAnimations::SnapshotCompositorKeyframes( CSSAnimations::SnapshotCompositorKeyframes(
element, state.AnimationUpdate(), *state.Style(), state.ParentStyle()); element, state.AnimationUpdate(), *state.Style(), state.ParentStyle());
...@@ -1514,9 +1517,6 @@ void StyleResolver::CalculateAnimationUpdate(StyleResolverState& state) { ...@@ -1514,9 +1517,6 @@ void StyleResolver::CalculateAnimationUpdate(StyleResolverState& state) {
CSSAnimations::CalculateAnimationUpdate( CSSAnimations::CalculateAnimationUpdate(
state.AnimationUpdate(), animating_element, state.GetElement(), state.AnimationUpdate(), animating_element, state.GetElement(),
*state.Style(), state.ParentStyle(), this); *state.Style(), state.ParentStyle(), this);
CSSAnimations::CalculateTransitionUpdate(state.AnimationUpdate(),
CSSAnimations::PropertyPass::kCustom,
animating_element, *state.Style());
state.SetIsAnimationInterpolationMapReady(); state.SetIsAnimationInterpolationMapReady();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment