Index: Source/core/svg/SVGElementInstance.cpp |
diff --git a/Source/core/svg/SVGElementInstance.cpp b/Source/core/svg/SVGElementInstance.cpp |
index ffd09345b1ef2c93296fdb5318b981f9b0629245..ed3714ce23cda7f240281d8b462a4b5c45a5e89d 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; |
@@ -157,7 +161,6 @@ void SVGElementInstance::setShadowTreeElement(SVGElement* element) |
m_shadowTreeElement = element; |
// Register as instance for passed element. |
m_element->mapInstanceToElement(shadowTreeElement()); |
- |
} |
void SVGElementInstance::appendChild(PassRefPtrWillBeRawPtr<SVGElementInstance> child) |