зеркало из https://github.com/mozilla/gecko-dev.git
Various cleanups for SVGAngle, no bug
This commit is contained in:
Родитель
54bb2b152f
Коммит
9e59a53555
|
@ -30,16 +30,12 @@ SVGAnimatedAngle::WrapObject(JSContext* aCx, JSObject* aScope, bool* aTriedToWra
|
|||
already_AddRefed<SVGAngle>
|
||||
SVGAnimatedAngle::BaseVal()
|
||||
{
|
||||
nsRefPtr<SVGAngle> angle;
|
||||
mVal->ToDOMBaseVal(getter_AddRefs(angle), mSVGElement);
|
||||
return angle.forget();
|
||||
return mVal->ToDOMBaseVal(mSVGElement);
|
||||
}
|
||||
|
||||
already_AddRefed<SVGAngle>
|
||||
SVGAnimatedAngle::AnimVal()
|
||||
{
|
||||
nsRefPtr<SVGAngle> angle;
|
||||
mVal->ToDOMAnimVal(getter_AddRefs(angle), mSVGElement);
|
||||
return angle.forget();
|
||||
return mVal->ToDOMAnimVal(mSVGElement);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,12 +29,6 @@ public:
|
|||
}
|
||||
~SVGAnimatedAngle();
|
||||
|
||||
NS_IMETHOD GetBaseVal(nsISupports **aBaseVal)
|
||||
{ *aBaseVal = BaseVal().get(); return NS_OK; }
|
||||
|
||||
NS_IMETHOD GetAnimVal(nsISupports **aAnimVal)
|
||||
{ *aAnimVal = AnimVal().get(); return NS_OK; }
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() { return mSVGElement; }
|
||||
virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap);
|
||||
|
|
|
@ -217,8 +217,8 @@ nsSVGAngle::NewValueSpecifiedUnits(uint16_t unitType,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSVGAngle::ToDOMBaseVal(SVGAngle **aResult, nsSVGElement *aSVGElement)
|
||||
already_AddRefed<SVGAngle>
|
||||
nsSVGAngle::ToDOMBaseVal(nsSVGElement *aSVGElement)
|
||||
{
|
||||
nsRefPtr<SVGAngle> domBaseVal =
|
||||
sBaseSVGAngleTearoffTable.GetTearoff(this);
|
||||
|
@ -227,12 +227,11 @@ nsSVGAngle::ToDOMBaseVal(SVGAngle **aResult, nsSVGElement *aSVGElement)
|
|||
sBaseSVGAngleTearoffTable.AddTearoff(this, domBaseVal);
|
||||
}
|
||||
|
||||
domBaseVal.forget(aResult);
|
||||
return NS_OK;
|
||||
return domBaseVal.forget();
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSVGAngle::ToDOMAnimVal(SVGAngle **aResult, nsSVGElement *aSVGElement)
|
||||
already_AddRefed<SVGAngle>
|
||||
nsSVGAngle::ToDOMAnimVal(nsSVGElement *aSVGElement)
|
||||
{
|
||||
nsRefPtr<SVGAngle> domAnimVal =
|
||||
sAnimSVGAngleTearoffTable.GetTearoff(this);
|
||||
|
@ -241,8 +240,7 @@ nsSVGAngle::ToDOMAnimVal(SVGAngle **aResult, nsSVGElement *aSVGElement)
|
|||
sAnimSVGAngleTearoffTable.AddTearoff(this, domAnimVal);
|
||||
}
|
||||
|
||||
domAnimVal.forget(aResult);
|
||||
return NS_OK;
|
||||
return domAnimVal.forget();
|
||||
}
|
||||
|
||||
SVGAngle::~SVGAngle()
|
||||
|
|
|
@ -88,8 +88,8 @@ private:
|
|||
nsresult NewValueSpecifiedUnits(uint16_t aUnitType, float aValue,
|
||||
nsSVGElement *aSVGElement);
|
||||
nsresult ConvertToSpecifiedUnits(uint16_t aUnitType, nsSVGElement *aSVGElement);
|
||||
nsresult ToDOMBaseVal(mozilla::dom::SVGAngle **aResult, nsSVGElement* aSVGElement);
|
||||
nsresult ToDOMAnimVal(mozilla::dom::SVGAngle **aResult, nsSVGElement* aSVGElement);
|
||||
already_AddRefed<mozilla::dom::SVGAngle> ToDOMBaseVal(nsSVGElement* aSVGElement);
|
||||
already_AddRefed<mozilla::dom::SVGAngle> ToDOMAnimVal(nsSVGElement* aSVGElement);
|
||||
|
||||
public:
|
||||
// We do not currently implemente a SMILAngle struct because in SVG 1.1 the
|
||||
|
|
Загрузка…
Ссылка в новой задаче