Bug 1582196 part 2. Stop using NS_ERROR_RANGE_ERR in SVGTransform. r=jwatt

Differential Revision: https://phabricator.services.mozilla.com/D46460

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Boris Zbarsky 2019-09-19 13:13:58 +00:00
Родитель ccc114b512
Коммит e2d4045ce1
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -98,7 +98,8 @@ void SVGTransform::SetRotate(float aAngle, float aCx, float aCy) {
nsresult SVGTransform::SetSkewX(float aAngle) {
double ta = tan(aAngle * kRadPerDegree);
NS_ENSURE_FINITE(ta, NS_ERROR_RANGE_ERR);
// No one actually cares about the exact error return type here.
NS_ENSURE_FINITE(ta, NS_ERROR_INVALID_ARG);
mType = SVG_TRANSFORM_SKEWX;
mMatrix = gfxMatrix();
@ -111,7 +112,8 @@ nsresult SVGTransform::SetSkewX(float aAngle) {
nsresult SVGTransform::SetSkewY(float aAngle) {
double ta = tan(aAngle * kRadPerDegree);
NS_ENSURE_FINITE(ta, NS_ERROR_RANGE_ERR);
// No one actually cares about the exact error return type here.
NS_ENSURE_FINITE(ta, NS_ERROR_INVALID_ARG);
mType = SVG_TRANSFORM_SKEWY;
mMatrix = gfxMatrix();