WebKit Bugzilla
Attachment 347140 Details for
Bug 188594
: Web Inspector: REGRESSION(r?): the probe sidebar doesn't show up when adding probes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188594-20180814182346.patch (text/plain), 7.37 KB, created by
Devin Rousso
on 2018-08-14 18:23:47 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2018-08-14 18:23:47 PDT
Size:
7.37 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index b1e1d78832becb6259b00ca6480a6bacfc68d5a9..c1504af39f06249d1a370d682bf2db63263c9d05 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,29 @@ >+2018-08-14 Devin Rousso <drousso@apple.com> >+ >+ 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 NOBODY (OOPS!). >+ >+ * 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-13 Matt Baker <mattbaker@apple.com> > > Web Inspector: Table should handle row selection instead of the table delegate >diff --git a/Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.js >index 9583bd7a0c91dd51d4c98fb915101bf487dbd17d..59ccbe6d430654ae3d227d447dfa8870b2458c16 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.js >@@ -45,14 +45,16 @@ WI.ProbeDetailsSidebarPanel = class ProbeDetailsSidebarPanel extends WI.DetailsS > { > for (let probeSet of this._inspectedProbeSets) { > let removedSection = this._probeSetSections.get(probeSet); >- removedSection.element.remove(); >+ if (removedSection) >+ removedSection.element.remove(); > } > > this._inspectedProbeSets = newProbeSets; > > 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.ProbeDetailsSidebarPanel = class ProbeDetailsSidebarPanel extends WI.DetailsS > 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() >diff --git a/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGrid.js b/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGrid.js >index c07c158d72cc16e5f90c593c46560197d448c148..68ec419d802aadb95d90b087033b41927f9026d5 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGrid.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGrid.js >@@ -33,7 +33,7 @@ WI.ProbeSetDataGrid = class ProbeSetDataGrid extends WI.DataGrid > 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 @@ WI.ProbeSetDataGrid = class ProbeSetDataGrid extends WI.DataGrid > this._setupData(); > } > >+ // Static >+ >+ static columnIdentifierForProbe(probe) >+ { >+ return "probe" + probe.id; >+ } >+ > // Public > > closed() >@@ -71,7 +78,7 @@ WI.ProbeSetDataGrid = class ProbeSetDataGrid extends WI.DataGrid > _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 @@ WI.ProbeSetDataGrid = class ProbeSetDataGrid extends WI.DataGrid > _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 @@ WI.ProbeSetDataGrid = class ProbeSetDataGrid extends WI.DataGrid > 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); >diff --git a/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGridNode.js b/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGridNode.js >index b69dbd1cd8e0181a711ec65f896c028a58506266..0ebb1a58b750a1cfb8d65a9852c1f2a610ae49a9 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGridNode.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGridNode.js >@@ -56,13 +56,15 @@ WI.ProbeSetDataGridNode = class ProbeSetDataGridNode extends WI.DataGridNode > 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; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188594
: 347140