Index: Source/core/animation/css/CSSAnimations.h |
diff --git a/Source/core/animation/css/CSSAnimations.h b/Source/core/animation/css/CSSAnimations.h |
index a697045b020bf56b38a0f8f3b89ebe55e1802260..4aeb4d5623241d94017cb9ccaabd1c1bb1a9cb7d 100644 |
--- a/Source/core/animation/css/CSSAnimations.h |
+++ b/Source/core/animation/css/CSSAnimations.h |
@@ -52,7 +52,7 @@ class StyleRuleKeyframes; |
// 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 { |
+class CSSAnimationUpdate FINAL : public NoBaseWillBeGarbageCollectedFinalized<CSSAnimationUpdate> { |
public: |
void startAnimation(AtomicString& animationName, const HashSet<RefPtr<InertAnimation> >& animations) |
{ |
@@ -109,7 +109,7 @@ public: |
RawPtrWillBeMember<const AnimatableValue> to; |
RefPtr<InertAnimation> animation; |
}; |
- typedef WillBePersistentHeapHashMap<CSSPropertyID, NewTransition> NewTransitionMap; |
+ typedef WillBeHeapHashMap<CSSPropertyID, NewTransition> NewTransitionMap; |
const NewTransitionMap& newTransitions() const { return m_newTransitions; } |
const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancelledTransitions; } |
@@ -130,6 +130,9 @@ public: |
&& m_activeInterpolationsForAnimations.isEmpty() |
&& m_activeInterpolationsForTransitions.isEmpty(); |
} |
+ |
+ void trace(Visitor*); |
+ |
private: |
// Order is significant since it defines the order in which new animations |
// will be started. Note that there may be multiple animations present |
@@ -143,11 +146,11 @@ private: |
NewTransitionMap m_newTransitions; |
HashSet<CSSPropertyID> m_cancelledTransitions; |
- WillBePersistentHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > m_activeInterpolationsForAnimations; |
- WillBePersistentHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > m_activeInterpolationsForTransitions; |
+ WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > m_activeInterpolationsForAnimations; |
+ WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > m_activeInterpolationsForTransitions; |
}; |
-class CSSAnimations FINAL { |
+class CSSAnimations FINAL : public NoBaseWillBeGarbageCollectedFinalized<CSSAnimations> { |
public: |
// FIXME: This method is only used here and in the legacy animations |
// implementation. It should be made private or file-scope when the legacy |
@@ -158,13 +161,15 @@ public: |
static const StylePropertyShorthand& animatableProperties(); |
// FIXME: This should take a const ScopedStyleTree instead of a StyleResolver. |
// We should also change the Element* to a const Element* |
- static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Element& parentElement, const RenderStyle&, RenderStyle* parentStyle, StyleResolver*); |
+ static PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Element& parentElement, const RenderStyle&, RenderStyle* parentStyle, StyleResolver*); |
- void setPendingUpdate(PassOwnPtr<CSSAnimationUpdate> update) { m_pendingUpdate = update; } |
+ void setPendingUpdate(PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> update) { m_pendingUpdate = update; } |
void maybeApplyPendingUpdate(Element*); |
bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpty() && !m_pendingUpdate; } |
void cancel(); |
+ void trace(Visitor*); |
+ |
private: |
// Note that a single animation name may map to multiple players due to |
// the way in which we split up animations with incomplete keyframes. |
@@ -184,12 +189,12 @@ private: |
RawPtrWillBeMember<const AnimatableValue> from; |
RawPtrWillBeMember<const AnimatableValue> to; |
}; |
- typedef WillBePersistentHeapHashMap<CSSPropertyID, RunningTransition> TransitionMap; |
+ typedef WillBeHeapHashMap<CSSPropertyID, RunningTransition> TransitionMap; |
AnimationMap m_animations; |
TransitionMap m_transitions; |
- OwnPtr<CSSAnimationUpdate> m_pendingUpdate; |
+ OwnPtrWillBeMember<CSSAnimationUpdate> m_pendingUpdate; |
- WillBePersistentHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > m_previousActiveInterpolationsForAnimations; |
+ WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > m_previousActiveInterpolationsForAnimations; |
static void calculateAnimationUpdate(CSSAnimationUpdate*, Element*, const Element& parentElement, const RenderStyle&, RenderStyle* parentStyle, StyleResolver*); |
static void calculateTransitionUpdate(CSSAnimationUpdate*, const Element*, const RenderStyle&); |