| Index: Source/core/animation/css/CSSAnimationUpdate.h
|
| diff --git a/Source/core/animation/css/CSSAnimationUpdate.h b/Source/core/animation/css/CSSAnimationUpdate.h
|
| index 9ae2286f746dbd4b4e787f1ce25a9d8346e814a7..10e162cafed842878c218ceff14fdf47160fad00 100644
|
| --- a/Source/core/animation/css/CSSAnimationUpdate.h
|
| +++ b/Source/core/animation/css/CSSAnimationUpdate.h
|
| @@ -14,11 +14,58 @@ 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.
|
| class CSSAnimationUpdate final : public NoBaseWillBeGarbageCollectedFinalized<CSSAnimationUpdate> {
|
| public:
|
| + struct NewAnimation {
|
| + ALLOW_ONLY_INLINE_ALLOCATION();
|
| + public:
|
| + void trace(Visitor* visitor)
|
| + {
|
| + visitor->trace(animation);
|
| + }
|
| +
|
| + AtomicString name;
|
| + RefPtrWillBeMember<InertAnimation> animation;
|
| + };
|
| +
|
| + struct UpdatedAnimationTiming {
|
| + ALLOW_ONLY_INLINE_ALLOCATION();
|
| + public:
|
| + void trace(Visitor* visitor)
|
| + {
|
| + visitor->trace(player);
|
| + visitor->trace(animation);
|
| + }
|
| +
|
| + RawPtrWillBeMember<AnimationPlayer> player;
|
| + RefPtrWillBeMember<InertAnimation> animation;
|
| + Timing newTiming;
|
| + };
|
| +
|
| + struct UpdatedAnimationStyle {
|
| + ALLOW_ONLY_INLINE_ALLOCATION();
|
| + public:
|
| + void trace(Visitor* visitor)
|
| + {
|
| + visitor->trace(player);
|
| + visitor->trace(effect);
|
| + }
|
| +
|
| + struct CompositableStyleSnapshot {
|
| + RefPtrWillBeMember<AnimatableValue> opacity;
|
| + RefPtrWillBeMember<AnimatableValue> transform;
|
| + RefPtrWillBeMember<AnimatableValue> webkitFilter;
|
| + };
|
| +
|
| + RawPtrWillBeMember<AnimationPlayer> player;
|
| + RawPtrWillBeMember<KeyframeEffectModelBase> effect;
|
| + CompositableStyleSnapshot snapshot;
|
| + };
|
| +
|
| void startAnimation(const AtomicString& animationName, PassRefPtrWillBeRawPtr<InertAnimation> animation)
|
| {
|
| animation->setName(animationName);
|
| @@ -47,6 +94,14 @@ public:
|
| m_animationsWithTimingUpdates.append(updatedAnimation);
|
| m_suppressedAnimationPlayers.add(player);
|
| }
|
| + void updateAnimationStyle(AnimationPlayer* player, KeyframeEffectModelBase* effect, const UpdatedAnimationStyle::CompositableStyleSnapshot& snapshot)
|
| + {
|
| + UpdatedAnimationStyle updatedAnimation;
|
| + updatedAnimation.player = player;
|
| + updatedAnimation.effect = effect;
|
| + updatedAnimation.snapshot = snapshot;
|
| + m_animationsWithStyleUpdates.append(updatedAnimation);
|
| + }
|
|
|
| void startTransition(CSSPropertyID id, CSSPropertyID eventId, const AnimatableValue* from, const AnimatableValue* to, PassRefPtrWillBeRawPtr<InertAnimation> animation)
|
| {
|
| @@ -62,37 +117,12 @@ public:
|
| bool isCancelledTransition(CSSPropertyID id) const { return m_cancelledTransitions.contains(id); }
|
| void cancelTransition(CSSPropertyID id) { m_cancelledTransitions.add(id); }
|
|
|
| - struct NewAnimation {
|
| - ALLOW_ONLY_INLINE_ALLOCATION();
|
| - public:
|
| - void trace(Visitor* visitor)
|
| - {
|
| - visitor->trace(animation);
|
| - }
|
| -
|
| - AtomicString name;
|
| - RefPtrWillBeMember<InertAnimation> animation;
|
| - };
|
| -
|
| - struct UpdatedAnimationTiming {
|
| - ALLOW_ONLY_INLINE_ALLOCATION();
|
| - public:
|
| - void trace(Visitor* visitor)
|
| - {
|
| - visitor->trace(player);
|
| - visitor->trace(animation);
|
| - }
|
| -
|
| - RawPtrWillBeMember<AnimationPlayer> player;
|
| - RefPtrWillBeMember<InertAnimation> animation;
|
| - Timing newTiming;
|
| - };
|
| -
|
| const WillBeHeapVector<NewAnimation>& newAnimations() const { return m_newAnimations; }
|
| const Vector<AtomicString>& cancelledAnimationNames() const { return m_cancelledAnimationNames; }
|
| const WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>>& suppressedAnimationAnimationPlayers() const { return m_suppressedAnimationPlayers; }
|
| const Vector<AtomicString>& animationsWithPauseToggled() const { return m_animationsWithPauseToggled; }
|
| const WillBeHeapVector<UpdatedAnimationTiming>& animationsWithTimingUpdates() const { return m_animationsWithTimingUpdates; }
|
| + const WillBeHeapVector<UpdatedAnimationStyle>& animationsWithStyleUpdates() const { return m_animationsWithStyleUpdates; }
|
|
|
| struct NewTransition {
|
| ALLOW_ONLY_INLINE_ALLOCATION();
|
| @@ -127,6 +157,7 @@ public:
|
| && m_suppressedAnimationPlayers.isEmpty()
|
| && m_animationsWithPauseToggled.isEmpty()
|
| && m_animationsWithTimingUpdates.isEmpty()
|
| + && m_animationsWithStyleUpdates.isEmpty()
|
| && m_newTransitions.isEmpty()
|
| && m_cancelledTransitions.isEmpty()
|
| && m_activeInterpolationsForAnimations.isEmpty()
|
| @@ -145,6 +176,7 @@ private:
|
| WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>> m_suppressedAnimationPlayers;
|
| Vector<AtomicString> m_animationsWithPauseToggled;
|
| WillBeHeapVector<UpdatedAnimationTiming> m_animationsWithTimingUpdates;
|
| + WillBeHeapVector<UpdatedAnimationStyle> m_animationsWithStyleUpdates;
|
|
|
| NewTransitionMap m_newTransitions;
|
| HashSet<CSSPropertyID> m_cancelledTransitions;
|
|
|