Repository navigation
Commit 9f17f9e
fix(server): desktop snapshots wait for the resized frame instead of returning the old one
A desktop window reports a resize (devicePixelRatio, innerWidth/innerHeight)
before its compositor draws a frame at the new size, so an unclipped
Page.captureScreenshot right after a resize could still return the old
1280x800 frame. Snapshot capture on display-scaled pages now retries until
the PNG matches the measured viewport, bounded at 2s, then keeps the last
frame. Re-enables the viewport test skipped in #22150.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 2777514 commit 9f17f9e
2 files changed
Lines changed: 33 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
375 | | - | |
| 373 | + | |
376 | 374 | | |
377 | 375 | | |
378 | 376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
484 | 485 | | |
485 | 486 | | |
486 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
487 | 518 | | |
488 | 519 | | |
489 | 520 | | |
| |||
506 | 537 | | |
507 | 538 | | |
508 | 539 | | |
509 | | - | |
| 540 | + | |
510 | 541 | | |
511 | 542 | | |
512 | 543 | | |
| |||
0 commit comments