Bug 183647

Summary: Web Inspector: Canvas: a recording initiated by the user should be shown immediately on completion
Product: WebKit Reporter: Matt Baker <mattbaker>
Component: Web InspectorAssignee: Devin Rousso <drousso>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 173807    
Attachments:
Description Flags
Patch
none
Patch none

Description Matt Baker 2018-03-14 16:33:37 PDT
Summary:
A recording initiated by the user should be shown immediately on completion. This does not include recordings started using console.record.

Steps to Reproduce:
1. Open https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_animations
2. Open Canvas tab
3. Click record on the "A looping panorama" canvas
4. Wait for a couple frames, then hit stop
Actual:
  => Recording is added to "View Recordings"
Expected:
  => Recording view is shown

Note:
This only affects multi-frame recordings.
Comment 1 Radar WebKit Bug Importer 2018-03-14 16:33:51 PDT
<rdar://problem/38479187>
Comment 2 Devin Rousso 2018-03-14 17:26:27 PDT
Created attachment 335813 [details]
Patch
Comment 3 Matt Baker 2018-03-14 17:44:16 PDT
Comment on attachment 335813 [details]
Patch

r=me. A top-level comment about *why* this fixes the issue would be nice. I had to do some debugging to learn that CanvasManager was dispatching RecordingStopped with `fromConsole` set to true, because this._recordingCanvas was being nulled out too early.
Comment 4 Devin Rousso 2018-03-14 21:45:57 PDT
Created attachment 335832 [details]
Patch
Comment 5 WebKit Commit Bot 2018-03-14 22:54:57 PDT
Comment on attachment 335832 [details]
Patch

Clearing flags on attachment: 335832

Committed r229620: <https://trac.webkit.org/changeset/229620>
Comment 6 WebKit Commit Bot 2018-03-14 22:54:59 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Matt Baker 2018-03-14 23:48:52 PDT
Comment on attachment 335832 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=335832&action=review

> Source/WebInspectorUI/ChangeLog:20
> +        in `stopRecording`, so this patch just prevents it from being nulled too early.

You really took that review comment and ran with it!