Don't attempt to resize Offscreencanvas without a rendering context (#36855)

When the canvas context mode is a placeholder then we shouldn't resize
the context.

Testing: Includes a new test
Fixes: https://github.com/servo/servo/issues/36846

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-05-11 17:27:33 +02:00 committed by GitHub
parent d2afe00f7b
commit dc0e7587bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 65 additions and 30 deletions

View file

@ -16,6 +16,13 @@
null,
{}
]
],
"transfer-control-to-offscreencanvas-then-change-dimensions-crash.html": [
"bc0c7afd6ab2e1c313bb61ea4a5c68b402105f5d",
[
null,
{}
]
]
},
"datatransferitem-crash.html": [

View file

@ -0,0 +1,7 @@
<!DOCTYPE html>
<script>
let canvas = document.createElement("canvas");
let offscreenCanvas = canvas.transferControlToOffscreen();
offscreenCanvas.height = 0;
</script>