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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.idl

Issue 337343002: IDL: make optional arguments (without default) explicit sometimes Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-default-arguments-next
Patch Set: Created 6 years, 4 months 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: Source/core/html/canvas/CanvasRenderingContext2D.idl
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.idl b/Source/core/html/canvas/CanvasRenderingContext2D.idl
index 4afeef78f46345b5c644a8a315debe6d7c892109..130a6dbfe04449f1b5b0bad1c6ec73af35bdc16a 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.idl
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.idl
@@ -88,8 +88,8 @@ enum CanvasFillRule { "nonzero", "evenodd" };
// path API (see also CanvasPathMethods)
void beginPath();
- void fill(optional CanvasFillRule winding);
- [RuntimeEnabled=Path2D] void fill(Path2D path, optional CanvasFillRule winding);
+ void fill(optional CanvasFillRule fillRule = "nonzero");
+ [RuntimeEnabled=Path2D] void fill(Path2D path, optional CanvasFillRule fillRule = "nonzero");
void stroke();
[RuntimeEnabled=Path2D] void stroke(Path2D path);
// Focus rings
@@ -97,10 +97,10 @@ enum CanvasFillRule { "nonzero", "evenodd" };
[RuntimeEnabled=Path2D] void drawFocusIfNeeded(Path2D path, Element element);
[RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView(optional Path2D path);
- void clip(optional CanvasFillRule winding);
- [RuntimeEnabled=Path2D] void clip(Path2D path, optional CanvasFillRule winding);
- boolean isPointInPath(unrestricted float x, unrestricted float y, optional CanvasFillRule winding);
- [RuntimeEnabled=Path2D] boolean isPointInPath(Path2D path, unrestricted float x, unrestricted float y, optional CanvasFillRule winding);
+ void clip(optional CanvasFillRule fillRule = "nonzero");
+ [RuntimeEnabled=Path2D] void clip(Path2D path, optional CanvasFillRule fillRule = "nonzero");
+ boolean isPointInPath(unrestricted float x, unrestricted float y, optional CanvasFillRule fillRule = "nonzero");
+ [RuntimeEnabled=Path2D] boolean isPointInPath(Path2D path, unrestricted float x, unrestricted float y, optional CanvasFillRule fillRule = "nonzero");
boolean isPointInStroke(unrestricted float x, unrestricted float y);
[RuntimeEnabled=Path2D] boolean isPointInStroke(Path2D path, unrestricted float x, unrestricted float y);
@@ -170,18 +170,18 @@ enum CanvasFillRule { "nonzero", "evenodd" };
[MeasureAs=CanvasRenderingContext2DSetMiterLimit] void setMiterLimit(unrestricted float limit);
[MeasureAs=CanvasRenderingContext2DClearShadow] void clearShadow();
[MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(DOMString color, optional unrestricted float alpha);
- [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unrestricted float grayLevel, optional unrestricted float alpha);
+ [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unrestricted float grayLevel, optional unrestricted float alpha = 1.0);
[MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unrestricted float r, unrestricted float g, unrestricted float b, unrestricted float a);
[MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unrestricted float c, unrestricted float m, unrestricted float y, unrestricted float k, unrestricted float a);
[MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(DOMString color, optional unrestricted float alpha);
- [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestricted float grayLevel, optional unrestricted float alpha);
+ [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestricted float grayLevel, optional unrestricted float alpha = 1.0);
[MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestricted float r, unrestricted float g, unrestricted float b, unrestricted float a);
[MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestricted float c, unrestricted float m, unrestricted float y, unrestricted float k, unrestricted float a);
[MeasureAs=CanvasRenderingContext2DDrawImageFromRect] void drawImageFromRect(
HTMLImageElement? image, optional unrestricted float sx, optional unrestricted float sy, optional unrestricted float sw, optional unrestricted float sh,
optional unrestricted float dx, optional unrestricted float dy, optional unrestricted float dw, optional unrestricted float dh, optional DOMString compositeOperation);
[MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, optional DOMString color, optional unrestricted float alpha);
- [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, unrestricted float grayLevel, optional unrestricted float alpha);
+ [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, unrestricted float grayLevel, optional unrestricted float alpha = 1.0);
[MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, unrestricted float r, unrestricted float g, unrestricted float b, unrestricted float a);
[MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, unrestricted float c, unrestricted float m, unrestricted float y, unrestricted float k, unrestricted float a);
};
« no previous file with comments | « Source/core/html/canvas/CanvasRenderingContext2D.cpp ('k') | Source/core/html/canvas/OESVertexArrayObject.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698