Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: Source/core/svg/animation/SMILTimeContainer.cpp

Issue 99533004: [SVG] Implement 'discard' element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..8dfbbe0c720ca0a4e4cf9781d7e6c24b5954ee47
--- a/Source/core/svg/animation/SMILTimeContainer.cpp
+++ b/Source/core/svg/animation/SMILTimeContainer.cpp
@@ -325,6 +325,16 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
m_preventScheduledAnimationsChanges = false;
#endif
+ for (unsigned n = 0; n < animationsToApply.size(); n++) {
rwlbuis 2013/12/16 21:31:34 Better use prefix ++ variant, it is not slower but
pavane 2013/12/16 22:03:50 Sure, i missed it. I am not changing the size of t
pdr. 2013/12/18 22:40:33 I don't think this is safe. Can't the remove() ca
pavane 2013/12/19 07:17:03 This is the exact problem i am facing currently wi
+ if (animationsToApply[n]->isDiscardable()) {
rwlbuis 2013/12/16 21:31:34 Do you need a flag for isDiscardable? I am not an
pavane 2013/12/16 22:03:50 you are right. only animations which are already s
+ SVGSMILElement* animDiscard = animationsToApply[n];
+ SVGElement* targetElement = animDiscard->targetElement();
+ animDiscard->remove(IGNORE_EXCEPTION);
+ if (targetElement)
+ targetElement->remove(IGNORE_EXCEPTION);
+ }
+ }
+
startTimer(earliestFireTime, animationFrameDelay);
}

Powered by Google App Engine
This is Rietveld 408576698