| Index: third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
|
| index 55eb59dcf8000bb3af57908432e94f934ca3af93..000a8d7ebff5e25d9cd18a817ad26175ac0114ea 100644
|
| --- a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
|
| @@ -231,19 +231,15 @@ bool CSSAnimations::isTransitionAnimationForInspector(
|
| return false;
|
| }
|
|
|
| -void CSSAnimations::calculateUpdate(const Element* animatingElement,
|
| - Element& element,
|
| - const ComputedStyle& style,
|
| - ComputedStyle* parentStyle,
|
| - CSSAnimationUpdate& animationUpdate,
|
| - StyleResolver* resolver) {
|
| +void CSSAnimations::calculateCompositorAndTransitionUpdate(
|
| + const Element* animatingElement,
|
| + Element& element,
|
| + const ComputedStyle& style,
|
| + ComputedStyle* parentStyle,
|
| + CSSAnimationUpdate& animationUpdate) {
|
| calculateCompositorAnimationUpdate(animationUpdate, animatingElement, element,
|
| style, parentStyle);
|
| - calculateAnimationUpdate(animationUpdate, animatingElement, element, style,
|
| - parentStyle, resolver);
|
| - calculateAnimationActiveInterpolations(animationUpdate, animatingElement);
|
| calculateTransitionUpdate(animationUpdate, animatingElement, style);
|
| - calculateTransitionActiveInterpolations(animationUpdate, animatingElement);
|
| }
|
|
|
| static const KeyframeEffectModelBase* getKeyframeEffectModelBase(
|
| @@ -324,8 +320,10 @@ void CSSAnimations::calculateAnimationUpdate(CSSAnimationUpdate& update,
|
| // If we're in an animation style change, no animations can have started, been
|
| // cancelled or changed play state. When DCHECK is enabled, we verify this
|
| // optimization.
|
| - if (isAnimationStyleChange)
|
| + if (isAnimationStyleChange) {
|
| + calculateAnimationActiveInterpolations(update, animatingElement);
|
| return;
|
| + }
|
| #endif
|
|
|
| const CSSAnimationData* animationData = style.animations();
|
| @@ -427,6 +425,8 @@ void CSSAnimations::calculateAnimationUpdate(CSSAnimationUpdate& update,
|
| *cssAnimations->m_runningAnimations[i]->animation);
|
| }
|
| }
|
| +
|
| + calculateAnimationActiveInterpolations(update, animatingElement);
|
| }
|
|
|
| void CSSAnimations::snapshotCompositorKeyframes(
|
| @@ -826,6 +826,7 @@ void CSSAnimations::calculateTransitionUpdate(CSSAnimationUpdate& update,
|
| }
|
| }
|
| }
|
| + calculateTransitionActiveInterpolations(update, animatingElement);
|
| }
|
|
|
| void CSSAnimations::cancel() {
|
| @@ -1094,6 +1095,18 @@ bool CSSAnimations::isAffectedByKeyframesFromScope(const Element& element,
|
| return toShadowRoot(treeScope.rootNode()).host() == element;
|
| }
|
|
|
| +bool CSSAnimations::isCustomPropertyHandle(const PropertyHandle& property) {
|
| + return property.isCSSProperty() &&
|
| + property.cssProperty() == CSSPropertyVariable;
|
| +}
|
| +
|
| +bool CSSAnimations::isAnimatingCustomProperties(
|
| + const ElementAnimations* elementAnimations) {
|
| + return elementAnimations &&
|
| + elementAnimations->effectStack().affectsProperties(
|
| + isCustomPropertyHandle);
|
| +}
|
| +
|
| DEFINE_TRACE(CSSAnimations) {
|
| visitor->trace(m_transitions);
|
| visitor->trace(m_pendingUpdate);
|
|
|