Bug 664107 - Calling drawImage with non-finite arguments should not throw; r=smaug

This commit is contained in:
Ms2ger 2011-06-15 09:39:50 +02:00
parent 01bb0e3457
commit 86f87e082b
2 changed files with 2 additions and 2 deletions

View File

@ -3388,7 +3388,7 @@ nsCanvasRenderingContext2D::DrawImage(nsIDOMElement *imgElt, float a1,
// (!FloatValidate(sx, sy, sw, sh) || !FloatValidate(dx, dy, dw, dh))
// but we would also need to validate some sums for overflow (e.g. sx + sw).
if (!FloatValidate(sx + sw, sy + sh, dx + dw, dy + dh)) {
return NS_ERROR_DOM_SYNTAX_ERR;
return NS_OK;
}
// Handle negative sw, sh, dw and dh by flipping the rectangle over in the

View File

@ -3452,7 +3452,7 @@ 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');
}