Bug 194687

Summary: Web Inspector: Canvas: recordings with a single frame sometimes missing TreeElement
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=194721
Bug Depends on:    
Bug Blocks: 175485    
Attachments:
Description Flags
Patch none

Devin Rousso
Reported 2019-02-14 18:24:30 PST
# STEPS TO REPRODUCE: 1. inspect <https://devinrousso.com/demo/WebKit/canvas.html> 2. open the Canvas tab 3. start a single-frame recording of the 2D canvas 4. click the button with "8" 5. once the recording loads, select the "Frame 1" tree element 6. start a single-frame recording of the 2D canvas 7. click the button with "9" => there is no "Frame 1" tree element, even though the visual action scrubber says there are at least 2 visual actions
Attachments
Patch (3.81 KB, patch)
2019-02-14 19:24 PST, Devin Rousso
no flags
Devin Rousso
Comment 1 2019-02-14 18:29:11 PST
AFAICT, it looks like the issue has to do with `Object.prototype.soon`. Here's the stream of calls: 1. `appendChild` for "Initial State" 2. `soon` `updateVirtualizedElements` for the recording actions `TreeOutline` 3. the timeout from (2) fires, which actually adds the `TreeElement` from (1) to the DOM 4. `appendChild` for "Frame 1" 5. `soon` `updateVirtualizedElements` for the recording actions `TreeOutline` => the timeout from (5) never seems to fire
Devin Rousso
Comment 2 2019-02-14 18:41:02 PST
(In reply to Devin Rousso from comment #0) > 5. once the recording loads, select the "Frame 1" tree element Interestingly, the issue only reproduces when any `TreeElement` other than the first one is selected. Additionally, the first recording (3) can be multi-frame, but the second recording (6) has to be single-frame.
Devin Rousso
Comment 3 2019-02-14 19:24:19 PST
Joseph Pecoraro
Comment 4 2019-02-21 11:30:44 PST
Comment on attachment 362092 [details] Patch r=me
WebKit Commit Bot
Comment 5 2019-02-21 11:59:06 PST
Comment on attachment 362092 [details] Patch Clearing flags on attachment: 362092 Committed r241875: <https://trac.webkit.org/changeset/241875>
WebKit Commit Bot
Comment 6 2019-02-21 11:59:08 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2019-02-21 14:11:25 PST
Note You need to log in before you can comment on or make changes to this bug.