Issue #2546 - Part 1: Remove BufferSource support in CreateImageBitmap.

This commit is contained in:
Moonchild 2024-07-08 23:36:40 +02:00 committed by roytam1
commit 60fbaa2155
6 changed files with 15 additions and 328 deletions

View file

@ -10,25 +10,17 @@
* http://w3c.github.io/mediacapture-worker/#imagebitmap-extensions
*/
// Extensions
// Bug 1141979 - [FoxEye] Extend ImageBitmap with interfaces to access its
// underlying image data
//
// Note:
// Our overload resolution implementation doesn't deal with a union as the
// distinguishing argument which means we cannot overload functions via union
// types, a.k.a. we cannot overload createImageBitmap() via ImageBitmapSource
// and BufferSource. Here, we work around this issue by adding the BufferSource
// into ImageBitmapSource.
// This is needed because we don't support SVG element as canvas image source.
// See bug 1500768.
typedef (HTMLImageElement or
HTMLVideoElement or
HTMLCanvasElement or
HTMLVideoElement or
ImageBitmap) CanvasImageSourceExcludedSVG;
typedef (CanvasImageSourceExcludedSVG or
Blob or
ImageData or
CanvasRenderingContext2D or
ImageBitmap or
BufferSource) ImageBitmapSource;
CanvasRenderingContext2D or // This is out of spec.
ImageData) ImageBitmapSource;
[Exposed=(Window,Worker)]
interface ImageBitmap {