Chromium Code Reviews| 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); |
|
Jens Widell
2014/11/05 13:18:36
I'm adding support for an ImageBitmap argument to
Justin Novosad
2014/11/05 20:40:52
Better add layout test coverage for this.
Jens Widell
2014/11/06 11:44:40
Done.
Beware I'm a complete noob when it comes to
|
| // 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); |
|
Jens Widell
2014/11/05 13:18:36
We're losing the runtime enabledness of ImageBitma
Justin Novosad
2014/11/05 20:40:52
2) is tricky. We had something similar in the past
Jens Widell
2014/11/06 11:44:40
Yes. In fact, currently I believe 2 would expose t
|
| - [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); |