mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 630034 - Throw when attempting to create a radial gradient with negative radii; r=jmuizelaar
This commit is contained in:
parent
4dfdfe720d
commit
938d8be616
@ -1657,6 +1657,9 @@ nsCanvasRenderingContext2D::CreateRadialGradient(float x0, float y0, float r0, f
|
||||
if (!FloatValidate(x0,y0,r0,x1,y1,r1))
|
||||
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
|
||||
if (r0 < 0.0 || r1 < 0.0)
|
||||
return NS_ERROR_DOM_INDEX_SIZE_ERR;
|
||||
|
||||
nsRefPtr<gfxPattern> gradpat = new gfxPattern(x0, y0, r0, x1, y1, r1);
|
||||
if (!gradpat)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
@ -6647,13 +6647,13 @@ var ctx = canvas.getContext('2d');
|
||||
|
||||
var _thrown = undefined; try {
|
||||
ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1);
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
|
||||
var _thrown = undefined; try {
|
||||
ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1);
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
|
||||
var _thrown = undefined; try {
|
||||
ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1);
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user