Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix resize test for offscreen canvas
OffscreenCanvas has different rules than HTMLCanvasElement HTMLCanvasElement can have width or height set to negative numbers and will then set the canvas width or height to its default, 300 for width, 150 for height OffscreenCanvas will throw an error with a negative width or height. For OffscreenCanvas, all 3 major browsers do not reset the canvas if width or height are set to the same value they already are For HTMLCanvasElement, Beacuse there are issues with requestAnimationFrame, ResizeObserver, and compositing the page, it seems like, at least for HTMLCanvasElement, all 3 APIs should behave the same.
- Loading branch information