Title: [129775] trunk/Source/WebCore
- Revision
- 129775
- Author
- vse...@chromium.org
- Date
- 2012-09-27 10:09:38 -0700 (Thu, 27 Sep 2012)
Log Message
Web Inspector: [REGRESSION] Breakpoints are not always shown in breakpoints sidebar pane.
https://bugs.webkit.org/show_bug.cgi?id=97783
Reviewed by Pavel Feldman.
BreakpointSidebarPane now explicitly adds all breakpoints that are available at the moment of its creation.
* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager.prototype._filteredBreakpointLocations):
(WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
(WebInspector.BreakpointManager.prototype.allBreakpointLocations):
* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector._javascript_BreakpointsSidebarPane):
(WebInspector._javascript_BreakpointsSidebarPane.prototype._breakpointAdded):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (129774 => 129775)
--- trunk/Source/WebCore/ChangeLog 2012-09-27 17:09:02 UTC (rev 129774)
+++ trunk/Source/WebCore/ChangeLog 2012-09-27 17:09:38 UTC (rev 129775)
@@ -1,3 +1,20 @@
+2012-09-27 Vsevolod Vlasov <vse...@chromium.org>
+
+ Web Inspector: [REGRESSION] Breakpoints are not always shown in breakpoints sidebar pane.
+ https://bugs.webkit.org/show_bug.cgi?id=97783
+
+ Reviewed by Pavel Feldman.
+
+ BreakpointSidebarPane now explicitly adds all breakpoints that are available at the moment of its creation.
+
+ * inspector/front-end/BreakpointManager.js:
+ (WebInspector.BreakpointManager.prototype._filteredBreakpointLocations):
+ (WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
+ (WebInspector.BreakpointManager.prototype.allBreakpointLocations):
+ * inspector/front-end/BreakpointsSidebarPane.js:
+ (WebInspector._javascript_BreakpointsSidebarPane):
+ (WebInspector._javascript_BreakpointsSidebarPane.prototype._breakpointAdded):
+
2012-09-27 Mike West <mk...@chromium.org>
Dropping JSC references from InspectorInstrumentation.h by including 'ScriptState.h'
Modified: trunk/Source/WebCore/inspector/front-end/BreakpointManager.js (129774 => 129775)
--- trunk/Source/WebCore/inspector/front-end/BreakpointManager.js 2012-09-27 17:09:02 UTC (rev 129774)
+++ trunk/Source/WebCore/inspector/front-end/BreakpointManager.js 2012-09-27 17:09:38 UTC (rev 129775)
@@ -133,17 +133,17 @@
},
/**
- * @param {WebInspector.UISourceCode} uiSourceCode
- * @return {Array.<Object>}
+ * @param {function(WebInspector.BreakpointManager.Breakpoint, WebInspector.UILocation)} filter
+ * @return {Array.<{breakpoint: WebInspector.BreakpointManager.Breakpoint, uiLocation: WebInspector.UILocation}>}
*/
- breakpointLocationsForUISourceCode: function(uiSourceCode)
+ _filteredBreakpointLocations: function(filter)
{
var result = [];
for (var i = 0; i < this._breakpoints.length; ++i) {
var breakpoint = this._breakpoints[i];
for (var stringifiedLocation in breakpoint._uiLocations) {
var uiLocation = breakpoint._uiLocations[stringifiedLocation];
- if (uiLocation.uiSourceCode === uiSourceCode)
+ if (filter(breakpoint, uiLocation))
result.push({breakpoint: breakpoint, uiLocation: uiLocation});
}
}
@@ -151,6 +151,28 @@
},
/**
+ * @param {WebInspector.UISourceCode} uiSourceCode
+ * @return {Array.<{breakpoint: WebInspector.BreakpointManager.Breakpoint, uiLocation: WebInspector.UILocation}>}
+ */
+ breakpointLocationsForUISourceCode: function(uiSourceCode)
+ {
+ function filter(breakpoint, uiLocation)
+ {
+ return uiLocation.uiSourceCode === uiSourceCode;
+ }
+
+ return this._filteredBreakpointLocations(filter);
+ },
+
+ /**
+ * @return {Array.<{breakpoint: WebInspector.BreakpointManager.Breakpoint, uiLocation: WebInspector.UILocation}>}
+ */
+ allBreakpointLocations: function()
+ {
+ return this._filteredBreakpointLocations(function(breakpoint, uiLocation) { return true; });
+ },
+
+ /**
* @param {boolean} toggleState
*/
toggleAllBreakpoints: function(toggleState)
Modified: trunk/Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js (129774 => 129775)
--- trunk/Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js 2012-09-27 17:09:02 UTC (rev 129774)
+++ trunk/Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js 2012-09-27 17:09:38 UTC (rev 129775)
@@ -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);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes