Title: [207477] trunk/Source/WebCore
Revision
207477
Author
bfulg...@apple.com
Date
2016-10-18 12:19:45 -0700 (Tue, 18 Oct 2016)

Log Message

Correct Document::removeAllEventListeners
https://bugs.webkit.org/show_bug.cgi?id=163558
<rdar://problem/28716840>

Reviewed by Chris Dumez.

Tested by fast/dom/node-move-to-new-document-crash-main.html.

* dom/Document.cpp:
(WebCore::Document::removeAllEventListeners): Clear out the wheel and
touch event targets when clearing all data.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (207476 => 207477)


--- trunk/Source/WebCore/ChangeLog	2016-10-18 19:03:29 UTC (rev 207476)
+++ trunk/Source/WebCore/ChangeLog	2016-10-18 19:19:45 UTC (rev 207477)
@@ -1,3 +1,17 @@
+2016-10-18  Brent Fulgham  <bfulg...@apple.com>
+
+        Correct Document::removeAllEventListeners
+        https://bugs.webkit.org/show_bug.cgi?id=163558
+        <rdar://problem/28716840>
+
+        Reviewed by Chris Dumez.
+
+        Tested by fast/dom/node-move-to-new-document-crash-main.html.
+
+        * dom/Document.cpp:
+        (WebCore::Document::removeAllEventListeners): Clear out the wheel and
+        touch event targets when clearing all data.
+
 2016-10-18  Dean Jackson  <d...@apple.com>
 
         Remove dependency cycle with UIKit

Modified: trunk/Source/WebCore/dom/Document.cpp (207476 => 207477)


--- trunk/Source/WebCore/dom/Document.cpp	2016-10-18 19:03:29 UTC (rev 207476)
+++ trunk/Source/WebCore/dom/Document.cpp	2016-10-18 19:19:45 UTC (rev 207477)
@@ -2351,6 +2351,11 @@
 #endif
     for (Node* node = firstChild(); node; node = NodeTraversal::next(*node))
         node->removeAllEventListeners();
+
+#if ENABLE(TOUCH_EVENTS)
+    m_touchEventTargets = nullptr;
+#endif
+    m_wheelEventTargets = nullptr;
 }
 
 void Document::suspendDeviceMotionAndOrientationUpdates()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to