Chromium Code Reviews| Index: Source/core/events/EventPath.cpp |
| diff --git a/Source/core/events/EventPath.cpp b/Source/core/events/EventPath.cpp |
| index b9578b1f20984c619bd3a8c6cf352138dba24b45..05016beb91a802c6556efd100b15ce87aff0acc2 100644 |
| --- a/Source/core/events/EventPath.cpp |
| +++ b/Source/core/events/EventPath.cpp |
| @@ -39,7 +39,6 @@ |
| #include "core/events/MouseEvent.h" |
| #include "core/events/TouchEvent.h" |
| #include "core/events/TouchEventContext.h" |
| -#include "core/svg/SVGElementInstance.h" |
| #include "core/svg/SVGUseElement.h" |
| namespace WebCore { |
| @@ -62,16 +61,10 @@ EventTarget* EventPath::eventTargetRespectingTargetRules(Node* referenceNode) |
| if (!usesDeprecatedSVGUseTreeEventRules(referenceNode)) |
|
pdr.
2014/06/02 14:09:06
I thought we could remove all svg-specific logic h
|
| return referenceNode; |
| - // Spec: The event handling for the non-exposed tree works as if the referenced element had been textually included |
| - // as a deeply cloned child of the 'use' element, except that events are dispatched to the SVGElementInstance objects. |
| Node& rootNode = referenceNode->treeScope().rootNode(); |
| Element* shadowHostElement = rootNode.isShadowRoot() ? toShadowRoot(rootNode).host() : 0; |
| - // At this time, SVG nodes are not supported in non-<use> shadow trees. |
| - if (!isSVGUseElement(shadowHostElement)) |
| - return referenceNode; |
| - SVGUseElement& useElement = toSVGUseElement(*shadowHostElement); |
| - if (SVGElementInstance* instance = useElement.instanceForShadowTreeElement(referenceNode)) |
| - return instance; |
| + if (isSVGUseElement(shadowHostElement)) |
| + return shadowHostElement; |
| return referenceNode; |
| } |