зеркало из https://github.com/mozilla/gecko-dev.git
Bug 369418. Prevent script from injecting floating point infinity or NaN values into C++ land through DOM interfaces. r+sr=roc@ocallahan.org, a=blocking1.9
This commit is contained in:
Родитель
39147e5827
Коммит
8c03434cbd
|
@ -63,5 +63,14 @@ ifdef ENABLE_TESTS
|
|||
TOOL_DIRS += test
|
||||
endif
|
||||
|
||||
# Prevent floating point errors caused by VC++ optimizations
|
||||
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
|
||||
ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
|
||||
CFLAGS += -Op
|
||||
else
|
||||
CFLAGS += -fp:precise
|
||||
endif
|
||||
endif # WINNT
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#define nsContentUtils_h___
|
||||
|
||||
#include "jspubtd.h"
|
||||
#include "jsnum.h"
|
||||
#include "nsAString.h"
|
||||
#include "nsIStatefulFrame.h"
|
||||
#include "nsIPref.h"
|
||||
|
@ -1395,4 +1396,57 @@ public:
|
|||
} \
|
||||
} else
|
||||
|
||||
/*
|
||||
* Check whether a floating point number is finite (not +/-infinity and not a
|
||||
* NaN value). We wrap JSDOUBLE_IS_FINITE in a function because it expects to
|
||||
* take the address of its argument, and because the argument must be of type
|
||||
* jsdouble to have the right size and layout of bits.
|
||||
*
|
||||
* Note: we could try to exploit the fact that |infinity - infinity == NaN|
|
||||
* instead of using JSDOUBLE_IS_FINITE. This would produce more compact code
|
||||
* and perform better by avoiding type conversions and bit twiddling.
|
||||
* Unfortunately, some architectures don't guarantee that |f == f| evaluates
|
||||
* to true (where f is any *finite* floating point number). See
|
||||
* https://bugzilla.mozilla.org/show_bug.cgi?id=369418#c63 . To play it safe
|
||||
* for gecko 1.9, we just reuse JSDOUBLE_IS_FINITE.
|
||||
*/
|
||||
inline NS_HIDDEN_(PRBool) NS_FloatIsFinite(jsdouble f) {
|
||||
return JSDOUBLE_IS_FINITE(f);
|
||||
}
|
||||
|
||||
/*
|
||||
* In the following helper macros we exploit the fact that the result of a
|
||||
* series of additions will not be finite if any one of the operands in the
|
||||
* series is not finite.
|
||||
*/
|
||||
#define NS_ENSURE_FINITE(f, rv) \
|
||||
if (!NS_FloatIsFinite(f)) { \
|
||||
return (rv); \
|
||||
}
|
||||
|
||||
#define NS_ENSURE_FINITE2(f1, f2, rv) \
|
||||
if (!NS_FloatIsFinite((f1)+(f2))) { \
|
||||
return (rv); \
|
||||
}
|
||||
|
||||
#define NS_ENSURE_FINITE3(f1, f2, f3, rv) \
|
||||
if (!NS_FloatIsFinite((f1)+(f2)+(f3))) { \
|
||||
return (rv); \
|
||||
}
|
||||
|
||||
#define NS_ENSURE_FINITE4(f1, f2, f3, f4, rv) \
|
||||
if (!NS_FloatIsFinite((f1)+(f2)+(f3)+(f4))) { \
|
||||
return (rv); \
|
||||
}
|
||||
|
||||
#define NS_ENSURE_FINITE5(f1, f2, f3, f4, f5, rv) \
|
||||
if (!NS_FloatIsFinite((f1)+(f2)+(f3)+(f4)+(f5))) { \
|
||||
return (rv); \
|
||||
}
|
||||
|
||||
#define NS_ENSURE_FINITE6(f1, f2, f3, f4, f5, f6, rv) \
|
||||
if (!NS_FloatIsFinite((f1)+(f2)+(f3)+(f4)+(f5)+(f6))) { \
|
||||
return (rv); \
|
||||
}
|
||||
|
||||
#endif /* nsContentUtils_h___ */
|
||||
|
|
|
@ -53,12 +53,20 @@ public:
|
|||
NS_IMETHOD GetValue(float* aResult)
|
||||
{ *aResult = mVal.GetBaseValue(); return NS_OK; }
|
||||
NS_IMETHOD SetValue(float aValue)
|
||||
{ mVal.SetBaseValue(aValue, nsnull); return NS_OK; }
|
||||
{
|
||||
NS_ENSURE_FINITE(aValue, NS_ERROR_ILLEGAL_VALUE);
|
||||
mVal.SetBaseValue(aValue, nsnull);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD GetValueInSpecifiedUnits(float* aResult)
|
||||
{ *aResult = mVal.mBaseVal; return NS_OK; }
|
||||
NS_IMETHOD SetValueInSpecifiedUnits(float aValue)
|
||||
{ mVal.mBaseVal = aValue; return NS_OK; }
|
||||
{
|
||||
NS_ENSURE_FINITE(aValue, NS_ERROR_ILLEGAL_VALUE);
|
||||
mVal.mBaseVal = aValue;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD SetValueAsString(const nsAString& aValue)
|
||||
{ return mVal.SetBaseValueString(aValue, nsnull, PR_FALSE); }
|
||||
|
@ -67,8 +75,11 @@ public:
|
|||
|
||||
NS_IMETHOD NewValueSpecifiedUnits(PRUint16 unitType,
|
||||
float valueInSpecifiedUnits)
|
||||
{ mVal.NewValueSpecifiedUnits(unitType, valueInSpecifiedUnits, nsnull);
|
||||
return NS_OK; }
|
||||
{
|
||||
NS_ENSURE_FINITE(valueInSpecifiedUnits, NS_ERROR_ILLEGAL_VALUE);
|
||||
mVal.NewValueSpecifiedUnits(unitType, valueInSpecifiedUnits, nsnull);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD ConvertToSpecifiedUnits(PRUint16 unitType)
|
||||
{ mVal.ConvertToSpecifiedUnits(unitType, nsnull); return NS_OK; }
|
||||
|
|
|
@ -664,6 +664,7 @@ NS_IMETHODIMP nsSVGFEGaussianBlurElement::GetStdDeviationY(nsIDOMSVGAnimatedNumb
|
|||
NS_IMETHODIMP
|
||||
nsSVGFEGaussianBlurElement::SetStdDeviation(float stdDeviationX, float stdDeviationY)
|
||||
{
|
||||
NS_ENSURE_FINITE2(stdDeviationX, stdDeviationY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mNumberAttributes[STD_DEV_X].SetBaseValue(stdDeviationX, this, PR_TRUE);
|
||||
mNumberAttributes[STD_DEV_Y].SetBaseValue(stdDeviationY, this, PR_TRUE);
|
||||
return NS_OK;
|
||||
|
@ -1669,6 +1670,7 @@ NS_IMETHODIMP nsSVGFECompositeElement::GetK4(nsIDOMSVGAnimatedNumber * *aK4)
|
|||
NS_IMETHODIMP
|
||||
nsSVGFECompositeElement::SetK(float k1, float k2, float k3, float k4)
|
||||
{
|
||||
NS_ENSURE_FINITE4(k1, k2, k3, k4, NS_ERROR_ILLEGAL_VALUE);
|
||||
mNumberAttributes[K1].SetBaseValue(k1, this, PR_TRUE);
|
||||
mNumberAttributes[K2].SetBaseValue(k2, this, PR_TRUE);
|
||||
mNumberAttributes[K3].SetBaseValue(k3, this, PR_TRUE);
|
||||
|
@ -3773,6 +3775,7 @@ NS_IMETHODIMP nsSVGFEMorphologyElement::GetRadiusY(nsIDOMSVGAnimatedNumber * *aY
|
|||
NS_IMETHODIMP
|
||||
nsSVGFEMorphologyElement::SetRadius(float rx, float ry)
|
||||
{
|
||||
NS_ENSURE_FINITE2(rx, ry, NS_ERROR_ILLEGAL_VALUE);
|
||||
mNumberAttributes[RADIUS_X].SetBaseValue(rx, this, PR_TRUE);
|
||||
mNumberAttributes[RADIUS_Y].SetBaseValue(ry, this, PR_TRUE);
|
||||
return NS_OK;
|
||||
|
|
|
@ -273,6 +273,8 @@ nsSVGLength::GetValue(float *aValue)
|
|||
NS_IMETHODIMP
|
||||
nsSVGLength::SetValue(float aValue)
|
||||
{
|
||||
NS_ENSURE_FINITE(aValue, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
WillModify();
|
||||
|
@ -329,6 +331,7 @@ nsSVGLength::GetValueInSpecifiedUnits(float *aValueInSpecifiedUnits)
|
|||
NS_IMETHODIMP
|
||||
nsSVGLength::SetValueInSpecifiedUnits(float aValueInSpecifiedUnits)
|
||||
{
|
||||
NS_ENSURE_FINITE(aValueInSpecifiedUnits, NS_ERROR_ILLEGAL_VALUE);
|
||||
WillModify();
|
||||
mValueInSpecifiedUnits = aValueInSpecifiedUnits;
|
||||
DidModify();
|
||||
|
@ -456,6 +459,8 @@ nsSVGLength::SetValueAsString(const nsAString & aValueAsString)
|
|||
NS_IMETHODIMP
|
||||
nsSVGLength::NewValueSpecifiedUnits(PRUint16 unitType, float valueInSpecifiedUnits)
|
||||
{
|
||||
NS_ENSURE_FINITE(valueInSpecifiedUnits, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
if (!IsValidUnitType(unitType))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
|
|
|
@ -115,6 +115,7 @@ NS_IMETHODIMP nsSVGMatrix::GetA(float *aA)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGMatrix::SetA(float aA)
|
||||
{
|
||||
NS_ENSURE_FINITE(aA, NS_ERROR_ILLEGAL_VALUE);
|
||||
WillModify();
|
||||
mA = aA;
|
||||
DidModify();
|
||||
|
@ -129,6 +130,7 @@ NS_IMETHODIMP nsSVGMatrix::GetB(float *aB)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGMatrix::SetB(float aB)
|
||||
{
|
||||
NS_ENSURE_FINITE(aB, NS_ERROR_ILLEGAL_VALUE);
|
||||
WillModify();
|
||||
mB = aB;
|
||||
DidModify();
|
||||
|
@ -143,6 +145,7 @@ NS_IMETHODIMP nsSVGMatrix::GetC(float *aC)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGMatrix::SetC(float aC)
|
||||
{
|
||||
NS_ENSURE_FINITE(aC, NS_ERROR_ILLEGAL_VALUE);
|
||||
WillModify();
|
||||
mC = aC;
|
||||
DidModify();
|
||||
|
@ -157,6 +160,7 @@ NS_IMETHODIMP nsSVGMatrix::GetD(float *aD)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGMatrix::SetD(float aD)
|
||||
{
|
||||
NS_ENSURE_FINITE(aD, NS_ERROR_ILLEGAL_VALUE);
|
||||
WillModify();
|
||||
mD = aD;
|
||||
DidModify();
|
||||
|
@ -171,6 +175,7 @@ NS_IMETHODIMP nsSVGMatrix::GetE(float *aE)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGMatrix::SetE(float aE)
|
||||
{
|
||||
NS_ENSURE_FINITE(aE, NS_ERROR_ILLEGAL_VALUE);
|
||||
WillModify();
|
||||
mE = aE;
|
||||
DidModify();
|
||||
|
@ -185,6 +190,7 @@ NS_IMETHODIMP nsSVGMatrix::GetF(float *aF)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGMatrix::SetF(float aF)
|
||||
{
|
||||
NS_ENSURE_FINITE(aF, NS_ERROR_ILLEGAL_VALUE);
|
||||
WillModify();
|
||||
mF = aF;
|
||||
DidModify();
|
||||
|
@ -228,6 +234,7 @@ NS_IMETHODIMP nsSVGMatrix::Inverse(nsIDOMSVGMatrix **_retval)
|
|||
/* nsIDOMSVGMatrix translate (in float x, in float y); */
|
||||
NS_IMETHODIMP nsSVGMatrix::Translate(float x, float y, nsIDOMSVGMatrix **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
|
||||
return NS_NewSVGMatrix(_retval,
|
||||
mA, mB,
|
||||
mC, mD,
|
||||
|
@ -237,6 +244,7 @@ NS_IMETHODIMP nsSVGMatrix::Translate(float x, float y, nsIDOMSVGMatrix **_retval
|
|||
/* nsIDOMSVGMatrix scale (in float scaleFactor); */
|
||||
NS_IMETHODIMP nsSVGMatrix::Scale(float scaleFactor, nsIDOMSVGMatrix **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE(scaleFactor, NS_ERROR_ILLEGAL_VALUE);
|
||||
return NS_NewSVGMatrix(_retval,
|
||||
mA*scaleFactor, mB*scaleFactor,
|
||||
mC*scaleFactor, mD*scaleFactor,
|
||||
|
@ -246,6 +254,7 @@ NS_IMETHODIMP nsSVGMatrix::Scale(float scaleFactor, nsIDOMSVGMatrix **_retval)
|
|||
/* nsIDOMSVGMatrix scaleNonUniform (in float scaleFactorX, in float scaleFactorY); */
|
||||
NS_IMETHODIMP nsSVGMatrix::ScaleNonUniform(float scaleFactorX, float scaleFactorY, nsIDOMSVGMatrix **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE2(scaleFactorX, scaleFactorY, NS_ERROR_ILLEGAL_VALUE);
|
||||
return NS_NewSVGMatrix(_retval,
|
||||
mA*scaleFactorX, mB*scaleFactorX,
|
||||
mC*scaleFactorY, mD*scaleFactorY,
|
||||
|
@ -255,12 +264,15 @@ NS_IMETHODIMP nsSVGMatrix::ScaleNonUniform(float scaleFactorX, float scaleFactor
|
|||
/* nsIDOMSVGMatrix rotate (in float angle); */
|
||||
NS_IMETHODIMP nsSVGMatrix::Rotate(float angle, nsIDOMSVGMatrix **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE(angle, NS_ERROR_ILLEGAL_VALUE);
|
||||
return RotateRadians(angle*radPerDegree, _retval);
|
||||
}
|
||||
|
||||
/* nsIDOMSVGMatrix rotateFromVector (in float x, in float y); */
|
||||
NS_IMETHODIMP nsSVGMatrix::RotateFromVector(float x, float y, nsIDOMSVGMatrix **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
if (x == 0.0 || y == 0.0)
|
||||
return NS_ERROR_DOM_SVG_INVALID_VALUE_ERR;
|
||||
|
||||
|
@ -290,6 +302,8 @@ NS_IMETHODIMP nsSVGMatrix::FlipY(nsIDOMSVGMatrix **_retval)
|
|||
/* nsIDOMSVGMatrix skewX (in float angle); */
|
||||
NS_IMETHODIMP nsSVGMatrix::SkewX(float angle, nsIDOMSVGMatrix **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE(angle, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
double ta = tan( angle*radPerDegree );
|
||||
|
||||
return NS_NewSVGMatrix(_retval,
|
||||
|
@ -301,6 +315,8 @@ NS_IMETHODIMP nsSVGMatrix::SkewX(float angle, nsIDOMSVGMatrix **_retval)
|
|||
/* nsIDOMSVGMatrix skewY (in float angle); */
|
||||
NS_IMETHODIMP nsSVGMatrix::SkewY(float angle, nsIDOMSVGMatrix **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE(angle, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
double ta = tan( angle*radPerDegree );
|
||||
|
||||
return NS_NewSVGMatrix(_retval,
|
||||
|
|
|
@ -164,6 +164,7 @@ NS_IMETHODIMP nsSVGNumber::GetValue(float *aValue)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGNumber::SetValue(float aValue)
|
||||
{
|
||||
NS_ENSURE_FINITE(aValue, NS_ERROR_ILLEGAL_VALUE);
|
||||
WillModify();
|
||||
mValue = aValue;
|
||||
DidModify();
|
||||
|
|
|
@ -84,7 +84,11 @@ private:
|
|||
NS_IMETHOD GetBaseVal(float* aResult)
|
||||
{ *aResult = mVal->GetBaseValue(); return NS_OK; }
|
||||
NS_IMETHOD SetBaseVal(float aValue)
|
||||
{ mVal->SetBaseValue(aValue, mSVGElement, PR_TRUE); return NS_OK; }
|
||||
{
|
||||
NS_ENSURE_FINITE(aValue, NS_ERROR_ILLEGAL_VALUE);
|
||||
mVal->SetBaseValue(aValue, mSVGElement, PR_TRUE);
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHOD GetAnimVal(float* aResult)
|
||||
{ *aResult = mVal->GetAnimValue(); return NS_OK; }
|
||||
|
||||
|
|
|
@ -118,6 +118,8 @@ nsSVGPathElement::GetTotalLength(float *_retval)
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::GetPointAtLength(float distance, nsIDOMSVGPoint **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE(distance, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
nsRefPtr<gfxFlattenedPath> flat = GetFlattenedPath(nsnull);
|
||||
if (!flat)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -137,6 +139,8 @@ nsSVGPathElement::GetPointAtLength(float distance, nsIDOMSVGPoint **_retval)
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::GetPathSegAtLength(float distance, PRUint32 *_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE(distance, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
//Check if mSegments is null
|
||||
nsresult rv = CreatePathSegList();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -184,6 +188,7 @@ nsSVGPathElement::CreateSVGPathSegClosePath(nsIDOMSVGPathSegClosePath **_retval)
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegMovetoAbs(float x, float y, nsIDOMSVGPathSegMovetoAbs **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegMovetoAbs(x, y);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -193,6 +198,7 @@ nsSVGPathElement::CreateSVGPathSegMovetoAbs(float x, float y, nsIDOMSVGPathSegMo
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegMovetoRel(float x, float y, nsIDOMSVGPathSegMovetoRel **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegMovetoRel(x, y);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -202,6 +208,7 @@ nsSVGPathElement::CreateSVGPathSegMovetoRel(float x, float y, nsIDOMSVGPathSegMo
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegLinetoAbs(float x, float y, nsIDOMSVGPathSegLinetoAbs **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegLinetoAbs(x, y);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -211,6 +218,7 @@ nsSVGPathElement::CreateSVGPathSegLinetoAbs(float x, float y, nsIDOMSVGPathSegLi
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegLinetoRel(float x, float y, nsIDOMSVGPathSegLinetoRel **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegLinetoRel(x, y);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -220,6 +228,7 @@ nsSVGPathElement::CreateSVGPathSegLinetoRel(float x, float y, nsIDOMSVGPathSegLi
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegCurvetoCubicAbs(float x, float y, float x1, float y1, float x2, float y2, nsIDOMSVGPathSegCurvetoCubicAbs **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE6(x, y, x1, y1, x2, y2, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -229,6 +238,7 @@ nsSVGPathElement::CreateSVGPathSegCurvetoCubicAbs(float x, float y, float x1, fl
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegCurvetoCubicRel(float x, float y, float x1, float y1, float x2, float y2, nsIDOMSVGPathSegCurvetoCubicRel **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE6(x, y, x1, y1, x2, y2, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegCurvetoCubicRel(x, y, x1, y1, x2, y2);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -238,6 +248,7 @@ nsSVGPathElement::CreateSVGPathSegCurvetoCubicRel(float x, float y, float x1, fl
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegCurvetoQuadraticAbs(float x, float y, float x1, float y1, nsIDOMSVGPathSegCurvetoQuadraticAbs **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE4(x, y, x1, y1, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -247,6 +258,7 @@ nsSVGPathElement::CreateSVGPathSegCurvetoQuadraticAbs(float x, float y, float x1
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegCurvetoQuadraticRel(float x, float y, float x1, float y1, nsIDOMSVGPathSegCurvetoQuadraticRel **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE4(x, y, x1, y1, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegCurvetoQuadraticRel(x, y, x1, y1);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -256,6 +268,7 @@ nsSVGPathElement::CreateSVGPathSegCurvetoQuadraticRel(float x, float y, float x1
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegArcAbs(float x, float y, float r1, float r2, float angle, PRBool largeArcFlag, PRBool sweepFlag, nsIDOMSVGPathSegArcAbs **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE5(x, y, r1, r2, angle, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegArcAbs(x, y, r1, r2, angle,
|
||||
largeArcFlag, sweepFlag);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
@ -266,6 +279,7 @@ nsSVGPathElement::CreateSVGPathSegArcAbs(float x, float y, float r1, float r2, f
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegArcRel(float x, float y, float r1, float r2, float angle, PRBool largeArcFlag, PRBool sweepFlag, nsIDOMSVGPathSegArcRel **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE5(x, y, r1, r2, angle, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegArcRel(x, y, r1, r2, angle,
|
||||
largeArcFlag, sweepFlag);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
@ -276,6 +290,7 @@ nsSVGPathElement::CreateSVGPathSegArcRel(float x, float y, float r1, float r2, f
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegLinetoHorizontalAbs(float x, nsIDOMSVGPathSegLinetoHorizontalAbs **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE(x, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegLinetoHorizontalAbs(x);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -285,6 +300,7 @@ nsSVGPathElement::CreateSVGPathSegLinetoHorizontalAbs(float x, nsIDOMSVGPathSegL
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegLinetoHorizontalRel(float x, nsIDOMSVGPathSegLinetoHorizontalRel **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE(x, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegLinetoHorizontalRel(x);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -294,6 +310,7 @@ nsSVGPathElement::CreateSVGPathSegLinetoHorizontalRel(float x, nsIDOMSVGPathSegL
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegLinetoVerticalAbs(float y, nsIDOMSVGPathSegLinetoVerticalAbs **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE(y, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegLinetoVerticalAbs(y);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -303,6 +320,7 @@ nsSVGPathElement::CreateSVGPathSegLinetoVerticalAbs(float y, nsIDOMSVGPathSegLin
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegLinetoVerticalRel(float y, nsIDOMSVGPathSegLinetoVerticalRel **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE(y, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegLinetoVerticalRel(y);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -312,6 +330,7 @@ nsSVGPathElement::CreateSVGPathSegLinetoVerticalRel(float y, nsIDOMSVGPathSegLin
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2, nsIDOMSVGPathSegCurvetoCubicSmoothAbs **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE4(x, y, x2, y2, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -321,6 +340,7 @@ nsSVGPathElement::CreateSVGPathSegCurvetoCubicSmoothAbs(float x, float y, float
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2, nsIDOMSVGPathSegCurvetoCubicSmoothRel **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE4(x, y, x2, y2, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegCurvetoCubicSmoothRel(x, y, x2, y2);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -330,6 +350,7 @@ nsSVGPathElement::CreateSVGPathSegCurvetoCubicSmoothRel(float x, float y, float
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y, nsIDOMSVGPathSegCurvetoQuadraticSmoothAbs **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegCurvetoQuadraticSmoothAbs(x, y);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
@ -339,6 +360,7 @@ nsSVGPathElement::CreateSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y, ns
|
|||
NS_IMETHODIMP
|
||||
nsSVGPathElement::CreateSVGPathSegCurvetoQuadraticSmoothRel(float x, float y, nsIDOMSVGPathSegCurvetoQuadraticSmoothRel **_retval)
|
||||
{
|
||||
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
|
||||
nsIDOMSVGPathSeg* seg = NS_NewSVGPathSegCurvetoQuadraticSmoothRel(x, y);
|
||||
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
|
||||
return CallQueryInterface(seg, _retval);
|
||||
|
|
|
@ -322,6 +322,7 @@ NS_IMETHODIMP nsSVGPathSegMovetoAbs::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegMovetoAbs::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -335,6 +336,7 @@ NS_IMETHODIMP nsSVGPathSegMovetoAbs::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegMovetoAbs::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -416,6 +418,7 @@ NS_IMETHODIMP nsSVGPathSegMovetoRel::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegMovetoRel::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -429,6 +432,7 @@ NS_IMETHODIMP nsSVGPathSegMovetoRel::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegMovetoRel::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -511,6 +515,7 @@ NS_IMETHODIMP nsSVGPathSegLinetoAbs::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegLinetoAbs::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -524,6 +529,7 @@ NS_IMETHODIMP nsSVGPathSegLinetoAbs::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegLinetoAbs::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -605,6 +611,7 @@ NS_IMETHODIMP nsSVGPathSegLinetoRel::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegLinetoRel::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -618,6 +625,7 @@ NS_IMETHODIMP nsSVGPathSegLinetoRel::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegLinetoRel::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -714,6 +722,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicAbs::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicAbs::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -727,6 +736,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicAbs::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicAbs::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -740,6 +750,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicAbs::GetX1(float *aX1)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicAbs::SetX1(float aX1)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX1, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX1 = aX1;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -753,6 +764,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicAbs::GetY1(float *aY1)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicAbs::SetY1(float aY1)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY1, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY1 = aY1;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -766,6 +778,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicAbs::GetX2(float *aX2)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicAbs::SetX2(float aX2)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX2, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX2 = aX2;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -779,6 +792,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicAbs::GetY2(float *aY2)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicAbs::SetY2(float aY2)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY2, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY2 = aY2;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -872,6 +886,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicRel::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicRel::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -885,6 +900,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicRel::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicRel::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -898,6 +914,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicRel::GetX1(float *aX1)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicRel::SetX1(float aX1)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX1, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX1 = aX1;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -911,6 +928,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicRel::GetY1(float *aY1)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicRel::SetY1(float aY1)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY1, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY1 = aY1;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -924,6 +942,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicRel::GetX2(float *aX2)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicRel::SetX2(float aX2)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX2, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX2 = aX2;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -937,6 +956,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicRel::GetY2(float *aY2)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicRel::SetY2(float aY2)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY2, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY2 = aY2;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1027,6 +1047,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticAbs::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticAbs::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1040,6 +1061,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticAbs::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticAbs::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1053,6 +1075,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticAbs::GetX1(float *aX1)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticAbs::SetX1(float aX1)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX1, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX1 = aX1;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1066,6 +1089,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticAbs::GetY1(float *aY1)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticAbs::SetY1(float aY1)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY1, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY1 = aY1;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1158,6 +1182,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticRel::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticRel::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1171,6 +1196,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticRel::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticRel::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1184,6 +1210,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticRel::GetX1(float *aX1)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticRel::SetX1(float aX1)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX1, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX1 = aX1;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1197,6 +1224,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticRel::GetY1(float *aY1)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticRel::SetY1(float aY1)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY1, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY1 = aY1;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1300,6 +1328,7 @@ NS_IMETHODIMP nsSVGPathSegArcAbs::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegArcAbs::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1313,6 +1342,7 @@ NS_IMETHODIMP nsSVGPathSegArcAbs::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegArcAbs::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1326,6 +1356,7 @@ NS_IMETHODIMP nsSVGPathSegArcAbs::GetR1(float *aR1)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegArcAbs::SetR1(float aR1)
|
||||
{
|
||||
NS_ENSURE_FINITE(aR1, NS_ERROR_ILLEGAL_VALUE);
|
||||
mR1 = aR1;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1339,6 +1370,7 @@ NS_IMETHODIMP nsSVGPathSegArcAbs::GetR2(float *aR2)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegArcAbs::SetR2(float aR2)
|
||||
{
|
||||
NS_ENSURE_FINITE(aR2, NS_ERROR_ILLEGAL_VALUE);
|
||||
mR2 = aR2;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1353,6 +1385,7 @@ NS_IMETHODIMP nsSVGPathSegArcAbs::GetAngle(float *aAngle)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegArcAbs::SetAngle(float aAngle)
|
||||
{
|
||||
NS_ENSURE_FINITE(aAngle, NS_ERROR_ILLEGAL_VALUE);
|
||||
mAngle = aAngle;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1481,6 +1514,7 @@ NS_IMETHODIMP nsSVGPathSegArcRel::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegArcRel::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1494,6 +1528,7 @@ NS_IMETHODIMP nsSVGPathSegArcRel::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegArcRel::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1507,6 +1542,7 @@ NS_IMETHODIMP nsSVGPathSegArcRel::GetR1(float *aR1)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegArcRel::SetR1(float aR1)
|
||||
{
|
||||
NS_ENSURE_FINITE(aR1, NS_ERROR_ILLEGAL_VALUE);
|
||||
mR1 = aR1;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1520,6 +1556,7 @@ NS_IMETHODIMP nsSVGPathSegArcRel::GetR2(float *aR2)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegArcRel::SetR2(float aR2)
|
||||
{
|
||||
NS_ENSURE_FINITE(aR2, NS_ERROR_ILLEGAL_VALUE);
|
||||
mR2 = aR2;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1534,6 +1571,7 @@ NS_IMETHODIMP nsSVGPathSegArcRel::GetAngle(float *aAngle)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegArcRel::SetAngle(float aAngle)
|
||||
{
|
||||
NS_ENSURE_FINITE(aAngle, NS_ERROR_ILLEGAL_VALUE);
|
||||
mAngle = aAngle;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1642,6 +1680,7 @@ NS_IMETHODIMP nsSVGPathSegLinetoHorizontalAbs::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegLinetoHorizontalAbs::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1723,6 +1762,7 @@ NS_IMETHODIMP nsSVGPathSegLinetoHorizontalRel::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegLinetoHorizontalRel::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1805,6 +1845,7 @@ NS_IMETHODIMP nsSVGPathSegLinetoVerticalAbs::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegLinetoVerticalAbs::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1887,6 +1928,7 @@ NS_IMETHODIMP nsSVGPathSegLinetoVerticalRel::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegLinetoVerticalRel::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1983,6 +2025,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothAbs::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothAbs::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -1996,6 +2039,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothAbs::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothAbs::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -2009,6 +2053,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothAbs::GetX2(float *aX2)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothAbs::SetX2(float aX2)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX2, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX2 = aX2;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -2022,6 +2067,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothAbs::GetY2(float *aY2)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothAbs::SetY2(float aY2)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY2, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY2 = aY2;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -2116,6 +2162,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothRel::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothRel::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -2129,6 +2176,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothRel::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothRel::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -2142,6 +2190,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothRel::GetX2(float *aX2)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothRel::SetX2(float aX2)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX2, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX2 = aX2;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -2155,6 +2204,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothRel::GetY2(float *aY2)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoCubicSmoothRel::SetY2(float aY2)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY2, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY2 = aY2;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -2243,6 +2293,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticSmoothAbs::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticSmoothAbs::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -2256,6 +2307,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticSmoothAbs::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticSmoothAbs::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -2347,6 +2399,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticSmoothRel::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticSmoothRel::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
mX = aX;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
@ -2360,6 +2413,7 @@ NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticSmoothRel::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPathSegCurvetoQuadraticSmoothRel::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
mY = aY;
|
||||
DidModify();
|
||||
return NS_OK;
|
||||
|
|
|
@ -113,6 +113,8 @@ NS_IMETHODIMP nsSVGPoint::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPoint::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
WillModify();
|
||||
mX = aX;
|
||||
DidModify();
|
||||
|
@ -128,6 +130,8 @@ NS_IMETHODIMP nsSVGPoint::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGPoint::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
WillModify();
|
||||
mY = aY;
|
||||
DidModify();
|
||||
|
|
|
@ -140,6 +140,7 @@ NS_IMETHODIMP nsSVGRect::GetX(float *aX)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGRect::SetX(float aX)
|
||||
{
|
||||
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
|
||||
WillModify();
|
||||
mX = aX;
|
||||
DidModify();
|
||||
|
@ -154,6 +155,7 @@ NS_IMETHODIMP nsSVGRect::GetY(float *aY)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGRect::SetY(float aY)
|
||||
{
|
||||
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
|
||||
WillModify();
|
||||
mY = aY;
|
||||
DidModify();
|
||||
|
@ -168,6 +170,7 @@ NS_IMETHODIMP nsSVGRect::GetWidth(float *aWidth)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGRect::SetWidth(float aWidth)
|
||||
{
|
||||
NS_ENSURE_FINITE(aWidth, NS_ERROR_ILLEGAL_VALUE);
|
||||
WillModify();
|
||||
mWidth = aWidth;
|
||||
DidModify();
|
||||
|
@ -182,6 +185,7 @@ NS_IMETHODIMP nsSVGRect::GetHeight(float *aHeight)
|
|||
}
|
||||
NS_IMETHODIMP nsSVGRect::SetHeight(float aHeight)
|
||||
{
|
||||
NS_ENSURE_FINITE(aHeight, NS_ERROR_ILLEGAL_VALUE);
|
||||
WillModify();
|
||||
mHeight = aHeight;
|
||||
DidModify();
|
||||
|
|
|
@ -343,6 +343,8 @@ nsSVGSVGElement::GetCurrentScale(float *aCurrentScale)
|
|||
NS_IMETHODIMP
|
||||
nsSVGSVGElement::SetCurrentScale(float aCurrentScale)
|
||||
{
|
||||
NS_ENSURE_FINITE(aCurrentScale, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
// Prevent bizarre behaviour and maxing out of CPU and memory by clamping
|
||||
if (aCurrentScale < CURRENT_SCALE_MIN)
|
||||
aCurrentScale = CURRENT_SCALE_MIN;
|
||||
|
@ -481,6 +483,7 @@ nsSVGSVGElement::GetCurrentTime(float *_retval)
|
|||
NS_IMETHODIMP
|
||||
nsSVGSVGElement::SetCurrentTime(float seconds)
|
||||
{
|
||||
NS_ENSURE_FINITE(seconds, NS_ERROR_ILLEGAL_VALUE);
|
||||
NS_NOTYETIMPLEMENTED("nsSVGSVGElement::SetCurrentTime");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
|
|
@ -301,6 +301,8 @@ NS_IMETHODIMP nsSVGTransform::SetMatrix(nsIDOMSVGMatrix *matrix)
|
|||
/* void setTranslate (in float tx, in float ty); */
|
||||
NS_IMETHODIMP nsSVGTransform::SetTranslate(float tx, float ty)
|
||||
{
|
||||
NS_ENSURE_FINITE2(tx, ty, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
WillModify();
|
||||
|
||||
mType = SVG_TRANSFORM_TRANSLATE;
|
||||
|
@ -321,6 +323,8 @@ NS_IMETHODIMP nsSVGTransform::SetTranslate(float tx, float ty)
|
|||
/* void setScale (in float sx, in float sy); */
|
||||
NS_IMETHODIMP nsSVGTransform::SetScale(float sx, float sy)
|
||||
{
|
||||
NS_ENSURE_FINITE2(sx, sy, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
WillModify();
|
||||
|
||||
mType = SVG_TRANSFORM_SCALE;
|
||||
|
@ -341,6 +345,8 @@ NS_IMETHODIMP nsSVGTransform::SetScale(float sx, float sy)
|
|||
/* void setRotate (in float angle, in float cx, in float cy); */
|
||||
NS_IMETHODIMP nsSVGTransform::SetRotate(float angle, float cx, float cy)
|
||||
{
|
||||
NS_ENSURE_FINITE3(angle, cx, cy, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
WillModify();
|
||||
|
||||
mType = SVG_TRANSFORM_ROTATE;
|
||||
|
@ -366,6 +372,8 @@ NS_IMETHODIMP nsSVGTransform::SetRotate(float angle, float cx, float cy)
|
|||
/* void setSkewX (in float angle); */
|
||||
NS_IMETHODIMP nsSVGTransform::SetSkewX(float angle)
|
||||
{
|
||||
NS_ENSURE_FINITE(angle, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
WillModify();
|
||||
|
||||
mType = SVG_TRANSFORM_SKEWX;
|
||||
|
@ -385,6 +393,8 @@ NS_IMETHODIMP nsSVGTransform::SetSkewX(float angle)
|
|||
/* void setSkewY (in float angle); */
|
||||
NS_IMETHODIMP nsSVGTransform::SetSkewY(float angle)
|
||||
{
|
||||
NS_ENSURE_FINITE(angle, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
WillModify();
|
||||
|
||||
mType = SVG_TRANSFORM_SKEWY;
|
||||
|
|
Загрузка…
Ссылка в новой задаче