Chromium Code Reviews| 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 71dc1c2cc84ef4ed1e6eb91e9c34c5ad0968518f..af9ade7487cae8ae9c17ad7571759a1fb45d3264 |
| --- a/Source/core/svg/animation/SMILTimeContainer.cpp |
| +++ b/Source/core/svg/animation/SMILTimeContainer.cpp |
| @@ -27,6 +27,7 @@ |
| #include "core/svg/animation/SMILTimeContainer.h" |
| #include "core/dom/ElementTraversal.h" |
| +#include "core/svg/SVGDiscardElement.h" |
| #include "core/svg/SVGSVGElement.h" |
| #include "core/svg/animation/SVGSMILElement.h" |
| #include "wtf/CurrentTime.h" |
| @@ -269,7 +270,7 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime) |
| m_preventScheduledAnimationsChanges = true; |
| #endif |
| - AnimationsVector animationsToApply; |
| + Vector< RefPtr<SVGSMILElement> > animationsToApply; |
| GroupedAnimationsMap::iterator end = m_scheduledAnimations.end(); |
| for (GroupedAnimationsMap::iterator it = m_scheduledAnimations.begin(); it != end; ++it) { |
| AnimationsVector* scheduled = it->value.get(); |
| @@ -325,6 +326,16 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime) |
| m_preventScheduledAnimationsChanges = false; |
| #endif |
| + for (unsigned n = 0; n < animationsToApplySize; ++n) { |
| + if (animationsToApply[n] && animationsToApply[n]->inDocument() && isSVGDiscardElement(*animationsToApply[n])) { |
|
pdr.
2013/12/20 23:49:11
Can animationsToApply[n] ever be null? I don't thi
|
| + RefPtr<SVGSMILElement> animDiscard = animationsToApply[n]; |
| + RefPtr<SVGElement> targetElement = animDiscard->targetElement(); |
| + animDiscard->remove(IGNORE_EXCEPTION); |
|
pdr.
2013/12/20 23:49:11
I think the ordering here matters. Can you remove
pavane
2013/12/21 12:28:10
I think the current order is logical. If discard i
|
| + if (targetElement && targetElement->inDocument()) |
| + targetElement->remove(IGNORE_EXCEPTION); |
|
pdr.
2013/12/20 23:49:11
After both of these removal calls, can you add:
AS
|
| + } |
| + } |
| + |
| startTimer(earliestFireTime, animationFrameDelay); |
| } |