Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Unified Diff: third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.idl

Issue 1455763002: Use union type in ImageBitmapFactories.idl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better argument passing Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.idl
diff --git a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.idl b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.idl
index 6b0433d52bca157216c0666cfd08f3d149c3b4f2..a94b9922123c3e8aaec75802407ae35fdeeb9969 100644
--- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.idl
+++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.idl
@@ -28,19 +28,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-// https://html.spec.whatwg.org/#imagebitmapfactories
-
-// FIXME: should use typedef instead, but
-// requires better union type support: http://crbug.com/240176
-/*
-typedef (// HTMLImageElement or
- // HTMLVideoElement or
- // HTMLCanvasElement or
+typedef (HTMLImageElement or
+ HTMLVideoElement or
+ HTMLCanvasElement or
Blob or
ImageData or
- // CanvasRenderingContext2D or
ImageBitmap) ImageBitmapSource;
-*/
[
LegacyTreatAsPartialInterface,
@@ -48,12 +41,8 @@ typedef (// HTMLImageElement or
Exposed=(Window,Worker),
RuntimeEnabled=ExperimentalCanvasFeatures,
] interface ImageBitmapFactories {
- [CallWith=ScriptState, RaisesException] Promise createImageBitmap(Blob blob);
- [CallWith=ScriptState, RaisesException] Promise createImageBitmap(Blob blob, long sx, long sy, long sw, long sh);
- [CallWith=ScriptState, RaisesException] Promise createImageBitmap(ImageData data);
- [CallWith=ScriptState, RaisesException] Promise createImageBitmap(ImageData data, long sx, long sy, long sw, long sh);
- [CallWith=ScriptState, RaisesException] Promise createImageBitmap(ImageBitmap bitmap);
- [CallWith=ScriptState, RaisesException] Promise createImageBitmap(ImageBitmap bitmap, long sx, long sy, long sw, long sh);
+ [CallWith=ScriptState, RaisesException] Promise createImageBitmap(ImageBitmapSource imageBitmap);
+ [CallWith=ScriptState, RaisesException] Promise createImageBitmap(ImageBitmapSource imageBitmap, long sx, long sy, long sw, long sh);
};
Window implements ImageBitmapFactories;

Powered by Google App Engine
This is Rietveld 408576698