Web Inspector: should be possible to step through all event listeners when event...
authoryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jan 2012 07:37:28 +0000 (07:37 +0000)
committeryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jan 2012 07:37:28 +0000 (07:37 +0000)
commit95d466759526f4f10904d9b7b434dd3707f8229c
treed2cae0e8973be0fb7c2a63fd88a4fdb9775b70ec
parente78f0af6dc5b600cf5f83153e9c40afd5b715f30
Web Inspector: should be possible to step through all event listeners when event listener breakpoint is hit
https://bugs.webkit.org/show_bug.cgi?id=77331

Source/WebCore:

Inspector instrumentation is called before and after each event handler invokation.
In case inspector front-end is closed it is no-op, otherwise it may stop execution
on an event listener breakpoint.

Reviewed by Pavel Feldman.

Test: inspector/debugger/step-through-event-listeners.html

* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willDispatchEventImpl):
(WebCore::InspectorInstrumentation::willHandleEventImpl):
(WebCore):
(WebCore::InspectorInstrumentation::didHandleEventImpl):
(WebCore::InspectorInstrumentation::didDispatchEventImpl):
(WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
(WebCore::InspectorInstrumentation::didDispatchEventOnWindowImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willHandleEvent):
(WebCore):
(WebCore::InspectorInstrumentation::didHandleEvent):

LayoutTests:

Test that debugger will stop in each event listener when pausing on an event listener
breakpoint.

Reviewed by Pavel Feldman.

* inspector/debugger/step-through-event-listeners-expected.txt: Added.
* inspector/debugger/step-through-event-listeners.html: Added.
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/debugger/step-through-event-listeners-expected.txt [new file with mode: 0644]
LayoutTests/inspector/debugger/step-through-event-listeners.html [new file with mode: 0644]
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win/Skipped
LayoutTests/platform/wincairo/Skipped
Source/WebCore/ChangeLog
Source/WebCore/dom/EventTarget.cpp
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h