Index: Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js |
=================================================================== |
--- Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js (revision 130257) |
+++ Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js (working copy) |
@@ -45,6 +45,11 @@ |
this.bodyElement.appendChild(this.emptyElement); |
this._items = new Map(); |
+ |
+ var breakpointLocations = this._breakpointManager.allBreakpointLocations(); |
+ for (var i = 0; i < breakpointLocations.length; ++i) |
+ this._addBreakpoint(breakpointLocations[i].breakpoint, breakpointLocations[i].uiLocation); |
+ |
this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointAdded, this._breakpointAdded, this); |
this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointRemoved, this._breakpointRemoved, this); |
} |
@@ -59,7 +64,15 @@ |
var breakpoint = /** @type {WebInspector.BreakpointManager.Breakpoint} */ event.data.breakpoint; |
var uiLocation = /** @type {WebInspector.UILocation} */ event.data.uiLocation; |
+ this._addBreakpoint(breakpoint, uiLocation); |
+ }, |
+ /** |
+ * @param {WebInspector.BreakpointManager.Breakpoint} breakpoint |
+ * @param {WebInspector.UILocation} uiLocation |
+ */ |
+ _addBreakpoint: function(breakpoint, uiLocation) |
+ { |
var element = document.createElement("li"); |
element.addStyleClass("cursor-pointer"); |
element.addEventListener("contextmenu", this._breakpointContextMenu.bind(this, breakpoint), true); |