enum CanvasFillRule { "nonzero", "evenodd" };
[
- TypeChecking=Interface|Nullable|Unrestricted,
+ TypeChecking=Interface|Unrestricted,
WillBeGarbageCollected,
] interface CanvasRenderingContext2D {
// back-reference to the canvas
[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, [TreatNullAs=NullString] DOMString repetitionType);
- [RaisesException] CanvasPattern createPattern(HTMLImageElement image, [TreatNullAs=NullString] DOMString repetitionType);
- [RaisesException] CanvasPattern createPattern(HTMLVideoElement image, [TreatNullAs=NullString] DOMString repetitionType);
+ [RaisesException] CanvasPattern createPattern(HTMLCanvasElement canvas, DOMString? repetitionType);
+ [RaisesException] CanvasPattern createPattern(HTMLImageElement image, DOMString? repetitionType);
+ [RaisesException] CanvasPattern createPattern(HTMLVideoElement image, DOMString? repetitionType);
// shadows
attribute unrestricted float shadowOffsetX;
[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);
+ // hit regions
+ // FIXME: Blink does not currently support WebIDL dictionary definitions.
+ // See http://crbug.com/321462
+ [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void addHitRegion(optional Dictionary options);
+ [RuntimeEnabled=ExperimentalCanvasFeatures] void removeHitRegion(DOMString id);
+ [RuntimeEnabled=ExperimentalCanvasFeatures] void clearHitRegions();
+
// pixel manipulation
ImageData createImageData(ImageData imagedata);
[RaisesException] ImageData createImageData(float sw, float sh);