Back out b88ccf7bd3e3 for Linux test_canvas.html failures on a CLOSED TREE
authorMatt Brubeck <mbrubeck@mozilla.com>
Thu, 23 Aug 2012 14:08:42 -0700
changeset 105254 2266e0721327c9e7873bf4b40d67459e5c639951
parent 105253 ecd18a2ed3ef0b67bdbc72445f7dd70021a6645e
child 105255 f49728317fad7ec0566200749b64fceca592b5c8
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
milestone17.0a1
backs outb88ccf7bd3e32478fc8c26d2cb7631a53a21dbcb
Back out b88ccf7bd3e3 for Linux test_canvas.html failures on a CLOSED TREE
content/canvas/test/test_canvas.html
dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl
dom/webidl/CanvasRenderingContext2D.webidl
--- a/content/canvas/test/test_canvas.html
+++ b/content/canvas/test/test_canvas.html
@@ -16073,27 +16073,19 @@ isPixel(ctx, 98,48, 0,255,0,255, 0);
 <script>
 
 
 function test_2d_pattern_repeat_null() {
 
 var canvas = document.getElementById('c494');
 var ctx = canvas.getContext('2d');
 
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-var img = document.getElementById('green-1x1_2.png');
-var pattern = ctx.createPattern(img, null);
-ctx.fillStyle = pattern;
-ctx.fillRect(0, 0, 100, 50);
-
-isPixel(ctx, 1,1, 0,255,0,255, 0);
-isPixel(ctx, 98,1, 0,255,0,255, 0);
-isPixel(ctx, 1,48, 0,255,0,255, 0);
-isPixel(ctx, 98,48, 0,255,0,255, 0);
+var _thrown = undefined; try {
+  ctx.createPattern(canvas, null);
+} catch (e) { _thrown = e }; ok(_thrown && _thrown.name == "SyntaxError" && _thrown.code == DOMException.SYNTAX_ERR, "should throw SyntaxError");
 
 
 }
 </script>
 <img src="image_green-1x1.png" id="green-1x1_2.png" class="resource">
 
 <!-- [[[ test_2d.pattern.repeat.nullsuffix.html ]]] -->
 
@@ -16122,18 +16114,17 @@ var _thrown = undefined; try {
 
 function test_2d_pattern_repeat_undefined() {
 
 var canvas = document.getElementById('c496');
 var ctx = canvas.getContext('2d');
 
 var _thrown = undefined; try {
   ctx.createPattern(canvas, undefined);
-  // XXXbz TODO fix bug 784869
-} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "SyntaxError" && _thrown.code == DOMException.SYNTAX_ERR, "should throw SyntaxError");
+} catch (e) { _thrown = e }; ok(_thrown && _thrown.name == "SyntaxError" && _thrown.code == DOMException.SYNTAX_ERR, "should throw SyntaxError");
 
 
 }
 </script>
 
 <!-- [[[ test_2d.pattern.repeat.unrecognised.html ]]] -->
 
 <p>Canvas test: 2d.pattern.repeat.unrecognised</p>
--- a/dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl
+++ b/dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl
@@ -88,17 +88,17 @@ enum CanvasMultiGetterType {
   [noscript] void setFillStyle_multi(in DOMString str, in nsISupports iface);
   [noscript] void getFillStyle_multi(out DOMString str, out nsISupports iface, out long type);
 
   //attribute DOMString fillRule;
   attribute DOMString mozFillRule; /* "evenodd", "nonzero" (default) */
 
   nsIDOMCanvasGradient createLinearGradient (in float x0, in float y0, in float x1, in float y1);
   nsIDOMCanvasGradient createRadialGradient(in float x0, in float y0, in float r0, in float x1, in float y1, in float r1);
-  nsIDOMCanvasPattern createPattern(in nsIDOMHTMLElement image, in DOMString repetition);
+  nsIDOMCanvasPattern createPattern(in nsIDOMHTMLElement image, [Null(Stringify)] in DOMString repetition);
   attribute float lineWidth; /* default 1 */
   [binaryname(MozLineCap)]
   attribute DOMString lineCap; /* "butt", "round", "square" (default) */
   [binaryname(MozLineJoin)]
   attribute DOMString lineJoin; /* "round", "bevel", "miter" (default) */
   attribute float miterLimit; /* default 10 */
 
   [implicit_jscontext]
--- a/dom/webidl/CanvasRenderingContext2D.webidl
+++ b/dom/webidl/CanvasRenderingContext2D.webidl
@@ -50,17 +50,17 @@ interface CanvasRenderingContext2D {
 
   // colors and styles (see also the CanvasDrawingStyles interface)
            [SetterInfallible]
            attribute any strokeStyle; // (default black)
            [SetterInfallible]
            attribute any fillStyle; // (default black)
   CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
   CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
-  CanvasPattern createPattern((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, DOMString? repetition);
+  CanvasPattern createPattern((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, DOMString repetition);
 
   // shadows
            [Infallible]
            attribute double shadowOffsetX; // (default 0)
            [Infallible]
            attribute double shadowOffsetY; // (default 0)
            [Infallible]
            attribute double shadowBlur; // (default 0)