summaryrefslogtreecommitdiff
path: root/Source/core/html/canvas/CanvasRenderingContext2D.idl
diff options
context:
space:
mode:
Diffstat (limited to 'Source/core/html/canvas/CanvasRenderingContext2D.idl')
-rw-r--r--Source/core/html/canvas/CanvasRenderingContext2D.idl76
1 files changed, 37 insertions, 39 deletions
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.idl b/Source/core/html/canvas/CanvasRenderingContext2D.idl
index b26de1466..9b2eb5d65 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.idl
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.idl
@@ -69,29 +69,27 @@ interface CanvasRenderingContext2D {
// FIXME: Simplify these using optional CanvasWindingRule once crbug.com/339000 gets fixed.
void fill();
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void fill(Path2D? path);
- void fill(CanvasWindingRule winding);
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void fill(Path2D? path, CanvasWindingRule winding);
+ [RuntimeEnabled=Path2D, StrictTypeChecking] void fill(Path2D path);
+ [StrictTypeChecking] void fill(CanvasWindingRule winding);
+ [RuntimeEnabled=Path2D, StrictTypeChecking] void fill(Path2D path, CanvasWindingRule winding);
void stroke();
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void stroke(Path2D? path);
+ [RuntimeEnabled=Path2D, StrictTypeChecking] void stroke(Path2D path);
// FIXME: Simplify these using optional CanvasWindingRule once crbug.com/339000 gets fixed.
void clip();
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void clip(Path2D? path);
- void clip(CanvasWindingRule winding);
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void clip(Path2D? path, CanvasWindingRule winding);
+ [RuntimeEnabled=Path2D, StrictTypeChecking] void clip(Path2D path);
+ [StrictTypeChecking] void clip(CanvasWindingRule winding);
+ [RuntimeEnabled=Path2D, StrictTypeChecking] void clip(Path2D path, CanvasWindingRule winding);
// FIXME: Simplify these using optional CanvasWindingRule once crbug.com/339000 gets fixed.
boolean isPointInPath(float x, float y);
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] boolean isPointInPath(Path2D? path, float x, float y);
- boolean isPointInPath(float x, float y, CanvasWindingRule winding);
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] boolean isPointInPath(Path2D? path, float x, float y, CanvasWindingRule winding);
-
- // FIXME: Simplify these using optional CanvasWindingRule once crbug.com/339000 gets fixed.
+ [RuntimeEnabled=Path2D, StrictTypeChecking] boolean isPointInPath(Path2D path, float x, float y);
+ [StrictTypeChecking] boolean isPointInPath(float x, float y, CanvasWindingRule winding);
+ [RuntimeEnabled=Path2D, StrictTypeChecking] boolean isPointInPath(Path2D path, float x, float y, CanvasWindingRule winding);
boolean isPointInStroke(float x, float y);
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] boolean isPointInStroke(Path2D? path, float x, float y);
+ [RuntimeEnabled=Path2D, StrictTypeChecking] boolean isPointInStroke(Path2D path, float x, float y);
[RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView();
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void scrollPathIntoView(Path2D? path);
+ [RuntimeEnabled=ExperimentalCanvasFeatures, StrictTypeChecking] void scrollPathIntoView(Path2D path);
// text
attribute DOMString font;
@@ -131,36 +129,36 @@ interface CanvasRenderingContext2D {
void strokeRect(float x, float y, float width, float height);
- [RaisesException] void drawImage(HTMLImageElement? image, float x, float y);
- [RaisesException] void drawImage(HTMLImageElement? image, float x, float y, float width, float height);
- [RaisesException] void drawImage(HTMLImageElement? image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
- [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y);
- [RaisesException] void drawImage(HTMLCanvasElement? canvas, float x, float y, float width, float height);
- [RaisesException] void drawImage(HTMLCanvasElement? canvas, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
- [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y);
- [RaisesException] void drawImage(HTMLVideoElement? video, float x, float y, float width, float height);
- [RaisesException] void drawImage(HTMLVideoElement? video, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap? imageBitmap, float x, float y);
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap? imageBitmap, float x, float y, float width, float height);
- [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(ImageBitmap? imageBitmap, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
-
- void drawImageFromRect(HTMLImageElement image,
- optional float sx, optional float sy, optional float sw, optional float sh,
- optional float dx, optional float dy, optional float dw, optional float dh,
- optional DOMString compositeOperation);
+ [RaisesException, StrictTypeChecking] void drawImage(HTMLImageElement image, float x, float y);
+ [RaisesException, StrictTypeChecking] void drawImage(HTMLImageElement image, float x, float y, float width, float height);
+ [RaisesException, StrictTypeChecking] void drawImage(HTMLImageElement image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
+ [RaisesException, StrictTypeChecking] void drawImage(HTMLCanvasElement canvas, float x, float y);
+ [RaisesException, StrictTypeChecking] void drawImage(HTMLCanvasElement canvas, float x, float y, float width, float height);
+ [RaisesException, StrictTypeChecking] void drawImage(HTMLCanvasElement canvas, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
+ [RaisesException, StrictTypeChecking] void drawImage(HTMLVideoElement video, float x, float y);
+ [RaisesException, StrictTypeChecking] void drawImage(HTMLVideoElement video, float x, float y, float width, float height);
+ [RaisesException, StrictTypeChecking] void drawImage(HTMLVideoElement video, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
+ [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException, StrictTypeChecking] void drawImage(ImageBitmap imageBitmap, float x, float y);
+ [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException, StrictTypeChecking] void drawImage(ImageBitmap imageBitmap, float x, float y, float width, float height);
+ [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException, StrictTypeChecking] void drawImage(ImageBitmap imageBitmap, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
+
+ [StrictTypeChecking] void drawImageFromRect(HTMLImageElement? image,
+ optional float sx, optional float sy, optional float sw, optional float sh,
+ optional float dx, optional float dy, optional float dw, optional float dh,
+ optional DOMString compositeOperation);
void setShadow(float width, float height, float blur, [StrictTypeChecking] optional DOMString color, optional float alpha);
void setShadow(float width, float height, float blur, float grayLevel, optional float alpha);
void setShadow(float width, float height, float blur, float r, float g, float b, float a);
void setShadow(float width, float height, float blur, float c, float m, float y, float k, float a);
- [RaisesException] void putImageData(ImageData? imagedata, float dx, float dy);
- [RaisesException] void putImageData(ImageData? imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
+ [RaisesException, StrictTypeChecking] void putImageData(ImageData imagedata, float dx, float dy);
+ [RaisesException, StrictTypeChecking] void putImageData(ImageData imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
- [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] ImageData createImageData(ImageData? imagedata);
+ [RaisesException, StrictTypeChecking] CanvasPattern createPattern(HTMLCanvasElement canvas, [TreatNullAs=NullString] DOMString repetitionType);
+ [RaisesException, StrictTypeChecking] CanvasPattern createPattern(HTMLImageElement image, [TreatNullAs=NullString] DOMString repetitionType);
+ [RaisesException, StrictTypeChecking] CanvasPattern createPattern(HTMLVideoElement image, [TreatNullAs=NullString] DOMString repetitionType);
+ [StrictTypeChecking] ImageData createImageData(ImageData imagedata);
[RaisesException] ImageData createImageData(float sw, float sh);
[Custom] attribute object strokeStyle;
@@ -170,8 +168,8 @@ interface CanvasRenderingContext2D {
[RaisesException] ImageData getImageData(float sx, float sy, float sw, float sh);
// Focus rings
- [RuntimeEnabled=ExperimentalCanvasFeatures] void drawFocusIfNeeded(Element element);
- [RuntimeEnabled=ExperimentalCanvasFeatures] boolean drawCustomFocusRing(Element element);
+ [RuntimeEnabled=ExperimentalCanvasFeatures, StrictTypeChecking] void drawFocusIfNeeded(Element element);
+ [RuntimeEnabled=ExperimentalCanvasFeatures, StrictTypeChecking] boolean drawCustomFocusRing(Element element);
[ImplementedAs=imageSmoothingEnabled, MeasureAs=PrefixedImageSmoothingEnabled] attribute boolean webkitImageSmoothingEnabled;
[MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothingEnabled;