| Index: Source/core/animation/css/CSSAnimationUpdate.h
|
| diff --git a/Source/core/animation/css/CSSAnimationUpdate.h b/Source/core/animation/css/CSSAnimationUpdate.h
|
| index af58fce4211dd1a01214f398e778f6dc2f3873f6..a67499bc7dd72b8aad2b2b9c0da15f8b17d2d7db 100644
|
| --- a/Source/core/animation/css/CSSAnimationUpdate.h
|
| +++ b/Source/core/animation/css/CSSAnimationUpdate.h
|
| @@ -15,6 +15,7 @@ namespace blink {
|
|
|
| class AnimationPlayer;
|
| class InertAnimation;
|
| +class KeyframeEffectModelBase;
|
|
|
| // This class stores the CSS Animations/Transitions information we use during a style recalc.
|
| // This includes updates to animations/transitions as well as the Interpolations to be applied.
|
| @@ -83,6 +84,37 @@ public:
|
| unsigned styleRuleVersion;
|
| };
|
|
|
| + class UpdatedAnimationStyle {
|
| + ALLOW_ONLY_INLINE_ALLOCATION();
|
| + public:
|
| + struct CompositableStyleSnapshot {
|
| + RefPtrWillBeMember<AnimatableValue> opacity;
|
| + RefPtrWillBeMember<AnimatableValue> transform;
|
| + RefPtrWillBeMember<AnimatableValue> webkitFilter;
|
| + };
|
| +
|
| + UpdatedAnimationStyle()
|
| + {
|
| + }
|
| +
|
| + UpdatedAnimationStyle(AnimationPlayer* player, KeyframeEffectModelBase* effect, const UpdatedAnimationStyle::CompositableStyleSnapshot& snapshot)
|
| + : player(player)
|
| + , effect(effect)
|
| + , snapshot(snapshot)
|
| + {
|
| + }
|
| +
|
| + void trace(Visitor* visitor)
|
| + {
|
| + visitor->trace(player);
|
| + visitor->trace(effect);
|
| + }
|
| +
|
| + RawPtrWillBeMember<AnimationPlayer> player;
|
| + RawPtrWillBeMember<KeyframeEffectModelBase> effect;
|
| + CompositableStyleSnapshot snapshot;
|
| + };
|
| +
|
| void startAnimation(const AtomicString& animationName, PassRefPtrWillBeRawPtr<InertAnimation> animation, const Timing& timing, PassRefPtrWillBeRawPtr<StyleRuleKeyframes> styleRule)
|
| {
|
| animation->setName(animationName);
|
| @@ -105,6 +137,10 @@ public:
|
| m_animationsWithUpdates.append(UpdatedAnimation(name, player, animation, specifiedTiming, styleRule));
|
| m_suppressedAnimationPlayers.add(player);
|
| }
|
| + void updateAnimationStyle(AnimationPlayer* player, KeyframeEffectModelBase* effect, const UpdatedAnimationStyle::CompositableStyleSnapshot& snapshot)
|
| + {
|
| + m_animationsWithStyleUpdates.append(UpdatedAnimationStyle(player, effect, snapshot));
|
| + }
|
|
|
| void startTransition(CSSPropertyID id, CSSPropertyID eventId, const AnimatableValue* from, const AnimatableValue* to, PassRefPtrWillBeRawPtr<InertAnimation> animation)
|
| {
|
| @@ -125,6 +161,7 @@ public:
|
| const WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>>& suppressedAnimationAnimationPlayers() const { return m_suppressedAnimationPlayers; }
|
| const Vector<AtomicString>& animationsWithPauseToggled() const { return m_animationsWithPauseToggled; }
|
| const WillBeHeapVector<UpdatedAnimation>& animationsWithUpdates() const { return m_animationsWithUpdates; }
|
| + const WillBeHeapVector<UpdatedAnimationStyle>& animationsWithStyleUpdates() const { return m_animationsWithStyleUpdates; }
|
|
|
| struct NewTransition {
|
| ALLOW_ONLY_INLINE_ALLOCATION();
|
| @@ -159,6 +196,7 @@ public:
|
| && m_suppressedAnimationPlayers.isEmpty()
|
| && m_animationsWithPauseToggled.isEmpty()
|
| && m_animationsWithUpdates.isEmpty()
|
| + && m_animationsWithStyleUpdates.isEmpty()
|
| && m_newTransitions.isEmpty()
|
| && m_cancelledTransitions.isEmpty()
|
| && m_activeInterpolationsForAnimations.isEmpty()
|
| @@ -177,6 +215,7 @@ private:
|
| WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>> m_suppressedAnimationPlayers;
|
| Vector<AtomicString> m_animationsWithPauseToggled;
|
| WillBeHeapVector<UpdatedAnimation> m_animationsWithUpdates;
|
| + WillBeHeapVector<UpdatedAnimationStyle> m_animationsWithStyleUpdates;
|
|
|
| NewTransitionMap m_newTransitions;
|
| HashSet<CSSPropertyID> m_cancelledTransitions;
|
|
|