Bug 195732 - Web Inspector: REGRESSION: Canvas: the first processed action should be selected as soon as it's available if no previous selected action exists
Summary: Web Inspector: REGRESSION: Canvas: the first processed action should be selec...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks: WebInspectorCanvasRecording WebInspectorCanvasTab
  Show dependency treegraph
 
Reported: 2019-03-13 20:19 PDT by Devin Rousso
Modified: 2019-03-14 13:48 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.46 KB, patch)
2019-03-13 20:23 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (2.43 KB, patch)
2019-03-13 20:25 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (2.49 KB, patch)
2019-03-14 13:21 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-03-13 20:19:37 PDT
# STEPS TO REPRODUCE:
1. inspect any page with a <canvas>
2. take a multi-frame recording (or a single frame that is very very long)
3. stop the recording
4. wait for the recording content view to appear and the recording actions to start processing
 => no action is initially selected, which means that there is no preview in the main content area
Comment 1 Radar WebKit Bug Importer 2019-03-13 20:20:43 PDT
<rdar://problem/48875214>
Comment 2 Devin Rousso 2019-03-13 20:23:32 PDT
Created attachment 364619 [details]
Patch
Comment 3 Devin Rousso 2019-03-13 20:25:18 PDT
Created attachment 364620 [details]
Patch
Comment 4 Matt Baker 2019-03-14 11:43:11 PDT
Comment on attachment 364620 [details]
Patch

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

r=me

> Source/WebInspectorUI/ChangeLog:11
> +        Rather than wait till the entire recording is ready, set the selected action as soon as the

s/till/until

> Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js:581
> +            this.action = action;

So `action` here is equivalent to this._recording.actions[0], if the recording were ready?
Comment 5 Devin Rousso 2019-03-14 13:17:58 PDT
Comment on attachment 364620 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js:581
>> +            this.action = action;
> 
> So `action` here is equivalent to this._recording.actions[0], if the recording were ready?

Yes, but not if the recording is ready.  This event listener is only fired when processing actions, so this check is basically saying "when we process an action, if we haven't set a selected action yet, use this action".  Although it's effectively impossible (unless some funky stuff happens, or this is changed in the future) for this if to be hit by anything other than the first action, I'll change it to `this._recording.actions[0]` just in case.
Comment 6 Devin Rousso 2019-03-14 13:21:10 PDT
Created attachment 364679 [details]
Patch
Comment 7 WebKit Commit Bot 2019-03-14 13:48:44 PDT
Comment on attachment 364679 [details]
Patch

Clearing flags on attachment: 364679

Committed r242962: <https://trac.webkit.org/changeset/242962>
Comment 8 WebKit Commit Bot 2019-03-14 13:48:45 PDT
All reviewed patches have been landed.  Closing bug.