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

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

Issue 312423002: Don't expose the user agent shadow tree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests before landing Created 6 years, 6 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/events/Event.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/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.
« no previous file with comments | « Source/core/events/Event.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698