Index: Source/WebCore/dom/Node.cpp |
=================================================================== |
--- Source/WebCore/dom/Node.cpp (revision 138265) |
+++ Source/WebCore/dom/Node.cpp (working copy) |
@@ -412,8 +412,13 @@ |
if (hasRareData()) |
clearRareData(); |
- if (hasEventTargetData()) |
+ if (hasEventTargetData()) { |
+#if ENABLE(TOUCH_EVENT_TRACKING) |
+ if (m_document) |
+ m_document->didRemoveEventTargetNode(this); |
+#endif |
clearEventTargetData(); |
+ } |
if (renderer()) |
detach(); |
@@ -2125,8 +2130,8 @@ |
for (size_t i = 0; i < touchEventNames.size(); ++i) { |
const EventListenerVector& listeners = getEventListeners(touchEventNames[i]); |
for (size_t j = 0; j < listeners.size(); ++j) { |
- oldDocument->didRemoveTouchEventHandler(); |
- document()->didAddTouchEventHandler(); |
+ oldDocument->didRemoveTouchEventHandler(this); |
+ document()->didAddTouchEventHandler(this); |
} |
} |
@@ -2155,7 +2160,7 @@ |
if (eventType == eventNames().mousewheelEvent) |
document->didAddWheelEventHandler(); |
else if (eventNames().isTouchEventType(eventType)) |
- document->didAddTouchEventHandler(); |
+ document->didAddTouchEventHandler(targetNode); |
} |
return true; |
@@ -2177,7 +2182,7 @@ |
if (eventType == eventNames().mousewheelEvent) |
document->didRemoveWheelEventHandler(); |
else if (eventNames().isTouchEventType(eventType)) |
- document->didRemoveTouchEventHandler(); |
+ document->didRemoveTouchEventHandler(targetNode); |
} |
return true; |