Web Inspector: Elements: event listener change events should only be fired for the...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2019 17:26:39 +0000 (17:26 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2019 17:26:39 +0000 (17:26 +0000)
commit2498a757400c7ada463f4344181c7492a5cf5006
tree834264e6ac27966cf1fdf1c25404a193f5ccb36f
parent3dc57c6187aacb01a13423e06e236fec405be6e9
Web Inspector: Elements: event listener change events should only be fired for the selected node and it's ancestors
https://bugs.webkit.org/show_bug.cgi?id=196887
<rdar://problem/49870627>

Reviewed by Timothy Hatcher.

Source/WebCore:

Test: inspector/dom/event-listener-add-remove.html
      inspector/dom/event-listener-inspected-node.html

* inspector/agents/InspectorDOMAgent.h:
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::setInspectedNode):
(WebCore::InspectorDOMAgent::didAddEventListener):
(WebCore::InspectorDOMAgent::willRemoveEventListener):

Source/WebInspectorUI:

* UserInterface/Models/DOMNode.js:
(WI.DOMNode.prototype.getEventListeners):

LayoutTests:

* inspector/dom/event-listener-inspected-node.html: Added.
* inspector/dom/event-listener-inspected-node-expected.txt: Added.

* inspector/dom/event-listener-add-remove.html:
* inspector/dom/event-listener-add-remove-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/dom/event-listener-add-remove-expected.txt
LayoutTests/inspector/dom/event-listener-add-remove.html
LayoutTests/inspector/dom/event-listener-inspected-node-expected.txt [new file with mode: 0644]
LayoutTests/inspector/dom/event-listener-inspected-node.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
Source/WebCore/inspector/agents/InspectorDOMAgent.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/DOMNode.js