| Index: Source/core/animation/css/CSSAnimations.h
|
| diff --git a/Source/core/animation/css/CSSAnimations.h b/Source/core/animation/css/CSSAnimations.h
|
| index 3dab7d2eb68fb34572d79ceb2ed5d433cefb6a36..e65665c68c0b91de34c76c848970694ba3a7ceb3 100644
|
| --- a/Source/core/animation/css/CSSAnimations.h
|
| +++ b/Source/core/animation/css/CSSAnimations.h
|
| @@ -55,12 +55,13 @@ class StyleRuleKeyframes;
|
| // This includes updates to animations/transitions as well as the Interpolations to be applied.
|
| class CSSAnimationUpdate final : public NoBaseWillBeGarbageCollectedFinalized<CSSAnimationUpdate> {
|
| public:
|
| - void startAnimation(const AtomicString& animationName, PassRefPtrWillBeRawPtr<InertAnimation> animation)
|
| + void startAnimation(const AtomicString& animationName, PassRefPtrWillBeRawPtr<InertAnimation> animation, const Timing &newTiming)
|
| {
|
| animation->setName(animationName);
|
| NewAnimation newAnimation;
|
| newAnimation.name = animationName;
|
| newAnimation.animation = animation;
|
| + newAnimation.newTiming = newTiming;
|
| m_newAnimations.append(newAnimation);
|
| }
|
| // Returns whether player has been suppressed and should be filtered during style application.
|
| @@ -74,13 +75,14 @@ public:
|
| {
|
| m_animationsWithPauseToggled.append(name);
|
| }
|
| - void updateAnimationTiming(AnimationPlayer* player, PassRefPtrWillBeRawPtr<InertAnimation> animation, const Timing& timing)
|
| + void updateAnimation(AnimationPlayer* player, PassRefPtrWillBeRawPtr<InertAnimation> animation, const Timing& newTiming, unsigned styleChangeCounter)
|
| {
|
| - UpdatedAnimationTiming updatedAnimation;
|
| + UpdatedAnimation updatedAnimation;
|
| updatedAnimation.player = player;
|
| updatedAnimation.animation = animation;
|
| - updatedAnimation.newTiming = timing;
|
| - m_animationsWithTimingUpdates.append(updatedAnimation);
|
| + updatedAnimation.newTiming = newTiming;
|
| + updatedAnimation.styleChangeCounter = styleChangeCounter;
|
| + m_animationsWithUpdates.append(updatedAnimation);
|
| m_suppressedAnimationPlayers.add(player);
|
| }
|
|
|
| @@ -108,9 +110,10 @@ public:
|
|
|
| AtomicString name;
|
| RefPtrWillBeMember<InertAnimation> animation;
|
| + Timing newTiming;
|
| };
|
|
|
| - struct UpdatedAnimationTiming {
|
| + struct UpdatedAnimation {
|
| ALLOW_ONLY_INLINE_ALLOCATION();
|
| public:
|
| void trace(Visitor* visitor)
|
| @@ -122,13 +125,14 @@ public:
|
| RawPtrWillBeMember<AnimationPlayer> player;
|
| RefPtrWillBeMember<InertAnimation> animation;
|
| Timing newTiming;
|
| + unsigned styleChangeCounter;
|
| };
|
|
|
| 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<UpdatedAnimation>& animationsWithUpdates() const { return m_animationsWithUpdates; }
|
|
|
| struct NewTransition {
|
| ALLOW_ONLY_INLINE_ALLOCATION();
|
| @@ -162,7 +166,7 @@ public:
|
| && m_cancelledAnimationNames.isEmpty()
|
| && m_suppressedAnimationPlayers.isEmpty()
|
| && m_animationsWithPauseToggled.isEmpty()
|
| - && m_animationsWithTimingUpdates.isEmpty()
|
| + && m_animationsWithUpdates.isEmpty()
|
| && m_newTransitions.isEmpty()
|
| && m_cancelledTransitions.isEmpty()
|
| && m_activeInterpolationsForAnimations.isEmpty()
|
| @@ -180,7 +184,7 @@ private:
|
| Vector<AtomicString> m_cancelledAnimationNames;
|
| WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>> m_suppressedAnimationPlayers;
|
| Vector<AtomicString> m_animationsWithPauseToggled;
|
| - WillBeHeapVector<UpdatedAnimationTiming> m_animationsWithTimingUpdates;
|
| + WillBeHeapVector<UpdatedAnimation> m_animationsWithUpdates;
|
|
|
| NewTransitionMap m_newTransitions;
|
| HashSet<CSSPropertyID> m_cancelledTransitions;
|
| @@ -236,6 +240,9 @@ private:
|
| using TransitionMap = WillBeHeapHashMap<CSSPropertyID, RunningTransition>;
|
| TransitionMap m_transitions;
|
|
|
| + using TimingMap = WillBeHeapHashMap<AtomicString, Timing>;
|
| + TimingMap m_timings;
|
| +
|
| OwnPtrWillBeMember<CSSAnimationUpdate> m_pendingUpdate;
|
|
|
| WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> m_previousActiveInterpolationsForAnimations;
|
| @@ -290,6 +297,6 @@ private:
|
| } // namespace blink
|
|
|
| WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation);
|
| -WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::UpdatedAnimationTiming);
|
| +WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::UpdatedAnimation);
|
|
|
| #endif
|
|
|