mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
canvas: Add OffscreenCanvas 'convertToBlob' method (#37786)
Follow the HTML speficication and add missing 'convertToBlob' method to OffscreenCanvas interface. https://html.spec.whatwg.org/multipage/#dom-offscreencanvas-converttoblob Testing: Improvements in the following tests - html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob* - html/canvas/offscreen/manual/wide-gamut-canvas/2d.color.space.p3.convertToBlobp3.canvas.html Fixes: #24272 Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
parent
3ba5b89ef2
commit
6ba54e4d79
11 changed files with 187 additions and 187 deletions
|
@ -8,7 +8,7 @@ OffscreenRenderingContext;
|
|||
|
||||
dictionary ImageEncodeOptions {
|
||||
DOMString type = "image/png";
|
||||
unrestricted double quality = 1.0;
|
||||
unrestricted double quality;
|
||||
};
|
||||
|
||||
//enum OffscreenRenderingContextId { "2d", "webgl", "webgl2" };
|
||||
|
@ -21,5 +21,5 @@ interface OffscreenCanvas : EventTarget {
|
|||
|
||||
[Throws] OffscreenRenderingContext? getContext(DOMString contextId, optional any options = null);
|
||||
//ImageBitmap transferToImageBitmap();
|
||||
//Promise<Blob> convertToBlob(optional ImageEncodeOptions options);
|
||||
Promise<Blob> convertToBlob(optional ImageEncodeOptions options = {});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue