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

Unified Diff: Source/core/dom/Document.cpp

Issue 19525002: Pause SVG animations when the document is detached. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove defaultStyleForElement branch as well Created 7 years, 5 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 | « Source/core/css/resolver/StyleResolver.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 7b3cad2457145569d99998134c088e7d094c029f..e7603449ef1d9ccbea20e83abf6eb5fb4ec427aa 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -621,6 +621,9 @@ void Document::dispose()
m_scriptedAnimationController->clearDocumentPointer();
m_scriptedAnimationController.clear();
+ if (svgExtensions())
+ accessSVGExtensions()->pauseAnimations();
+
lifecycleNotifier()->notifyDocumentWasDisposed();
}
@@ -1885,6 +1888,9 @@ void Document::detach(const AttachContext& context)
m_scriptedAnimationController->clearDocumentPointer();
m_scriptedAnimationController.clear();
+ if (svgExtensions())
+ accessSVGExtensions()->pauseAnimations();
+
RenderObject* render = renderer();
documentWillBecomeInactive();
@@ -1895,7 +1901,6 @@ void Document::detach(const AttachContext& context)
FrameView* view = m_frame->view();
if (view)
view->detachCustomScrollbars();
-
}
// indicate destruction mode, i.e. attached() but renderer == 0
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698