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

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

Issue 811763005: Ensure cancellation of animation timer in a detached state. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adjust comment Created 5 years, 11 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/animation/SMILTimeContainer.cpp
diff --git a/Source/core/svg/animation/SMILTimeContainer.cpp b/Source/core/svg/animation/SMILTimeContainer.cpp
index e432c411187a47651b289457e3f8a02ae989f95e..045b445248ae22678b22bd6739877a425fb3b6f1 100644
--- a/Source/core/svg/animation/SMILTimeContainer.cpp
+++ b/Source/core/svg/animation/SMILTimeContainer.cpp
@@ -360,6 +360,14 @@ bool SMILTimeContainer::handleAnimationPolicy(AnimationPolicyOnceAction onceActi
break;
}
}
+ if (policy == ImageAnimationPolicyAllowed) {
+ // When the SVG owner element becomes detached from its document,
+ // the policy defaults to ImageAnimationPolicyAllowed; there's
+ // no way back. If the policy had been "once" prior to that,
+ // ensure cancellation of its timer.
+ if (onceAction == CancelOnceTimer)
+ cancelAnimationPolicyTimer();
+ }
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698