Index: Source/core/html/canvas/CanvasRenderingContext2D.idl |
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.idl b/Source/core/html/canvas/CanvasRenderingContext2D.idl |
index 198cf3ade55877b017f060dcf61292783b4b5a86..1faf6e71c675fe86d4a80dee06562dea7ce6403d 100644 |
--- a/Source/core/html/canvas/CanvasRenderingContext2D.idl |
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.idl |
@@ -26,14 +26,11 @@ |
// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d |
// FIXME: float => double throughout |
-// FIXME: Use union type in drawImage and createPattern once supported: |
-// http://crbug.com/372891 |
typedef (HTMLImageElement or |
HTMLVideoElement or |
- HTMLCanvasElement // or |
+ HTMLCanvasElement or |
// CanvasRenderingContext2D or |
- // ImageBitmap |
- ) CanvasImageSource; |
+ ImageBitmap) CanvasImageSource; |
enum CanvasFillRule { "nonzero", "evenodd" }; |
@@ -71,9 +68,7 @@ enum CanvasFillRule { "nonzero", "evenodd" }; |
[Custom] attribute object fillStyle; // (default black) |
CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1); |
[RaisesException] CanvasGradient createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1); |
- [RaisesException] CanvasPattern createPattern(HTMLCanvasElement canvas, DOMString? repetitionType); |
- [RaisesException] CanvasPattern createPattern(HTMLImageElement image, DOMString? repetitionType); |
- [RaisesException] CanvasPattern createPattern(HTMLVideoElement image, DOMString? repetitionType); |
+ [RaisesException] CanvasPattern createPattern(CanvasImageSource image, DOMString? repetitionType); |
// shadows |
attribute unrestricted float shadowOffsetX; |
@@ -110,18 +105,9 @@ enum CanvasFillRule { "nonzero", "evenodd" }; |
TextMetrics measureText(DOMString text); |
// drawing images |
- [RaisesException] void drawImage(HTMLImageElement image, unrestricted float x, unrestricted float y); |
- [RaisesException] void drawImage(HTMLImageElement image, unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height); |
- [RaisesException] void drawImage(HTMLImageElement image, unrestricted float sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestricted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh); |
- [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted float x, unrestricted float y); |
- [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height); |
- [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted float sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestricted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh); |
- [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float x, unrestricted float y); |
- [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height); |
- [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestricted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh); |
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap imageBitmap, unrestricted float x, unrestricted float y); |
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap imageBitmap, unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height); |
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap imageBitmap, unrestricted float sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestricted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh); |
+ [RaisesException] void drawImage(CanvasImageSource image, unrestricted float x, unrestricted float y); |
+ [RaisesException] void drawImage(CanvasImageSource image, unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height); |
+ [RaisesException] void drawImage(CanvasImageSource image, unrestricted float sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestricted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh); |
// hit regions |
[RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void addHitRegion(optional HitRegionOptions options); |