Web Inspector: Canvas: no obvious way of switching to the overview when viewing an...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Apr 2019 20:31:02 +0000 (20:31 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Apr 2019 20:31:02 +0000 (20:31 +0000)
commit40fa6ee690522641e0ed476a89886b9f23a88351
tree2a1431d20ba2a0f7f5f85a35041f9679c7b887a7
parentb2f039634560b95a51a77c2d0500e6bc37352ff6
Web Inspector: Canvas: no obvious way of switching to the overview when viewing an imported recording
https://bugs.webkit.org/show_bug.cgi?id=197178
<rdar://problem/50106641>

Reviewed by Timothy Hatcher.

Expand the idea of "imported" recordings to include "saved" recordings, ones whose
underlying <canvas> was destroyed.

* UserInterface/Views/CanvasTabContentView.js:
(WI.CanvasTabContentView):
(WI.CanvasTabContentView.prototype.attached):
(WI.CanvasTabContentView.prototype._removeCanvas):
(WI.CanvasTabContentView.prototype._addRecording):
(WI.CanvasTabContentView.prototype._handleRecordingSavedOrStopped): Added.
(WI.CanvasTabContentView.prototype.initialLayout): Deleted.
(WI.CanvasTabContentView.prototype._recordingImportedOrStopped): Deleted.
Make the "Saved Recordings" folder a child of the "Overview" so that the "Overview" path
component is always visible/clickable.

* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView):
(WI.CanvasOverviewContentView.prototype.contentViewAdded):
(WI.CanvasOverviewContentView.prototype.attached):
(WI.CanvasOverviewContentView.prototype.detached):
(WI.CanvasOverviewContentView.prototype._addSavedRecording): Added.
(WI.CanvasOverviewContentView.prototype._handleRecordingSaved): Added.
(WI.CanvasOverviewContentView.prototype._handleSavedRecordingClicked): Added.
* UserInterface/Views/CanvasOverviewContentView.css:
(.content-view.canvas-overview .content-view.canvas.saved-recordings): Added.
(.content-view.canvas-overview .content-view.canvas.saved-recordings .tree-outline): Added.
(.content-view.canvas-overview .content-view.canvas.saved-recordings .tree-outline > .item.recording > .icon): Added.
Add a card for "Saved Recordings" that mimics the style of regular canvas cards.

* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager):
(WI.CanvasManager.prototype.get savedRecordings): Added.
(WI.CanvasManager.prototype.async processJSON):
(WI.CanvasManager.prototype.disable):
(WI.CanvasManager.prototype._removeCanvas):
(WI.CanvasManager.prototype.get importedRecordings): Deleted.

* Localizations/en.lproj/localizedStrings.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Controllers/CanvasManager.js
Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.css
Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js
Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js