Changeset 106337 in webkit
- Timestamp:
- Jan 30, 2012 11:37:28 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r106336 r106337 1 2012-01-30 Yury Semikhatsky <yurys@chromium.org> 2 3 Web Inspector: should be possible to step through all event listeners when event listener breakpoint is hit 4 https://bugs.webkit.org/show_bug.cgi?id=77331 5 6 Test that debugger will stop in each event listener when pausing on an event listener 7 breakpoint. 8 9 Reviewed by Pavel Feldman. 10 11 * inspector/debugger/step-through-event-listeners-expected.txt: Added. 12 * inspector/debugger/step-through-event-listeners.html: Added. 13 * platform/gtk/Skipped: 14 * platform/mac/Skipped: 15 * platform/qt/Skipped: 16 * platform/win/Skipped: 17 * platform/wincairo/Skipped: 18 1 19 2011-01-30 Hayato Ito <hayato@chromium.org> 2 20 -
trunk/LayoutTests/platform/gtk/Skipped
r105886 r106337 1101 1101 inspector/debugger/dom-breakpoints.html 1102 1102 inspector/debugger/event-listener-breakpoints.html 1103 inspector/debugger/step-through-event-listeners.html 1103 1104 inspector/debugger/xhr-breakpoints.html 1104 1105 -
trunk/LayoutTests/platform/mac/Skipped
r105941 r106337 259 259 inspector/debugger/dom-breakpoints.html 260 260 inspector/debugger/event-listener-breakpoints.html 261 inspector/debugger/step-through-event-listeners.html 261 262 inspector/debugger/xhr-breakpoints.html 262 263 -
trunk/LayoutTests/platform/qt/Skipped
r106106 r106337 209 209 inspector/debugger/dom-breakpoints.html 210 210 inspector/debugger/event-listener-breakpoints.html 211 inspector/debugger/step-through-event-listeners.html 211 212 inspector/debugger/xhr-breakpoints.html 212 213 -
trunk/LayoutTests/platform/win/Skipped
r106188 r106337 1217 1217 inspector/debugger/dom-breakpoints.html 1218 1218 inspector/debugger/event-listener-breakpoints.html 1219 inspector/debugger/step-through-event-listeners.html 1219 1220 inspector/debugger/xhr-breakpoints.html 1220 1221 -
trunk/LayoutTests/platform/wincairo/Skipped
r105500 r106337 1753 1753 inspector/debugger/dom-breakpoints.html 1754 1754 inspector/debugger/event-listener-breakpoints.html 1755 inspector/debugger/step-through-event-listeners.html 1755 1756 inspector/debugger/xhr-breakpoints.html 1756 1757 -
trunk/Source/WebCore/ChangeLog
r106336 r106337 1 2012-01-30 Yury Semikhatsky <yurys@chromium.org> 2 3 Web Inspector: should be possible to step through all event listeners when event listener breakpoint is hit 4 https://bugs.webkit.org/show_bug.cgi?id=77331 5 6 Inspector instrumentation is called before and after each event handler invokation. 7 In case inspector front-end is closed it is no-op, otherwise it may stop execution 8 on an event listener breakpoint. 9 10 Reviewed by Pavel Feldman. 11 12 Test: inspector/debugger/step-through-event-listeners.html 13 14 * dom/EventTarget.cpp: 15 (WebCore::EventTarget::fireEventListeners): 16 * inspector/InspectorInstrumentation.cpp: 17 (WebCore::InspectorInstrumentation::willDispatchEventImpl): 18 (WebCore::InspectorInstrumentation::willHandleEventImpl): 19 (WebCore): 20 (WebCore::InspectorInstrumentation::didHandleEventImpl): 21 (WebCore::InspectorInstrumentation::didDispatchEventImpl): 22 (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl): 23 (WebCore::InspectorInstrumentation::didDispatchEventOnWindowImpl): 24 * inspector/InspectorInstrumentation.h: 25 (InspectorInstrumentation): 26 (WebCore::InspectorInstrumentation::willHandleEvent): 27 (WebCore): 28 (WebCore::InspectorInstrumentation::didHandleEvent): 29 1 30 2011-01-30 Hayato Ito <hayato@chromium.org> 2 31 -
trunk/Source/WebCore/dom/EventTarget.cpp
r98388 r106337 35 35 #include "Event.h" 36 36 #include "EventException.h" 37 #include "InspectorInstrumentation.h" 37 38 #include <wtf/MainThread.h> 38 39 #include <wtf/StdLibExtras.h> … … 224 225 break; 225 226 227 ScriptExecutionContext* context = scriptExecutionContext(); 228 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willHandleEvent(context, event); 226 229 // To match Mozilla, the AT_TARGET phase fires both capturing and bubbling 227 230 // event listeners, even though that violates some versions of the DOM spec. 228 registeredListener.listener->handleEvent(scriptExecutionContext(), event); 231 registeredListener.listener->handleEvent(context, event); 232 InspectorInstrumentation::didHandleEvent(cookie); 229 233 } 230 234 d->firingEventIterators.removeLast(); -
trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp
r106030 r106337 280 280 InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventImpl(InstrumentingAgents* instrumentingAgents, const Event& event, DOMWindow* window, Node* node, const Vector<EventContext>& ancestors) 281 281 { 282 pauseOnNativeEventIfNeeded(instrumentingAgents, listenerEventCategoryType, event.type(), false);283 284 282 int timelineAgentId = 0; 285 283 InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent(); … … 291 289 } 292 290 291 InspectorInstrumentationCookie InspectorInstrumentation::willHandleEventImpl(InstrumentingAgents* instrumentingAgents, Event* event) 292 { 293 pauseOnNativeEventIfNeeded(instrumentingAgents, listenerEventCategoryType, event->type(), false); 294 return InspectorInstrumentationCookie(instrumentingAgents, 0); 295 } 296 297 void InspectorInstrumentation::didHandleEventImpl(const InspectorInstrumentationCookie& cookie) 298 { 299 cancelPauseOnNativeEvent(cookie.first); 300 } 301 293 302 void InspectorInstrumentation::didDispatchEventImpl(const InspectorInstrumentationCookie& cookie) 294 303 { 295 cancelPauseOnNativeEvent(cookie.first);296 297 304 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 298 305 timelineAgent->didDispatchEvent(); … … 301 308 InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventOnWindowImpl(InstrumentingAgents* instrumentingAgents, const Event& event, DOMWindow* window) 302 309 { 303 pauseOnNativeEventIfNeeded(instrumentingAgents, listenerEventCategoryType, event.type(), false);304 305 310 int timelineAgentId = 0; 306 311 InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent(); … … 314 319 void InspectorInstrumentation::didDispatchEventOnWindowImpl(const InspectorInstrumentationCookie& cookie) 315 320 { 316 cancelPauseOnNativeEvent(cookie.first);317 318 321 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 319 322 timelineAgent->didDispatchEvent(); -
trunk/Source/WebCore/inspector/InspectorInstrumentation.h
r105415 r106337 108 108 static InspectorInstrumentationCookie willDispatchEvent(Document*, const Event& event, DOMWindow* window, Node* node, const Vector<EventContext>& ancestors); 109 109 static void didDispatchEvent(const InspectorInstrumentationCookie&); 110 static InspectorInstrumentationCookie willHandleEvent(ScriptExecutionContext*, Event*); 111 static void didHandleEvent(const InspectorInstrumentationCookie&); 110 112 static InspectorInstrumentationCookie willDispatchEventOnWindow(Frame*, const Event& event, DOMWindow* window); 111 113 static void didDispatchEventOnWindow(const InspectorInstrumentationCookie&); … … 254 256 static void didChangeXHRReadyStateImpl(const InspectorInstrumentationCookie&); 255 257 static InspectorInstrumentationCookie willDispatchEventImpl(InstrumentingAgents*, const Event&, DOMWindow*, Node*, const Vector<EventContext>& ancestors); 258 static InspectorInstrumentationCookie willHandleEventImpl(InstrumentingAgents*, Event*); 259 static void didHandleEventImpl(const InspectorInstrumentationCookie&); 256 260 static void didDispatchEventImpl(const InspectorInstrumentationCookie&); 257 261 static InspectorInstrumentationCookie willDispatchEventOnWindowImpl(InstrumentingAgents*, const Event&, DOMWindow*); … … 593 597 } 594 598 599 inline InspectorInstrumentationCookie InspectorInstrumentation::willHandleEvent(ScriptExecutionContext* context, Event* event) 600 { 601 #if ENABLE(INSPECTOR) 602 FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie()); 603 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context)) 604 return willHandleEventImpl(instrumentingAgents, event); 605 #endif 606 return InspectorInstrumentationCookie(); 607 } 608 609 inline void InspectorInstrumentation::didHandleEvent(const InspectorInstrumentationCookie& cookie) 610 { 611 #if ENABLE(INSPECTOR) 612 FAST_RETURN_IF_NO_FRONTENDS(void()); 613 if (cookie.first) 614 didHandleEventImpl(cookie); 615 #endif 616 } 617 595 618 inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventOnWindow(Frame* frame, const Event& event, DOMWindow* window) 596 619 {
Note: See TracChangeset
for help on using the changeset viewer.