Title: [234889] trunk/Source/WebInspectorUI
- Revision
- 234889
- Author
- [email protected]
- Date
- 2018-08-15 10:29:14 -0700 (Wed, 15 Aug 2018)
Log Message
Web Inspector: REGRESSION(r?): the probe sidebar doesn't show up when adding probes
https://bugs.webkit.org/show_bug.cgi?id=188594
Reviewed by Brian Burg.
* UserInterface/Views/ProbeDetailsSidebarPanel.js:
(WI.ProbeDetailsSidebarPanel.prototype.set inspectedProbeSets):
(WI.ProbeDetailsSidebarPanel.prototype.initialLayout):
Add checks to ensure that DOM elements for each probe section exist before trying to
add/remove them from the sidebar. This can happen if probes are inspected before the sidebar
is shown for the first time.
* UserInterface/Views/ProbeSetDataGrid.js:
(WI.ProbeSetDataGrid):
(WI.ProbeSetDataGrid.columnIdentifierForProbe): Added.
(WI.ProbeSetDataGrid.prototype._setupProbe):
(WI.ProbeSetDataGrid.prototype._teardownProbe):
(WI.ProbeSetDataGrid.prototype._probeExpressionChanged):
* UserInterface/Views/ProbeSetDataGridNode.js:
(WI.ProbeSetDataGridNode.prototype.set frame):
Provide better column identifiers for each probe's `WI.DataGrid`. It's possible for the
numeric probe ID value to be stringified when passing it into the constructor of
`WI.DataGrid`, which will not match the original numeric value on later retrieval.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (234888 => 234889)
--- trunk/Source/WebInspectorUI/ChangeLog 2018-08-15 15:41:30 UTC (rev 234888)
+++ trunk/Source/WebInspectorUI/ChangeLog 2018-08-15 17:29:14 UTC (rev 234889)
@@ -1,3 +1,29 @@
+2018-08-15 Devin Rousso <[email protected]>
+
+ Web Inspector: REGRESSION(r?): the probe sidebar doesn't show up when adding probes
+ https://bugs.webkit.org/show_bug.cgi?id=188594
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Views/ProbeDetailsSidebarPanel.js:
+ (WI.ProbeDetailsSidebarPanel.prototype.set inspectedProbeSets):
+ (WI.ProbeDetailsSidebarPanel.prototype.initialLayout):
+ Add checks to ensure that DOM elements for each probe section exist before trying to
+ add/remove them from the sidebar. This can happen if probes are inspected before the sidebar
+ is shown for the first time.
+
+ * UserInterface/Views/ProbeSetDataGrid.js:
+ (WI.ProbeSetDataGrid):
+ (WI.ProbeSetDataGrid.columnIdentifierForProbe): Added.
+ (WI.ProbeSetDataGrid.prototype._setupProbe):
+ (WI.ProbeSetDataGrid.prototype._teardownProbe):
+ (WI.ProbeSetDataGrid.prototype._probeExpressionChanged):
+ * UserInterface/Views/ProbeSetDataGridNode.js:
+ (WI.ProbeSetDataGridNode.prototype.set frame):
+ Provide better column identifiers for each probe's `WI.DataGrid`. It's possible for the
+ numeric probe ID value to be stringified when passing it into the constructor of
+ `WI.DataGrid`, which will not match the original numeric value on later retrieval.
+
2018-08-14 Matt Baker <[email protected]>
Web Inspector: Table should not center rows when scrolling them into view
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.js (234888 => 234889)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.js 2018-08-15 15:41:30 UTC (rev 234888)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.js 2018-08-15 17:29:14 UTC (rev 234889)
@@ -45,7 +45,8 @@
{
for (let probeSet of this._inspectedProbeSets) {
let removedSection = this._probeSetSections.get(probeSet);
- removedSection.element.remove();
+ if (removedSection)
+ removedSection.element.remove();
}
this._inspectedProbeSets = newProbeSets;
@@ -52,7 +53,8 @@
for (let probeSet of newProbeSets) {
let shownSection = this._probeSetSections.get(probeSet);
- this.contentView.element.appendChild(shownSection.element);
+ if (shownSection)
+ this.contentView.element.appendChild(shownSection.element);
}
}
@@ -100,9 +102,10 @@
WI.probeManager.addEventListener(WI.ProbeManager.Event.ProbeSetAdded, this._probeSetAdded, this);
WI.probeManager.addEventListener(WI.ProbeManager.Event.ProbeSetRemoved, this._probeSetRemoved, this);
- // Initialize sidebar sections for probe sets that already exist.
- for (var probeSet of WI.probeManager.probeSets)
+ for (let probeSet of new Set([...this._inspectedProbeSets, ...WI.probeManager.probeSets]))
this._probeSetAdded(probeSet);
+
+ this.inspectedProbeSets = this._inspectedProbeSets;
}
sizeDidChange()
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGrid.js (234888 => 234889)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGrid.js 2018-08-15 15:41:30 UTC (rev 234888)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGrid.js 2018-08-15 17:29:14 UTC (rev 234889)
@@ -33,7 +33,7 @@
var columns = {};
for (var probe of probeSet.probes) {
var title = probe._expression_ || WI.UIString("(uninitialized)");
- columns[probe.id] = {title};
+ columns[WI.ProbeSetDataGrid.columnIdentifierForProbe(probe)] = {title};
}
super(columns);
@@ -56,6 +56,13 @@
this._setupData();
}
+ // Static
+
+ static columnIdentifierForProbe(probe)
+ {
+ return "probe" + probe.id;
+ }
+
// Public
closed()
@@ -71,7 +78,7 @@
_setupProbe(event)
{
var probe = event.data;
- this.insertColumn(probe.id, {title: probe._expression_});
+ this.insertColumn(WI.ProbeSetDataGrid.columnIdentifierForProbe(probe), {title: probe._expression_});
for (var frame of this._data.frames)
this._updateNodeForFrame(frame);
@@ -80,7 +87,7 @@
_teardownProbe(event)
{
var probe = event.data;
- this.removeColumn(probe.id);
+ this.removeColumn(WI.ProbeSetDataGrid.columnIdentifierForProbe(probe));
for (var frame of this._data.frames)
this._updateNodeForFrame(frame);
@@ -176,14 +183,15 @@
if (probe.breakpoint !== this.probeSet.breakpoint)
return;
- if (!this.columns.has(probe.id))
+ let columnIdentifier = WI.ProbeSetDataGrid.columnIdentifierForProbe(probe);
+ if (!this.columns.has(columnIdentifier))
return;
- var oldColumn = this.columns.get(probe.id);
- this.removeColumn(probe.id);
+ var oldColumn = this.columns.get(columnIdentifier);
+ this.removeColumn(columnIdentifier);
var ordinal = oldColumn["ordinal"];
var newColumn = {title: event.data.newValue};
- this.insertColumn(probe.id, newColumn, ordinal);
+ this.insertColumn(columnIdentifier, newColumn, ordinal);
for (var frame of this._data.frames)
this._updateNodeForFrame(frame);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGridNode.js (234888 => 234889)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGridNode.js 2018-08-15 15:41:30 UTC (rev 234888)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGridNode.js 2018-08-15 17:29:14 UTC (rev 234889)
@@ -56,13 +56,15 @@
console.assert(value instanceof WI.ProbeSetDataFrame, "Invalid ProbeSetDataFrame argument: ", value);
this._frame = value;
+
var data = ""
for (var probe of this.dataGrid.probeSet.probes) {
+ let columnIdentifier = WI.ProbeSetDataGrid.columnIdentifierForProbe(probe);
var sample = this.frame[probe.id];
if (!sample || !sample.object)
- data[probe.id] = WI.ProbeSetDataFrame.MissingValue;
+ data[columnIdentifier] = WI.ProbeSetDataFrame.MissingValue;
else
- data[probe.id] = sample.object;
+ data[columnIdentifier] = sample.object;
}
this._data = data;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes