Bug 617319 - HTML5 canvas 2d context arc() method requires a parameter that should be optional - r=vladimir, a=joe
authorBenoit Jacob <bjacob@mozilla.com>
Wed, 08 Dec 2010 10:56:01 -0500
changeset 58916 78ff8d5339c3982ca0fd3be4fadc3417d6e039d9
parent 58915 d3d71ad68624097bab58584ed575d3338a84a165
child 58917 04d3958be7431bcad559270f3ed99de6f6c3f142
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersvladimir, joe
bugs617319
milestone2.0b8pre
Bug 617319 - HTML5 canvas 2d context arc() method requires a parameter that should be optional - r=vladimir, a=joe
content/canvas/src/nsCanvasRenderingContext2D.cpp
dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl
--- a/content/canvas/src/nsCanvasRenderingContext2D.cpp
+++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp
@@ -2123,17 +2123,17 @@ nsCanvasRenderingContext2D::ArcTo(float 
         mThebes->NegativeArc(gfxPoint(cx, cy), radius, angle0, angle1);
     else
         mThebes->Arc(gfxPoint(cx, cy), radius, angle0, angle1);
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
-nsCanvasRenderingContext2D::Arc(float x, float y, float r, float startAngle, float endAngle, int ccw)
+nsCanvasRenderingContext2D::Arc(float x, float y, float r, float startAngle, float endAngle, PRBool ccw)
 {
     if (!FloatValidate(x,y,r,startAngle,endAngle))
         return NS_ERROR_DOM_SYNTAX_ERR;
 
     gfxPoint p(x,y);
 
     if (ccw)
         mThebes->NegativeArc(p, r, startAngle, endAngle);
--- a/dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl
+++ b/dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl
@@ -129,17 +129,17 @@ enum CanvasMultiGetterType {
   void beginPath();
   void closePath();
 
   void moveTo(in float x, in float y);
   void lineTo(in float x, in float y);
   void quadraticCurveTo(in float cpx, in float cpy, in float x, in float y);
   void bezierCurveTo(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y);
   void arcTo(in float x1, in float y1, in float x2, in float y2, in float radius);
-  void arc(in float x, in float y, in float r, in float startAngle, in float endAngle, in boolean clockwise);
+  void arc(in float x, in float y, in float r, in float startAngle, in float endAngle, [optional] in boolean anticlockwise);
   void rect(in float x, in float y, in float w, in float h);
 
   void fill();
   void stroke();
   void clip();
 
   // text api
   attribute DOMString font; /* default "10px sans-serif" */