Bug 179072 - Web Inspector: Canvas Tab: selecting Frame tree element should update preview/slider, does nothing
Summary: Web Inspector: Canvas Tab: selecting Frame tree element should update preview...
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: 2017-10-31 13:03 PDT by Brian Burg
Modified: 2017-12-04 17:40 PST (History)
5 users (show)

See Also:


Attachments
Patch (3.50 KB, patch)
2017-11-03 00:32 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 Brian Burg 2017-10-31 13:03:42 PDT
Steps to reproduce:

- Capture a bunch of frames that change slightly, like webkit.org or acko.net animated backgrounds
- Select a frame, go between frames with arrow keys
=> Preview doesn't update, unless going to "initial state"

This is really annoying because I want to quickly find a frame with a particular visual feature or glitch. If I use the slider to try and scrub, then the preview flickers a lot as it needs to show all intermediate clear() calls.

When I select a frame tree element, I would expect it to show the a preview after the final output-affecting command in the frame window. That way I can expand an interesting frame and see how it's built up from an initial clear() call.
Comment 1 Radar WebKit Bug Importer 2017-10-31 13:04:28 PDT
<rdar://problem/35278711>
Comment 2 Devin Rousso 2017-10-31 13:14:52 PDT
The original Recording tab had this functionality.  The new Canvas tab removed it (<https://webkit.org/b/177606>).  I don't take multi-frame recordings very often, so I'm don't have a strong opinion about how it should work.
Comment 3 Devin Rousso 2017-11-03 00:32:26 PDT
Created attachment 325869 [details]
Patch
Comment 4 Matt Baker 2017-11-05 19:27:39 PST
Comment on attachment 325869 [details]
Patch

r=me, with some thoughts:

I left this behavior out during the redesign, because of the effect it has on the slider when selecting actions in the sidebar with up/down keys. Doing nothing when selecting a frame tree element probably wasn't the right choice, but was done to prevent this:

With multiple frames expanded, select the first frame:

Frame 1*
  Action 1
  Action 2
Frame 2
  Action 3

=> Slider shows 2 of 3

Press down arrow once:

Frame 1
  Action 1*
  Action 2
Frame 2
  Action 3

=> Slider shows 1 of 3

For the change in the slider to be monotonic, selecting a frame tree element would need to select the first child action instead of the last. But this prevents skipping to the end of the recording by selecting the last frame tree element.
Comment 5 WebKit Commit Bot 2017-11-05 19:47:09 PST
Comment on attachment 325869 [details]
Patch

Clearing flags on attachment: 325869

Committed r224475: <https://trac.webkit.org/changeset/224475>
Comment 6 WebKit Commit Bot 2017-11-05 19:47:10 PST
All reviewed patches have been landed.  Closing bug.