Web Inspector: REGRESSION: CanvasSidebarPanel is empty for imported recordings
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Aug 2018 00:06:40 +0000 (00:06 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Aug 2018 00:06:40 +0000 (00:06 +0000)
commit2bba96318fd69af145a23c80ebecabc83c07df88
tree45d5dd0a9816198823da9a1964a010769dc6525d
parente341d9ebbc8b8660cdd8cf6263ebd445e53b16a1
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js