Web Inspector: REGRESSION: Canvas: the first processed action should be selected...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Mar 2019 20:48:38 +0000 (20:48 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Mar 2019 20:48:38 +0000 (20:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195732
<rdar://problem/48875214>

Reviewed by Matt Baker.

* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel.prototype._handleRecordingProcessedAction):
Rather than wait until the entire recording is ready, set the selected action as soon as the
first action is ready (assuming there isn't already a selected action).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242962 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js

index b071d07..2c197f6 100644 (file)
@@ -1,3 +1,16 @@
+2019-03-14  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: REGRESSION: Canvas: the first processed action should be selected as soon as it's available if no previous selected action exists
+        https://bugs.webkit.org/show_bug.cgi?id=195732
+        <rdar://problem/48875214>
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/CanvasSidebarPanel.js:
+        (WI.CanvasSidebarPanel.prototype._handleRecordingProcessedAction):
+        Rather than wait until the entire recording is ready, set the selected action as soon as the
+        first action is ready (assuming there isn't already a selected action).
+
 2019-03-14  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Network - HAR Import
index c37f0fa..00bc817 100644 (file)
@@ -577,12 +577,14 @@ WI.CanvasSidebarPanel = class CanvasSidebarPanel extends WI.NavigationSidebarPan
         console.assert(isInitialStateAction || this._recordingTreeOutline.children.lastValue instanceof WI.FolderTreeElement, "There should be a WI.FolderTreeElement for the frame for this action.");
         this._createRecordingActionTreeElement(action, index, isInitialStateAction ? this._recordingTreeOutline : this._recordingTreeOutline.children.lastValue);
 
+        if (!this._recording[WI.CanvasSidebarPanel.SelectedActionSymbol]) {
+            console.assert(action === this._recording.actions[0]);
+            this.action = this._recording.actions[0];
+        }
+
         if (this._recording.ready) {
             this._recording.removeEventListener(null, null, this);
 
-            if (!this._recording[WI.CanvasSidebarPanel.SelectedActionSymbol])
-                this.action = this._recording.actions[0];
-
             if (this._recordingProcessingOptionsContainer) {
                 this._recordingProcessingOptionsContainer.remove();
                 this._recordingProcessingOptionsContainer = null;