mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use snapshot size instead of canvas size when converting canvas to blob (#36705)
The blob data is encoded asynchronously, therefore the canvas size may have changed since it's data was saved to a snapshot. Using the canvas size confuses the encoder, because the provided data does not match the expected size anymore. Testing: This change includes a new web platform test Fixes https://github.com/servo/servo/issues/36702 --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
18d6981d84
commit
902d2ad8f4
3 changed files with 36 additions and 11 deletions
9
tests/wpt/mozilla/meta/MANIFEST.json
vendored
9
tests/wpt/mozilla/meta/MANIFEST.json
vendored
|
@ -9,6 +9,15 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"canvas": {
|
||||
"toblob-then-change-size-crash.html": [
|
||||
"355474b4832dde985a73baad925702bbb0cbc73f",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"datatransferitem-crash.html": [
|
||||
"d11355ab38c1e99e0ba3e10d7dfed18bf26af60b",
|
||||
[
|
||||
|
|
8
tests/wpt/mozilla/tests/mozilla/canvas/toblob-then-change-size-crash.html
vendored
Normal file
8
tests/wpt/mozilla/tests/mozilla/canvas/toblob-then-change-size-crash.html
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- https://github.com/servo/servo/issues/36702 -->
|
||||
<canvas id="canvas"></canvas>
|
||||
<script>
|
||||
canvas.toBlob(() => {});
|
||||
canvas.width = 0;
|
||||
</script>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue