| Index: Source/core/svg/SVGUseElement.cpp
|
| diff --git a/Source/core/svg/SVGUseElement.cpp b/Source/core/svg/SVGUseElement.cpp
|
| index 834dae3f388245f2708a391447448c2590af45e8..98994321bb8f31b22469b2107a18abc5691c5d9c 100644
|
| --- a/Source/core/svg/SVGUseElement.cpp
|
| +++ b/Source/core/svg/SVGUseElement.cpp
|
| @@ -45,6 +45,7 @@
|
|
|
| namespace WebCore {
|
|
|
| +
|
| inline SVGUseElement::SVGUseElement(Document& document, bool wasInsertedByParser)
|
| : SVGGraphicsElement(SVGNames::useTag, document)
|
| , SVGURIReference(this)
|
| @@ -370,6 +371,18 @@ void SVGUseElement::buildPendingResource()
|
| ASSERT(!m_needsShadowTreeRecreation);
|
| }
|
|
|
| +namespace {
|
| +
|
| +void restartSMILAnimationsForShadowTreeElements(SVGElement* shadowTreeTargetElement)
|
| +{
|
| + shadowTreeTargetElement->document().accessSVGExtensions().rebuildSMILElementReferencesForTarget(shadowTreeTargetElement);
|
| +
|
| + for (SVGElement* child = Traversal<SVGElement>::firstChild(*shadowTreeTargetElement); child; child = Traversal<SVGElement>::nextSibling(*child))
|
| + restartSMILAnimationsForShadowTreeElements(child);
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| void SVGUseElement::buildShadowAndInstanceTree(SVGElement* target)
|
| {
|
| ASSERT(!m_targetElementInstance);
|
| @@ -457,6 +470,9 @@ void SVGUseElement::buildShadowAndInstanceTree(SVGElement* target)
|
|
|
| // Update relative length information.
|
| updateRelativeLengthsInformation();
|
| +
|
| + // SMIL animations need to be restarted in order to include elements inside new shadow tree.
|
| + restartSMILAnimationsForShadowTreeElements(shadowTreeTargetElement);
|
| }
|
|
|
| RenderObject* SVGUseElement::createRenderer(RenderStyle*)
|
|
|