Auto merge of #26623 - jdm:imagebitmap-gate, r=gterzian

Add a preference to control ImageBitmap while it's incomplete.

Hubs tries to make use of incomplete APIs to load textures and this causes errors. It works fine if we hide the interface instead.
This commit is contained in:
bors-servo 2020-05-25 00:08:19 -04:00 committed by GitHub
commit ce076a8382
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 11 additions and 7 deletions

View file

@ -10,7 +10,7 @@
*/
//[Exposed=(Window,Worker), Serializable, Transferable]
[Exposed=(Window,Worker)]
[Exposed=(Window,Worker), Pref="dom.imagebitmap.enabled"]
interface ImageBitmap {
readonly attribute unsigned long width;
readonly attribute unsigned long height;

View file

@ -24,6 +24,7 @@ interface mixin WindowOrWorkerGlobalScope {
void queueMicrotask(VoidFunction callback);
// ImageBitmap
[Pref="dom.imagebitmap.enabled"]
Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options = {});
// Promise<ImageBitmap> createImageBitmap(
// ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options);