Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js

Issue 9429043: Merge 106347 - Web Inspector: DOMDebugger.setEventListenerBreakpoint should accept regular DOM even… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/inspector/InspectorInstrumentation.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js
===================================================================
--- Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js (revision 108453)
+++ Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js (working copy)
@@ -461,22 +461,25 @@
this.bodyElement.appendChild(this.categoriesElement);
this._breakpointItems = {};
- this._createCategory(WebInspector.UIString("Keyboard"), "listener", ["keydown", "keyup", "keypress", "textInput"]);
- this._createCategory(WebInspector.UIString("Mouse"), "listener", ["click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove", "mouseout", "mousewheel"]);
+ this._createCategory(WebInspector.UIString("Keyboard"), true, ["keydown", "keyup", "keypress", "textInput"]);
+ this._createCategory(WebInspector.UIString("Mouse"), true, ["click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove", "mouseout", "mousewheel"]);
// FIXME: uncomment following once inspector stops being drop targer in major ports.
// Otherwise, inspector page reacts on drop event and tries to load the event data.
- // this._createCategory(WebInspector.UIString("Drag"), "listener", ["drag", "drop", "dragstart", "dragend", "dragenter", "dragleave", "dragover"]);
- this._createCategory(WebInspector.UIString("Control"), "listener", ["resize", "scroll", "zoom", "focus", "blur", "select", "change", "submit", "reset"]);
- this._createCategory(WebInspector.UIString("Clipboard"), "listener", ["copy", "cut", "paste", "beforecopy", "beforecut", "beforepaste"]);
- this._createCategory(WebInspector.UIString("Load"), "listener", ["load", "unload", "abort", "error"]);
- this._createCategory(WebInspector.UIString("DOM Mutation"), "listener", ["DOMActivate", "DOMFocusIn", "DOMFocusOut", "DOMAttrModified", "DOMCharacterDataModified", "DOMNodeInserted", "DOMNodeInsertedIntoDocument", "DOMNodeRemoved", "DOMNodeRemovedFromDocument", "DOMSubtreeModified", "DOMContentLoaded"]);
- this._createCategory(WebInspector.UIString("Device"), "listener", ["deviceorientation", "devicemotion"]);
- this._createCategory(WebInspector.UIString("Timer"), "instrumentation", ["setTimer", "clearTimer", "timerFired"]);
- this._createCategory(WebInspector.UIString("Touch"), "listener", ["touchstart", "touchmove", "touchend", "touchcancel"]);
+ // this._createCategory(WebInspector.UIString("Drag"), true, ["drag", "drop", "dragstart", "dragend", "dragenter", "dragleave", "dragover"]);
+ this._createCategory(WebInspector.UIString("Control"), true, ["resize", "scroll", "zoom", "focus", "blur", "select", "change", "submit", "reset"]);
+ this._createCategory(WebInspector.UIString("Clipboard"), true, ["copy", "cut", "paste", "beforecopy", "beforecut", "beforepaste"]);
+ this._createCategory(WebInspector.UIString("Load"), true, ["load", "unload", "abort", "error"]);
+ this._createCategory(WebInspector.UIString("DOM Mutation"), true, ["DOMActivate", "DOMFocusIn", "DOMFocusOut", "DOMAttrModified", "DOMCharacterDataModified", "DOMNodeInserted", "DOMNodeInsertedIntoDocument", "DOMNodeRemoved", "DOMNodeRemovedFromDocument", "DOMSubtreeModified", "DOMContentLoaded"]);
+ this._createCategory(WebInspector.UIString("Device"), true, ["deviceorientation", "devicemotion"]);
+ this._createCategory(WebInspector.UIString("Timer"), false, ["setTimer", "clearTimer", "timerFired"]);
+ this._createCategory(WebInspector.UIString("Touch"), true, ["touchstart", "touchmove", "touchend", "touchcancel"]);
this._restoreBreakpoints();
}
+WebInspector.EventListenerBreakpointsSidebarPane.categotyListener = "listener:";
+WebInspector.EventListenerBreakpointsSidebarPane.categotyInstrumentation = "instrumentation:";
+
WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI = function(eventName)
{
if (!WebInspector.EventListenerBreakpointsSidebarPane._eventNamesForUI) {
@@ -490,7 +493,7 @@
}
WebInspector.EventListenerBreakpointsSidebarPane.prototype = {
- _createCategory: function(name, type, eventNames)
+ _createCategory: function(name, isDOMEvent, eventNames)
{
var categoryItem = {};
categoryItem.element = new TreeElement(name);
@@ -503,7 +506,7 @@
categoryItem.children = {};
for (var i = 0; i < eventNames.length; ++i) {
- var eventName = type + ":" + eventNames[i];
+ var eventName = (isDOMEvent ? WebInspector.EventListenerBreakpointsSidebarPane.categotyListener : WebInspector.EventListenerBreakpointsSidebarPane.categotyInstrumentation) + eventNames[i];
var breakpointItem = {};
var title = WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI(eventName);
@@ -563,7 +566,10 @@
if (!breakpointItem)
return;
breakpointItem.checkbox.checked = true;
- DOMDebuggerAgent.setEventListenerBreakpoint(eventName);
+ if (eventName.indexOf(WebInspector.EventListenerBreakpointsSidebarPane.categotyListener) === 0)
+ DOMDebuggerAgent.setEventListenerBreakpoint(eventName.substring(WebInspector.EventListenerBreakpointsSidebarPane.categotyListener.length));
+ else if (eventName.indexOf(WebInspector.EventListenerBreakpointsSidebarPane.categotyInstrumentation) === 0)
+ DOMDebuggerAgent.setInstrumentationBreakpoint(eventName.substring(WebInspector.EventListenerBreakpointsSidebarPane.categotyInstrumentation.length));
this._updateCategoryCheckbox(breakpointItem.parent);
},
@@ -573,7 +579,10 @@
if (!breakpointItem)
return;
breakpointItem.checkbox.checked = false;
- DOMDebuggerAgent.removeEventListenerBreakpoint(eventName);
+ if (eventName.indexOf(WebInspector.EventListenerBreakpointsSidebarPane.categotyListener) === 0)
+ DOMDebuggerAgent.removeEventListenerBreakpoint(eventName.substring(WebInspector.EventListenerBreakpointsSidebarPane.categotyListener.length));
+ else if (eventName.indexOf(WebInspector.EventListenerBreakpointsSidebarPane.categotyInstrumentation) === 0)
+ DOMDebuggerAgent.removeInstrumentationBreakpoint(eventName.substring(WebInspector.EventListenerBreakpointsSidebarPane.categotyInstrumentation.length));
this._updateCategoryCheckbox(breakpointItem.parent);
},
« no previous file with comments | « Source/WebCore/inspector/InspectorInstrumentation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698