Bug 632481 - Handle non-finite values for arc per spec; r=peterv
authorMs2ger <ms2ger@gmail.com>
Tue, 12 Apr 2011 14:32:02 +0200
changeset 68021 1310ee06580ed9b702cb8ab4c77fb70c189075a1
parent 68020 2af8fcb04ee692b0c3ba00effc01e2a042c2bbf3
child 68022 b51d625ec239424c56209ebb7ca8965a655bf931
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs632481
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 632481 - Handle non-finite values for arc per spec; r=peterv
content/canvas/src/nsCanvasRenderingContext2D.cpp
content/canvas/test/test_canvas.html
--- a/content/canvas/src/nsCanvasRenderingContext2D.cpp
+++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp
@@ -2153,17 +2153,17 @@ nsCanvasRenderingContext2D::ArcTo(float 
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 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;
+        return NS_OK;
 
     if (r < 0.0)
         return NS_ERROR_DOM_INDEX_SIZE_ERR;
 
     gfxPoint p(x,y);
 
     mHasPath = PR_TRUE;
     if (ccw)
--- a/content/canvas/test/test_canvas.html
+++ b/content/canvas/test/test_canvas.html
@@ -11032,17 +11032,17 @@ ctx.lineTo(0, 50);
 ctx.fillStyle = '#0f0';
 ctx.fill();
 isPixel(ctx, 50,25, 0,255,0,255, 0);
 isPixel(ctx, 90,45, 0,255,0,255, 0);
 
 } catch (e) {
     _thrown_outer = true;
 }
-todo(!_thrown_outer, 'should not throw exception');
+ok(!_thrown_outer, 'should not throw exception');
 
 
 }
 </script>
 
 <!-- [[[ test_2d.path.arc.scale.1.html ]]] -->
 
 <p>Canvas test: 2d.path.arc.scale.1</p>