Bug 632513 - Handle non-finite values for setTransform per spec; r=jst
authorMs2ger <ms2ger@gmail.com>
Thu, 26 May 2011 10:06:32 +0200
changeset 70711 1eecfca39692272a3dc2ffd76e364691bf6bd0c0
parent 70710 8cd53bb0ee7f6ea085231a1f8f5595eafdd9710f
child 70712 08d91c51adb5427d7bc1553c506241f8ebbc988f
push id159
push usereakhgari@mozilla.com
push dateTue, 16 Aug 2011 17:53:11 +0000
treeherdermozilla-beta@8786e3e49240 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst
bugs632513
milestone7.0a1
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 632513 - Handle non-finite values for setTransform per spec; r=jst
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::Transform(fl
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2D::SetTransform(float m11, float m12, float m21, float m22, float dx, float dy)
 {
     if (!FloatValidate(m11,m12,m21,m22,dx,dy))
-        return NS_ERROR_DOM_SYNTAX_ERR;
+        return NS_OK;
 
     gfxMatrix matrix(m11, m12, m21, m22, dx, dy);
     mThebes->SetMatrix(matrix);
 
     return NS_OK;
 }
 
 //
--- a/content/canvas/test/test_canvas.html
+++ b/content/canvas/test/test_canvas.html
@@ -18990,17 +18990,17 @@ ctx.setTransform(0, 0, 0, 0, Infinity, I
 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.setTransform.skewed.html ]]] -->
 
 <p>Canvas test: 2d.transformation.setTransform.skewed</p>