Restore the capture viewport between animation recordings

This commit is contained in:
2026-11-07 19:50:35 +00:00
parent c9c411761c
commit f6491e995f
+4
View File
@@ -203,6 +203,10 @@ export function flutterPage(browser, log, { touch = false } = {}) {
evaluate,
/** Screencasts [ms] after clicking [target]; frames are `{ data, ms }` relative to the click. */
async film(target, ms) {
// Contact sheets use a scratch tab. Restore this target's compositor
// viewport before another screencast, otherwise Chrome can crop frames.
await send('Page.bringToFront');
await resize(viewport.width, viewport.height);
const point = await locate(target);
const frames = [];
const ack = (p) => {