WebKit Bugzilla
Attachment 348353 Details for
Bug 189061
: Web Inspector: REGRESSION: CanvasSidebarPanel is empty for imported recordings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189061-20180828153444.patch (text/plain), 4.01 KB, created by
Devin Rousso
on 2018-08-28 15:34:45 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2018-08-28 15:34:45 PDT
Size:
4.01 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index aca81e50605fd17f184bba6c95518eab29c53ad0..f17094cb9d974b264e42e5c93ce84d1881720cc5 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,23 @@ >+2018-08-28 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: REGRESSION: CanvasSidebarPanel is empty for imported recordings >+ https://bugs.webkit.org/show_bug.cgi?id=189061 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-27 Keith Rollin <krollin@apple.com> > > Unreviewed build fix -- disable LTO for production builds >diff --git a/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js >index 34653daf2dbd41c0b0e2b5372aeed4eaaac94081..ac2b9b13ed76f0e623e197faf8aeae1a120bceb7 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js >@@ -119,6 +119,8 @@ WI.CanvasSidebarPanel = class CanvasSidebarPanel extends WI.NavigationSidebarPan > this._recording.addEventListener(WI.Recording.Event.StartProcessingFrame, this._handleRecordingStartProcessingFrame, this); > } > >+ this._updateRecordNavigationItem(); >+ this._updateRecordingScopeBar(); > this._recordingChanged(); > } > >@@ -221,9 +223,6 @@ WI.CanvasSidebarPanel = class CanvasSidebarPanel extends WI.NavigationSidebarPan > > _recordingAdded(event) > { >- this._updateRecordNavigationItem(); >- this._updateRecordingScopeBar(); >- > this.recording = event.data.item; > } > >@@ -458,14 +457,15 @@ WI.CanvasSidebarPanel = class CanvasSidebarPanel extends WI.NavigationSidebarPan > > 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; > > 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 @@ WI.CanvasSidebarPanel = class CanvasSidebarPanel extends WI.NavigationSidebarPan > 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]; >
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 189061
: 348353