STR: 1. Go to a site with a canvas that doesn't do anything without interaction (acko.net) 2. Select the Canvas, start a recording 3. Stop the recording => Nothing happens, the recording is empty 4. Start a new recording again => Red titlebar not present, Recording button doesn't change from circle to square
<rdar://problem/35176303>
Created attachment 324865 [details] Patch
Comment on attachment 324865 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=324865&action=review r=me with some test issues. Please re-EWS the test changes, thanks. > LayoutTests/inspector/canvas/recording-2d.html:480 > + throw "Missing 2D canvas."; Does an async function wrap this in an Error? If not, please throw an Error. Throwing a string will lose exception context, IIRC. > LayoutTests/inspector/canvas/recording-2d.html:493 > + await CanvasAgent.stopRecording(canvas.identifier); It is weird to use CanvasAgent directly, but use CanvasManager right above. I'd prefer you stick to manager API if using inspector-test.js
Comment on attachment 324865 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=324865&action=review >> LayoutTests/inspector/canvas/recording-2d.html:493 >> + await CanvasAgent.stopRecording(canvas.identifier); > > It is weird to use CanvasAgent directly, but use CanvasManager right above. I'd prefer you stick to manager API if using inspector-test.js The issue with using CanvasManager is that it doesn't return a promise, meaning that we cant use async-await. I'll restructure the test to make it work.
Created attachment 324895 [details] Patch
Comment on attachment 324895 [details] Patch r=mews
(In reply to Devin Rousso from comment #4) > Comment on attachment 324865 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=324865&action=review > > >> LayoutTests/inspector/canvas/recording-2d.html:493 > >> + await CanvasAgent.stopRecording(canvas.identifier); > > > > It is weird to use CanvasAgent directly, but use CanvasManager right above. I'd prefer you stick to manager API if using inspector-test.js > > The issue with using CanvasManager is that it doesn't return a promise, > meaning that we cant use async-await. I'll restructure the test to make it > work. I figured. Sorry to ruin your fun. Someday we'll fix that?
Comment on attachment 324895 [details] Patch Clearing flags on attachment: 324895 Committed r223998: <https://trac.webkit.org/changeset/223998>
All reviewed patches have been landed. Closing bug.