Bug 632508 - Handle non-finite values for rotate per spec; r=roc
authorMs2ger <ms2ger@gmail.com>
Wed, 30 Mar 2011 13:40:48 -0400
changeset 64490 70109cd4c0a649b62a7339996de2054b2294fe40
parent 64489 19801c253501ce4c455abf7373fd92c486d86544
child 64491 d6e01d649ddc4a1784b389a6af1803859b41d5e1
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)
reviewersroc
bugs632508
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 632508 - Handle non-finite values for rotate per spec; r=roc
content/canvas/src/nsCanvasRenderingContext2D.cpp
content/canvas/test/test_canvas.html
--- a/content/canvas/src/nsCanvasRenderingContext2D.cpp
+++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp
@@ -1413,17 +1413,17 @@ nsCanvasRenderingContext2D::Scale(float 
     mThebes->Scale(x, y);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2D::Rotate(float angle)
 {
     if (!FloatValidate(angle))
-        return NS_ERROR_DOM_SYNTAX_ERR;
+        return NS_OK;
 
     mThebes->Rotate(angle);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2D::Translate(float x, float y)
 {
--- a/content/canvas/test/test_canvas.html
+++ b/content/canvas/test/test_canvas.html
@@ -18275,17 +18275,17 @@ ctx.rotate(NaN);
 ctx.fillStyle = '#0f0';
 ctx.fillRect(-100, -10, 100, 50);
 
 isPixel(ctx, 50,25, 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.transformation.rotate.radians.html ]]] -->
 
 <p>Canvas test: 2d.transformation.rotate.radians</p>