Implement HTMLCanvasElement.toBlob (#34938)

This refactors some of the code that is shared with toDataURL, and
updates the webidl definition to match the current spec (using a default
value for the mime type).

Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
webbeef 2025-01-10 11:04:42 -08:00 committed by GitHub
parent 9aaa6934b7
commit 44d1e2ae0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 206 additions and 130 deletions

View file

@ -1,3 +0,0 @@
[toBlob-cross-realm-callback-report-exception.html]
[toBlob() reports the exception from its callback in the callback's global object]
expected: FAIL

View file

@ -1,3 +0,0 @@
[toBlob.jpeg.html]
[toBlob with image/jpeg returns a JPEG Blob]
expected: FAIL

View file

@ -1,3 +0,0 @@
[toBlob.null.html]
[toBlob with zero dimension returns a null Blob]
expected: FAIL

View file

@ -1,3 +0,0 @@
[toBlob.png.html]
[toBlob with image/png returns a PNG Blob]
expected: FAIL

View file

@ -1,4 +0,0 @@
[currentSrc-blob-cache.html]
[currentSrc is right even if underlying image is a shared blob]
expected: FAIL