Bug 473347. nsSVGLength2 DOM tearoffs need to check for infinity/NaN. r=jwatt,sr=roc

--HG--
extra : rebase_source : 5af871d159a32c86e31f0c6aaa2ca25e88f4d928
This commit is contained in:
Craig Topper 2009-01-16 21:16:06 +13:00
parent 7da71decb2
commit d38bddc845

View File

@ -149,13 +149,20 @@ private:
NS_IMETHOD GetValue(float* aResult)
{ *aResult = mVal->GetBaseValue(mSVGElement); return NS_OK; }
NS_IMETHOD SetValue(float aValue)
{ mVal->SetBaseValue(aValue, mSVGElement); return NS_OK; }
{
NS_ENSURE_FINITE(aValue, NS_ERROR_ILLEGAL_VALUE);
mVal->SetBaseValue(aValue, mSVGElement);
return NS_OK;
}
NS_IMETHOD GetValueInSpecifiedUnits(float* aResult)
{ *aResult = mVal->mBaseVal; return NS_OK; }
NS_IMETHOD SetValueInSpecifiedUnits(float aValue)
{ mVal->SetBaseValueInSpecifiedUnits(aValue, mSVGElement);
return NS_OK; }
{
NS_ENSURE_FINITE(aValue, NS_ERROR_ILLEGAL_VALUE);
mVal->SetBaseValueInSpecifiedUnits(aValue, mSVGElement);
return NS_OK;
}
NS_IMETHOD SetValueAsString(const nsAString& aValue)
{ return mVal->SetBaseValueString(aValue, mSVGElement, PR_TRUE); }
@ -164,7 +171,9 @@ private:
NS_IMETHOD NewValueSpecifiedUnits(PRUint16 unitType,
float valueInSpecifiedUnits)
{ mVal->NewValueSpecifiedUnits(unitType, valueInSpecifiedUnits,
{
NS_ENSURE_FINITE(valueInSpecifiedUnits, NS_ERROR_ILLEGAL_VALUE);
mVal->NewValueSpecifiedUnits(unitType, valueInSpecifiedUnits,
mSVGElement);
return NS_OK; }