Title: [235451] trunk/Source/WebInspectorUI
- Revision
- 235451
- Author
- drou...@apple.com
- Date
- 2018-08-28 17:06:40 -0700 (Tue, 28 Aug 2018)
Log Message
Web Inspector: REGRESSION: CanvasSidebarPanel is empty for imported recordings
https://bugs.webkit.org/show_bug.cgi?id=189061
Reviewed by Brian Burg.
When recordings are imported, they don't have an associated `WI.Canvas`, meaning that the
`WI.Recording` is never added to the canvas' `WI.RecordingCollection`. Previously, the
canvas sidebar relied upon the `ItemAdded` event to update the recording `WI.ScopeBar`.
Since the imported recording isn't ever added to the collection, this is never fired.
This patch moves the function call that updates the `WI.ScopeBar` to a more universal path,
ensuring that no matter how a `WI.Recording` is set for the sidebar, it will be shown.
* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel.prototype.set recording):
(WI.CanvasSidebarPanel.prototype._recordingAdded):
(WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (235450 => 235451)
--- trunk/Source/WebInspectorUI/ChangeLog 2018-08-28 23:43:59 UTC (rev 235450)
+++ trunk/Source/WebInspectorUI/ChangeLog 2018-08-29 00:06:40 UTC (rev 235451)
@@ -1,5 +1,25 @@
2018-08-28 Devin Rousso <drou...@apple.com>
+ Web Inspector: REGRESSION: CanvasSidebarPanel is empty for imported recordings
+ https://bugs.webkit.org/show_bug.cgi?id=189061
+
+ Reviewed by Brian Burg.
+
+ When recordings are imported, they don't have an associated `WI.Canvas`, meaning that the
+ `WI.Recording` is never added to the canvas' `WI.RecordingCollection`. Previously, the
+ canvas sidebar relied upon the `ItemAdded` event to update the recording `WI.ScopeBar`.
+ Since the imported recording isn't ever added to the collection, this is never fired.
+
+ This patch moves the function call that updates the `WI.ScopeBar` to a more universal path,
+ ensuring that no matter how a `WI.Recording` is set for the sidebar, it will be shown.
+
+ * UserInterface/Views/CanvasSidebarPanel.js:
+ (WI.CanvasSidebarPanel.prototype.set recording):
+ (WI.CanvasSidebarPanel.prototype._recordingAdded):
+ (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
+
+2018-08-28 Devin Rousso <drou...@apple.com>
+
Web Inspector: Search bar is too narrow in some localizations
https://bugs.webkit.org/show_bug.cgi?id=189060
<rdar://problem/43006369>
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js (235450 => 235451)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js 2018-08-28 23:43:59 UTC (rev 235450)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js 2018-08-29 00:06:40 UTC (rev 235451)
@@ -119,6 +119,8 @@
this._recording.addEventListener(WI.Recording.Event.StartProcessingFrame, this._handleRecordingStartProcessingFrame, this);
}
+ this._updateRecordNavigationItem();
+ this._updateRecordingScopeBar();
this._recordingChanged();
}
@@ -221,9 +223,6 @@
_recordingAdded(event)
{
- this._updateRecordNavigationItem();
- this._updateRecordingScopeBar();
-
this.recording = event.data.item;
}
@@ -458,7 +457,7 @@
this._recordingNavigationBar.element.classList.toggle("hidden", !this._canvas);
- let hasRecordings = this._canvas && this._canvas.recordingCollection.size;
+ let hasRecordings = this._recording || (this._canvas && this._canvas.recordingCollection.size);
this.element.classList.toggle("has-recordings", hasRecordings);
if (!hasRecordings)
return;
@@ -465,7 +464,8 @@
let scopeBarItems = [];
let selectedScopeBarItem = null;
- for (let recording of this._canvas.recordingCollection) {
+
+ let createScopeBarItem = (recording) => {
let scopeBarItem = new WI.ScopeBarItem(recording.displayName, recording.displayName);
if (recording === this._recording)
selectedScopeBarItem = scopeBarItem;
@@ -473,8 +473,16 @@
scopeBarItem.selected = false;
scopeBarItem.__recording = recording;
scopeBarItems.push(scopeBarItem);
+ };
+
+ if (this._canvas && this._canvas.recordingCollection) {
+ for (let recording of this._canvas.recordingCollection)
+ createScopeBarItem(recording);
}
+ if (this._recording && (!this._canvas || !this._canvas.recordingCollection.has(this._recording)))
+ createScopeBarItem(this._recording);
+
if (!selectedScopeBarItem) {
selectedScopeBarItem = scopeBarItems[0];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes