| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 1ad2552df97a07d48bb5616c7bf918fa7703f333..346ba261067477267babc9e1a8ebebec6fc451d3 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -32,6 +32,7 @@
|
| #include "SVGNames.h"
|
| #include "XMLNames.h"
|
| #include "core/accessibility/AXObjectCache.h"
|
| +#include "core/animation/DocumentTimeline.h"
|
| #include "core/css/CSSParser.h"
|
| #include "core/css/CSSStyleSheet.h"
|
| #include "core/css/CSSValuePool.h"
|
| @@ -374,34 +375,15 @@ NamedNodeMap* Element::attributes() const
|
| return rareData->attributeMap();
|
| }
|
|
|
| -void Element::addActiveAnimation(Animation* animation)
|
| -{
|
| - ElementRareData* rareData = ensureElementRareData();
|
| - if (!rareData->activeAnimations())
|
| - rareData->setActiveAnimations(adoptPtr(new Vector<Animation*>));
|
| - rareData->activeAnimations()->append(animation);
|
| -}
|
| -
|
| -void Element::removeActiveAnimation(Animation* animation)
|
| -{
|
| - ElementRareData* rareData = elementRareData();
|
| - ASSERT(rareData);
|
| - size_t position = rareData->activeAnimations()->find(animation);
|
| - ASSERT(position != notFound);
|
| - rareData->activeAnimations()->remove(position);
|
| -}
|
| -
|
| bool Element::hasActiveAnimations() const
|
| {
|
| - return hasRareData() && elementRareData()->activeAnimations()
|
| - && elementRareData()->activeAnimations()->size();
|
| -}
|
| + if (!RuntimeEnabledFeatures::webAnimationsEnabled())
|
| + return false;
|
|
|
| -Vector<Animation*>* Element::activeAnimations() const
|
| -{
|
| - if (!elementRareData())
|
| - return 0;
|
| - return elementRareData()->activeAnimations();
|
| + if (!document())
|
| + return false;
|
| +
|
| + return document()->timeline()->animationStack().hasActiveAnimations(this);
|
| }
|
|
|
| Node::NodeType Element::nodeType() const
|
|
|