Index: Source/core/animation/ActiveAnimations.h |
diff --git a/Source/core/animation/ActiveAnimations.h b/Source/core/animation/ActiveAnimations.h |
index 966f73c12ead068bfb845eff5c9a09464cfb6f54..ad5ba4b68913f437c6a62129c13848a83b480260 100644 |
--- a/Source/core/animation/ActiveAnimations.h |
+++ b/Source/core/animation/ActiveAnimations.h |
@@ -63,21 +63,27 @@ public: |
CSSAnimations& cssAnimations() { return m_cssAnimations; } |
const CSSAnimations& cssAnimations() const { return m_cssAnimations; } |
- typedef HashMap<AnimationPlayer*, int> AnimationPlayerCountedSet; |
+ typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<AnimationPlayer>, int> AnimationPlayerCountedSet; |
// AnimationPlayers which have animations targeting this element. |
const AnimationPlayerCountedSet& players() const { return m_players; } |
void addPlayer(AnimationPlayer*); |
void removePlayer(AnimationPlayer*); |
+#if ENABLE(OILPAN) |
+ bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.isEmpty(); } |
+#else |
bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.isEmpty() && m_animations.isEmpty(); } |
+#endif |
void cancelAnimationOnCompositor(); |
void updateAnimationFlags(RenderStyle&); |
void setAnimationStyleChange(bool animationStyleChange) { m_animationStyleChange = animationStyleChange; } |
+#if !ENABLE(OILPAN) |
void addAnimation(Animation* animation) { m_animations.append(animation); } |
void notifyAnimationDestroyed(Animation* animation) { m_animations.remove(m_animations.find(animation)); } |
+#endif |
void trace(Visitor*); |
@@ -89,18 +95,10 @@ private: |
AnimationPlayerCountedSet m_players; |
bool m_animationStyleChange; |
- // This is to avoid a reference cycle that keeps Elements alive and |
- // won't be needed once Element and Animation are moved to Oilpan. |
+#if !ENABLE(OILPAN) |
+ // FIXME: Oilpan: This is to avoid a reference cycle that keeps Elements alive |
+ // and won't be needed once the Node hierarchy becomes traceable. |
Vector<Animation*> m_animations; |
- |
-#if ENABLE(OILPAN) |
- // Keep a back reference to the target Element, so that this object |
- // will be finalized during the same GC sweep as the target (as the |
- // Element keeps a reference in the other direction via its |
- // rare data.) This is done so that we can accurately notify the |
- // the Element as destroyed to the above vector of Animations in |
- // the ActiveAnimations finalizer. |
- Member<Element> m_target; |
#endif |
// CSSAnimations checks if a style change is due to animation. |