Chromium Code Reviews| Index: Source/core/animation/css/CSSAnimations.h |
| diff --git a/Source/core/animation/css/CSSAnimations.h b/Source/core/animation/css/CSSAnimations.h |
| index e730fc11a58179663f6765d0d5787533ba33040b..0e4214bb3cdf21bb7b389557ab441a4b6e2a7fe4 100644 |
| --- a/Source/core/animation/css/CSSAnimations.h |
| +++ b/Source/core/animation/css/CSSAnimations.h |
| @@ -78,8 +78,8 @@ public: |
| { |
| NewTransition newTransition; |
| newTransition.id = id; |
| - newTransition.from = from; |
| - newTransition.to = to; |
| + newTransition.from = const_cast<AnimatableValue*>(from); |
| + newTransition.to = const_cast<AnimatableValue*>(to); |
| newTransition.animation = animation; |
| m_newTransitions.set(id, newTransition); |
| } |
| @@ -96,12 +96,20 @@ public: |
| const Vector<AtomicString>& animationsWithPauseToggled() const { return m_animationsWithPauseToggled; } |
| struct NewTransition { |
| + ALLOW_ONLY_INLINE_ALLOCATION(); |
| + public: |
| + void trace(Visitor* visitor) |
| + { |
| + visitor->trace(from); |
| + visitor->trace(to); |
| + } |
| + |
| CSSPropertyID id; |
| - const AnimatableValue* from; |
| - const AnimatableValue* to; |
| + RawPtrWillBeMember<AnimatableValue> from; |
|
Mads Ager (chromium)
2014/03/21 17:05:44
Do you want to keep the const here and use RawPtrW
haraken
2014/03/21 17:21:33
Done.
|
| + RawPtrWillBeMember<AnimatableValue> to; |
| RefPtr<InertAnimation> animation; |
| }; |
| - typedef HashMap<CSSPropertyID, NewTransition> NewTransitionMap; |
| + typedef WillBePersistentHeapHashMap<CSSPropertyID, NewTransition> NewTransitionMap; |
| const NewTransitionMap& newTransitions() const { return m_newTransitions; } |
| const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancelledTransitions; } |
| @@ -164,11 +172,19 @@ private: |
| // ParGroup to drive multiple animations from a single AnimationPlayer. |
| typedef HashMap<AtomicString, HashSet<RefPtr<AnimationPlayer> > > AnimationMap; |
| struct RunningTransition { |
| + ALLOW_ONLY_INLINE_ALLOCATION(); |
| + public: |
| + void trace(Visitor* visitor) |
| + { |
| + visitor->trace(from); |
| + visitor->trace(to); |
| + } |
| + |
| Animation* transition; // The TransitionTimeline keeps the AnimationPlayers alive |
| - const AnimatableValue* from; |
| - const AnimatableValue* to; |
| + RawPtrWillBeMember<AnimatableValue> from; |
| + RawPtrWillBeMember<AnimatableValue> to; |
| }; |
| - typedef HashMap<CSSPropertyID, RunningTransition > TransitionMap; |
| + typedef WillBePersistentHeapHashMap<CSSPropertyID, RunningTransition> TransitionMap; |
| AnimationMap m_animations; |
| TransitionMap m_transitions; |
| OwnPtr<CSSAnimationUpdate> m_pendingUpdate; |