Bug 784869. Stop allowing undefined as the second argument to createPattern in the WebIDL 2d context bindings. r=peterv

This commit is contained in:
Boris Zbarsky 2012-08-28 13:10:10 -04:00
parent 95d002889d
commit cf2ea39a29
2 changed files with 2 additions and 5 deletions

View File

@ -16125,12 +16125,9 @@ function test_2d_pattern_repeat_undefined() {
var canvas = document.getElementById('c496');
var ctx = canvas.getContext('2d');
var undefinedHandler = IsAzureEnabled() ? todo : ok;
var _thrown = undefined; try {
ctx.createPattern(canvas, undefined);
// XXXbz TODO fix bug 784869
} catch (e) { _thrown = e }; undefinedHandler(_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");
}

View File

@ -55,7 +55,7 @@ interface CanvasRenderingContext2D {
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, [TreatNullAs=EmptyString] DOMString repetition);
// shadows
[Infallible]