| Index: Source/core/page/EventHandler.cpp
|
| diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
|
| index 7a7d9d32f284f16d4cf130e72ac92ab40fd4932d..b8498579ff5fea581e7401d1451f28e2bed79195 100644
|
| --- a/Source/core/page/EventHandler.cpp
|
| +++ b/Source/core/page/EventHandler.cpp
|
| @@ -85,7 +85,6 @@
|
| #include "core/rendering/style/CursorList.h"
|
| #include "core/rendering/style/RenderStyle.h"
|
| #include "core/svg/SVGDocument.h"
|
| -#include "core/svg/SVGElementInstance.h"
|
| #include "core/svg/SVGUseElement.h"
|
| #include "platform/PlatformGestureEvent.h"
|
| #include "platform/PlatformKeyboardEvent.h"
|
| @@ -259,7 +258,6 @@ void EventHandler::clear()
|
| m_resizeScrollableArea = 0;
|
| m_nodeUnderMouse = nullptr;
|
| m_lastNodeUnderMouse = nullptr;
|
| - m_lastInstanceUnderMouse = nullptr;
|
| m_lastMouseMoveEventSubframe = nullptr;
|
| m_lastScrollbarUnderMouse = nullptr;
|
| m_clickCount = 0;
|
| @@ -1802,22 +1800,6 @@ MouseEventWithHitTestResults EventHandler::prepareMouseEvent(const HitTestReques
|
| return m_frame->document()->prepareMouseEvent(request, documentPointForWindowPoint(m_frame, mev.position()), mev);
|
| }
|
|
|
| -static inline SVGElementInstance* instanceAssociatedWithShadowTreeElement(Node* referenceNode)
|
| -{
|
| - if (!referenceNode || !referenceNode->isSVGElement())
|
| - return 0;
|
| -
|
| - ShadowRoot* shadowRoot = referenceNode->containingShadowRoot();
|
| - if (!shadowRoot)
|
| - return 0;
|
| -
|
| - Element* shadowTreeParentElement = shadowRoot->host();
|
| - if (!isSVGUseElement(shadowTreeParentElement))
|
| - return 0;
|
| -
|
| - return toSVGUseElement(shadowTreeParentElement)->instanceForShadowTreeElement(referenceNode);
|
| -}
|
| -
|
| void EventHandler::updateMouseEventTargetNode(Node* targetNode, const PlatformMouseEvent& mouseEvent, bool fireMouseOverOut)
|
| {
|
| Node* result = targetNode;
|
| @@ -1832,37 +1814,6 @@ void EventHandler::updateMouseEventTargetNode(Node* targetNode, const PlatformMo
|
| }
|
| m_nodeUnderMouse = result;
|
|
|
| - // <use> shadow tree elements may have been recloned, update node under mouse in any case
|
| - if (m_lastInstanceUnderMouse) {
|
| - SVGElement* lastCorrespondingElement = m_lastInstanceUnderMouse->correspondingElement();
|
| - SVGElement* lastCorrespondingUseElement = m_lastInstanceUnderMouse->correspondingUseElement();
|
| -
|
| - if (lastCorrespondingElement && lastCorrespondingUseElement) {
|
| - HashSet<SVGElementInstance*> instances = lastCorrespondingElement->instancesForElement();
|
| -
|
| - // Locate the recloned shadow tree element for our corresponding instance
|
| - HashSet<SVGElementInstance*>::iterator end = instances.end();
|
| - for (HashSet<SVGElementInstance*>::iterator it = instances.begin(); it != end; ++it) {
|
| - SVGElementInstance* instance = (*it);
|
| - ASSERT(instance->correspondingElement() == lastCorrespondingElement);
|
| -
|
| - if (instance == m_lastInstanceUnderMouse)
|
| - continue;
|
| -
|
| - if (instance->correspondingUseElement() != lastCorrespondingUseElement)
|
| - continue;
|
| -
|
| - SVGElement* shadowTreeElement = instance->shadowTreeElement();
|
| - if (!shadowTreeElement->inDocument() || m_lastNodeUnderMouse == shadowTreeElement)
|
| - continue;
|
| -
|
| - m_lastNodeUnderMouse = shadowTreeElement;
|
| - m_lastInstanceUnderMouse = instance;
|
| - break;
|
| - }
|
| - }
|
| - }
|
| -
|
| // Fire mouseout/mouseover if the mouse has shifted to a different node.
|
| if (fireMouseOverOut) {
|
| RenderLayer* layerForLastNode = layerForNode(m_lastNodeUnderMouse.get());
|
| @@ -1896,7 +1847,6 @@ void EventHandler::updateMouseEventTargetNode(Node* targetNode, const PlatformMo
|
| if (m_lastNodeUnderMouse && m_lastNodeUnderMouse->document() != m_frame->document()) {
|
| m_lastNodeUnderMouse = nullptr;
|
| m_lastScrollbarUnderMouse = nullptr;
|
| - m_lastInstanceUnderMouse = nullptr;
|
| }
|
|
|
| if (m_lastNodeUnderMouse != m_nodeUnderMouse) {
|
| @@ -1908,7 +1858,6 @@ void EventHandler::updateMouseEventTargetNode(Node* targetNode, const PlatformMo
|
| m_nodeUnderMouse->dispatchMouseEvent(mouseEvent, EventTypeNames::mouseover, 0, m_lastNodeUnderMouse.get());
|
| }
|
| m_lastNodeUnderMouse = m_nodeUnderMouse;
|
| - m_lastInstanceUnderMouse = instanceAssociatedWithShadowTreeElement(m_nodeUnderMouse.get());
|
| }
|
| }
|
|
|
|
|