Index: Source/core/svg/animation/SMILTimeContainer.cpp |
diff --git a/Source/core/svg/animation/SMILTimeContainer.cpp b/Source/core/svg/animation/SMILTimeContainer.cpp |
old mode 100644 |
new mode 100755 |
index 4c5510cc4f6fbc270914c4ce41413a2bbb9f36d5..1e743a94918c0502c13ef0dc528d40cfbeb86147 |
--- a/Source/core/svg/animation/SMILTimeContainer.cpp |
+++ b/Source/core/svg/animation/SMILTimeContainer.cpp |
@@ -54,6 +54,8 @@ SMILTimeContainer::SMILTimeContainer(SVGSVGElement* owner) |
SMILTimeContainer::~SMILTimeContainer() |
{ |
+ m_timer.stop(); |
+ ASSERT(!m_timer.isActive()); |
#ifndef NDEBUG |
ASSERT(!m_preventScheduledAnimationsChanges); |
#endif |
@@ -264,7 +266,7 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime) |
m_preventScheduledAnimationsChanges = true; |
#endif |
- AnimationsVector animationsToApply; |
+ Vector< RefPtr<SVGSMILElement> > animationsToApply; |
Inactive
2014/01/11 16:31:26
We usually add an extra white space only on the ri
pavane
2014/01/11 17:14:18
Done.
|
GroupedAnimationsMap::iterator end = m_scheduledAnimations.end(); |
for (GroupedAnimationsMap::iterator it = m_scheduledAnimations.begin(); it != end; ++it) { |
AnimationsVector* scheduled = it->value.get(); |
@@ -321,6 +323,22 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime) |
#endif |
startTimer(earliestFireTime, animationFrameDelay); |
+ |
+ for (unsigned n = 0; n < animationsToApplySize; ++n) { |
Inactive
2014/01/11 16:31:26
Any reason you're not using i as loop counter, lik
pavane
2014/01/11 17:14:18
No specific reason. :)
Done.
|
+ if (animationsToApply[n]->inDocument() && animationsToApply[n]->isSVGDiscardElement()) { |
+ RefPtr<SVGSMILElement> animDiscard = animationsToApply[n]; |
+ RefPtr<SVGElement> targetElement = animDiscard->targetElement(); |
+ if (targetElement && targetElement->inDocument()) { |
+ targetElement->remove(IGNORE_EXCEPTION); |
+ ASSERT(!targetElement->inDocument()); |
+ } |
+ |
+ if (animDiscard->inDocument()) { |
+ animDiscard->remove(IGNORE_EXCEPTION); |
+ ASSERT(!animDiscard->inDocument()); |
+ } |
+ } |
+ } |
} |
} |