Bug 632516 - Handle non-finite values for translate per spec; r=roc
authorMs2ger <ms2ger@gmail.com>
Fri, 01 Apr 2011 15:31:35 -0400
changeset 64641 c4e4c4b34e5b26b3b3b286e2dab855a28c75382e
parent 64640 374e4416ded5c74990271543feef84d40b0e556c
child 64642 8818a79c297db7dbc3cbb8d0f8b9a45e8083ce74
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
bugs632516
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 632516 - Handle non-finite values for translate 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
@@ -1425,17 +1425,17 @@ nsCanvasRenderingContext2D::Rotate(float
     mThebes->Rotate(angle);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2D::Translate(float x, float y)
 {
     if (!FloatValidate(x,y))
-        return NS_ERROR_DOM_SYNTAX_ERR;
+        return NS_OK;
 
     mThebes->Translate(gfxPoint(x, y));
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2D::Transform(float m11, float m12, float m21, float m22, float dx, float dy)
 {
--- a/content/canvas/test/test_canvas.html
+++ b/content/canvas/test/test_canvas.html
@@ -19025,17 +19025,17 @@ ctx.translate(Infinity, Infinity);
 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.type.exists.html ]]] -->
 
 <p>Canvas test: 2d.type.exists</p>