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

Unified Diff: Source/core/svg/SVGElementInstance.cpp

Issue 298873003: SVG: SVGAnimateElement should not cache |m_animatedElements| (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove_unused_line Created 6 years, 7 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
« Source/core/svg/SVGElement.cpp ('K') | « Source/core/svg/SVGElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGElementInstance.cpp
diff --git a/Source/core/svg/SVGElementInstance.cpp b/Source/core/svg/SVGElementInstance.cpp
index 752f4826415236708ef14fa9094bb23d8ecf8712..869ab37bcb7239884f6e6a8164cb1b35eba2a72e 100644
--- a/Source/core/svg/SVGElementInstance.cpp
+++ b/Source/core/svg/SVGElementInstance.cpp
@@ -26,6 +26,7 @@
#include "core/dom/ContainerNodeAlgorithms.h"
#include "core/events/Event.h"
#include "core/events/EventListener.h"
+#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGElement.h"
#include "core/svg/SVGUseElement.h"
@@ -143,6 +144,9 @@ void SVGElementInstance::detach()
m_shadowTreeElement = nullptr;
+ // SMIL animations need to be restarted in order to exclude |shadowTreeElement()|.
+ m_element->document().accessSVGExtensions().rebuildSMILElementReferencesForTarget(m_element.get());
+
m_directUseElement = nullptr;
m_correspondingUseElement = nullptr;
@@ -158,6 +162,8 @@ void SVGElementInstance::setShadowTreeElement(SVGElement* element)
// Register as instance for passed element.
m_element->mapInstanceToElement(shadowTreeElement());
+ // SMIL animations need to be restarted in order to include |shadowTreeElement()|.
+ m_element->document().accessSVGExtensions().rebuildSMILElementReferencesForTarget(m_element.get());
}
void SVGElementInstance::appendChild(PassRefPtr<SVGElementInstance> child)
« Source/core/svg/SVGElement.cpp ('K') | « Source/core/svg/SVGElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698