Title: [108469] branches/chromium/1025/Source/WebCore/inspector/InspectorInstrumentation.cpp
Revision
108469
Author
[email protected]
Date
2012-02-22 02:04:29 -0800 (Wed, 22 Feb 2012)

Log Message

Merge 106347 - Web Inspector: DOMDebugger.setEventListenerBreakpoint should accept regular DOM event names.
https://bugs.webkit.org/show_bug.cgi?id=77409

Reviewed by Yury Semikhatsky.

* inspector/Inspector.json:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint):
(WebCore):
(WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
* inspector/InspectorDOMDebuggerAgent.h:
(InspectorDOMDebuggerAgent):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didInstallTimerImpl):
(WebCore::InspectorInstrumentation::didRemoveTimerImpl):
(WebCore::InspectorInstrumentation::willHandleEventImpl):
(WebCore::InspectorInstrumentation::willFireTimerImpl):
(WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector.EventListenerBreakpointsSidebarPane.prototype._setBreakpoint):
(WebInspector.EventListenerBreakpointsSidebarPane.prototype._removeBreakpoint):

[email protected]
Review URL: https://chromiumcodereview.appspot.com/9429045

Modified Paths

Diff

Modified: branches/chromium/1025/Source/WebCore/inspector/InspectorInstrumentation.cpp (108468 => 108469)


--- branches/chromium/1025/Source/WebCore/inspector/InspectorInstrumentation.cpp	2012-02-22 10:03:46 UTC (rev 108468)
+++ branches/chromium/1025/Source/WebCore/inspector/InspectorInstrumentation.cpp	2012-02-22 10:04:29 UTC (rev 108469)
@@ -71,9 +71,6 @@
 
 namespace WebCore {
 
-static const char* const listenerEventCategoryType = "listener";
-static const char* const instrumentationEventCategoryType = "instrumentation";
-
 static const char* const setTimerEventName = "setTimer";
 static const char* const clearTimerEventName = "clearTimer";
 static const char* const timerFiredEventName = "timerFired";
@@ -241,14 +238,14 @@
 
 void InspectorInstrumentation::didInstallTimerImpl(InstrumentingAgents* instrumentingAgents, int timerId, int timeout, bool singleShot)
 {
-    pauseOnNativeEventIfNeeded(instrumentingAgents, instrumentationEventCategoryType, setTimerEventName, true);
+    pauseOnNativeEventIfNeeded(instrumentingAgents, false, setTimerEventName, true);
     if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent())
         timelineAgent->didInstallTimer(timerId, timeout, singleShot);
 }
 
 void InspectorInstrumentation::didRemoveTimerImpl(InstrumentingAgents* instrumentingAgents, int timerId)
 {
-    pauseOnNativeEventIfNeeded(instrumentingAgents, instrumentationEventCategoryType, clearTimerEventName, true);
+    pauseOnNativeEventIfNeeded(instrumentingAgents, false, clearTimerEventName, true);
     if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent())
         timelineAgent->didRemoveTimer(timerId);
 }
@@ -288,7 +285,7 @@
 
 InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventImpl(InstrumentingAgents* instrumentingAgents, const Event& event, DOMWindow* window, Node* node, const Vector<EventContext>& ancestors)
 {
-    pauseOnNativeEventIfNeeded(instrumentingAgents, listenerEventCategoryType, event.type(), false);
+    pauseOnNativeEventIfNeeded(instrumentingAgents, true, event.type(), false);
 
     int timelineAgentId = 0;
     InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent();
@@ -346,7 +343,7 @@
 
 InspectorInstrumentationCookie InspectorInstrumentation::willFireTimerImpl(InstrumentingAgents* instrumentingAgents, int timerId)
 {
-    pauseOnNativeEventIfNeeded(instrumentingAgents, instrumentationEventCategoryType, timerFiredEventName, false);
+    pauseOnNativeEventIfNeeded(instrumentingAgents, false, timerFiredEventName, false);
 
     int timelineAgentId = 0;
     if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent()) {
@@ -967,11 +964,11 @@
     return page && page->inspectorController()->hasFrontend();
 }
 
-void InspectorInstrumentation::pauseOnNativeEventIfNeeded(InstrumentingAgents* instrumentingAgents, const String& categoryType, const String& eventName, bool synchronous)
+void InspectorInstrumentation::pauseOnNativeEventIfNeeded(InstrumentingAgents* instrumentingAgents, bool isDOMEvent, const String& eventName, bool synchronous)
 {
 #if ENABLE(_javascript__DEBUGGER)
     if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents->inspectorDOMDebuggerAgent())
-        domDebuggerAgent->pauseOnNativeEventIfNeeded(categoryType, eventName, synchronous);
+        domDebuggerAgent->pauseOnNativeEventIfNeeded(isDOMEvent, eventName, synchronous);
 #endif
 }
 
@@ -1040,3 +1037,4 @@
 } // namespace WebCore
 
 #endif // !ENABLE(INSPECTOR)
+
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to