Web Inspector: Canvas Tab: Multiple "waiting for frames" messages displayed
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jan 2018 23:01:11 +0000 (23:01 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jan 2018 23:01:11 +0000 (23:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=181865
<rdar://problem/36664737>

Reviewed by Devin Rousso.

* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype._recordingStarted):
(WI.CanvasContentView.prototype._recordingStopped):

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

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

index 9d373e7..faf0e91 100644 (file)
@@ -1,3 +1,15 @@
+2018-01-19  Matt Baker  <mattbaker@apple.com>
+
+        Web Inspector: Canvas Tab: Multiple "waiting for frames" messages displayed
+        https://bugs.webkit.org/show_bug.cgi?id=181865
+        <rdar://problem/36664737>
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Views/CanvasContentView.js:
+        (WI.CanvasContentView.prototype._recordingStarted):
+        (WI.CanvasContentView.prototype._recordingStopped):
+
 2018-01-19  Nikita Vasilyev  <nvasilyev@apple.com>
 
         Web Inspector: Styles Redesign: tabbing on commented out property throws exception
index e1efddf..66095f5 100644 (file)
@@ -263,6 +263,9 @@ WI.CanvasContentView = class CanvasContentView extends WI.ContentView
     {
         this._updateRecordNavigationItem();
 
+        if (!this.representedObject.isRecording)
+            return;
+
         if (!this._recordingProgressElement) {
             this._recordingProgressElement = this._previewContainerElement.insertAdjacentElement("beforebegin", document.createElement("div"));
             this._recordingProgressElement.className = "progress";
@@ -297,13 +300,16 @@ WI.CanvasContentView = class CanvasContentView extends WI.ContentView
         this._updateRecordNavigationItem();
 
         let {canvas, recording} = event.data;
-        if (canvas !== this.representedObject || !recording)
+        if (canvas !== this.representedObject)
             return;
 
-        this._addRecording(recording);
+        if (recording)
+            this._addRecording(recording);
 
-        this._recordingProgressElement.remove();
-        this._recordingProgressElement = null;
+        if (this._recordingProgressElement) {
+            this._recordingProgressElement.remove();
+            this._recordingProgressElement = null;
+        }
     }
 
     _handleRecordingSelectElementChange(event)