Index: Source/core/svg/SVGUseElement.cpp |
diff --git a/Source/core/svg/SVGUseElement.cpp b/Source/core/svg/SVGUseElement.cpp |
index e5f845a9119787c00edb7049a6bece6c8acaeb49..f23ef0549bcd7a45419f9174d6ea193aa7042817 100644 |
--- a/Source/core/svg/SVGUseElement.cpp |
+++ b/Source/core/svg/SVGUseElement.cpp |
@@ -352,6 +352,8 @@ static PassRefPtrWillBeRawPtr<Node> cloneNodeAndAssociate(Node& toClone) |
SVGElement& svgElement = toSVGElement(toClone); |
ASSERT(!svgElement.correspondingElement()); |
toSVGElement(clone.get())->setCorrespondingElement(&svgElement); |
+ if (EventTargetData* data = toClone.eventTargetData()) |
+ data->eventListenerMap.copyEventListenersNotCreatedFromMarkupToTarget(clone.get()); |
TrackExceptionState exceptionState; |
for (Node* node = toClone.firstChild(); node && !exceptionState.hadException(); node = node->nextSibling()) |
clone->appendChild(cloneNodeAndAssociate(*node), exceptionState); |
@@ -483,6 +485,8 @@ bool SVGUseElement::buildShadowTree(SVGElement* target, SVGElement* targetInstan |
} |
targetInstance->setCorrespondingElement(target); |
+ if (EventTargetData* data = target->eventTargetData()) |
+ data->eventListenerMap.copyEventListenersNotCreatedFromMarkupToTarget(targetInstance); |
for (Node* child = target->firstChild(); child; child = child->nextSibling()) { |
// Skip any disallowed element. |