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
Родитель e995340e17
Коммит cbe7d3817f
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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

Просмотреть файл

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