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

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: fix errors 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 376fafa1c0e090d170d1709c5b7d61ef9b81ace7..6f01acf3042722da7ce800e7ea1bbca23d8d5cfa 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,
@@ -49,12 +42,8 @@ typedef (// HTMLImageElement or
RuntimeEnabled=ExperimentalCanvasFeatures,
TypeChecking=Interface,
] 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);
Justin Novosad 2015/11/24 17:03:13 Nice!
+ [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