mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 825730: Add a more convenient signature for ToDOMAnimatedLength r=longsonr
This commit is contained in:
parent
eda0a05924
commit
84cf480376
@ -68,9 +68,7 @@ NS_IMETHODIMP SVGCircleElement::GetCx(nsIDOMSVGAnimatedLength * *aCx)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGCircleElement::Cx()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> cx;
|
||||
mLengthAttributes[ATTR_CX].ToDOMAnimatedLength(getter_AddRefs(cx), this);
|
||||
return cx.forget();
|
||||
return mLengthAttributes[ATTR_CX].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength cy; */
|
||||
@ -83,9 +81,7 @@ NS_IMETHODIMP SVGCircleElement::GetCy(nsIDOMSVGAnimatedLength * *aCy)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGCircleElement::Cy()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> cy;
|
||||
mLengthAttributes[ATTR_CY].ToDOMAnimatedLength(getter_AddRefs(cy), this);
|
||||
return cy.forget();
|
||||
return mLengthAttributes[ATTR_CY].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength r; */
|
||||
@ -98,9 +94,7 @@ NS_IMETHODIMP SVGCircleElement::GetR(nsIDOMSVGAnimatedLength * *aR)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGCircleElement::R()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> r;
|
||||
mLengthAttributes[ATTR_R].ToDOMAnimatedLength(getter_AddRefs(r), this);
|
||||
return r.forget();
|
||||
return mLengthAttributes[ATTR_R].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -68,9 +68,7 @@ NS_IMETHODIMP SVGEllipseElement::GetCx(nsIDOMSVGAnimatedLength * *aCx)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGEllipseElement::Cx()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> cx;
|
||||
mLengthAttributes[CX].ToDOMAnimatedLength(getter_AddRefs(cx), this);
|
||||
return cx.forget();
|
||||
return mLengthAttributes[CX].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength cy; */
|
||||
@ -83,9 +81,7 @@ NS_IMETHODIMP SVGEllipseElement::GetCy(nsIDOMSVGAnimatedLength * *aCy)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGEllipseElement::Cy()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> cy;
|
||||
mLengthAttributes[CY].ToDOMAnimatedLength(getter_AddRefs(cy), this);
|
||||
return cy.forget();
|
||||
return mLengthAttributes[CY].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength rx; */
|
||||
@ -98,9 +94,7 @@ NS_IMETHODIMP SVGEllipseElement::GetRx(nsIDOMSVGAnimatedLength * *aRx)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGEllipseElement::Rx()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> rx;
|
||||
mLengthAttributes[RX].ToDOMAnimatedLength(getter_AddRefs(rx), this);
|
||||
return rx.forget();
|
||||
return mLengthAttributes[RX].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength ry; */
|
||||
@ -113,9 +107,7 @@ NS_IMETHODIMP SVGEllipseElement::GetRy(nsIDOMSVGAnimatedLength * *aRy)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGEllipseElement::Ry()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> ry;
|
||||
mLengthAttributes[RY].ToDOMAnimatedLength(getter_AddRefs(ry), this);
|
||||
return ry.forget();
|
||||
return mLengthAttributes[RY].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -70,9 +70,7 @@ NS_IMETHODIMP SVGForeignObjectElement::GetX(nsIDOMSVGAnimatedLength * *aX)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGForeignObjectElement::X()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> x;
|
||||
mLengthAttributes[ATTR_X].ToDOMAnimatedLength(getter_AddRefs(x), this);
|
||||
return x.forget();
|
||||
return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength y; */
|
||||
@ -85,9 +83,7 @@ NS_IMETHODIMP SVGForeignObjectElement::GetY(nsIDOMSVGAnimatedLength * *aY)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGForeignObjectElement::Y()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> y;
|
||||
mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(getter_AddRefs(y), this);
|
||||
return y.forget();
|
||||
return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
|
||||
@ -101,9 +97,7 @@ NS_IMETHODIMP SVGForeignObjectElement::GetWidth(nsIDOMSVGAnimatedLength * *aWidt
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGForeignObjectElement::Width()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> width;
|
||||
mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(getter_AddRefs(width), this);
|
||||
return width.forget();
|
||||
return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
|
||||
@ -117,9 +111,7 @@ NS_IMETHODIMP SVGForeignObjectElement::GetHeight(nsIDOMSVGAnimatedLength * *aHei
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGForeignObjectElement::Height()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> height;
|
||||
mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(getter_AddRefs(height), this);
|
||||
return height.forget();
|
||||
return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -91,9 +91,7 @@ NS_IMETHODIMP SVGImageElement::GetX(nsIDOMSVGAnimatedLength * *aX)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGImageElement::X()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> x;
|
||||
mLengthAttributes[ATTR_X].ToDOMAnimatedLength(getter_AddRefs(x), this);
|
||||
return x.forget();
|
||||
return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength y; */
|
||||
@ -106,9 +104,7 @@ NS_IMETHODIMP SVGImageElement::GetY(nsIDOMSVGAnimatedLength * *aY)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGImageElement::Y()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> y;
|
||||
mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(getter_AddRefs(y), this);
|
||||
return y.forget();
|
||||
return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength width; */
|
||||
@ -121,9 +117,7 @@ NS_IMETHODIMP SVGImageElement::GetWidth(nsIDOMSVGAnimatedLength * *aWidth)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGImageElement::Width()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> width;
|
||||
mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(getter_AddRefs(width), this);
|
||||
return width.forget();
|
||||
return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength height; */
|
||||
@ -136,9 +130,7 @@ NS_IMETHODIMP SVGImageElement::GetHeight(nsIDOMSVGAnimatedLength * *aHeight)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGImageElement::Height()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> height;
|
||||
mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(getter_AddRefs(height), this);
|
||||
return height.forget();
|
||||
return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute SVGPreserveAspectRatio preserveAspectRatio; */
|
||||
|
@ -71,9 +71,7 @@ NS_IMETHODIMP SVGRectElement::GetX(nsIDOMSVGAnimatedLength * *aX)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGRectElement::X()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> x;
|
||||
mLengthAttributes[ATTR_X].ToDOMAnimatedLength(getter_AddRefs(x), this);
|
||||
return x.forget();
|
||||
return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength y; */
|
||||
@ -86,9 +84,7 @@ NS_IMETHODIMP SVGRectElement::GetY(nsIDOMSVGAnimatedLength * *aY)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGRectElement::Y()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> y;
|
||||
mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(getter_AddRefs(y), this);
|
||||
return y.forget();
|
||||
return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength width; */
|
||||
@ -101,9 +97,7 @@ NS_IMETHODIMP SVGRectElement::GetWidth(nsIDOMSVGAnimatedLength * *aWidth)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGRectElement::Width()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> width;
|
||||
mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(getter_AddRefs(width), this);
|
||||
return width.forget();
|
||||
return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength height; */
|
||||
@ -116,9 +110,7 @@ NS_IMETHODIMP SVGRectElement::GetHeight(nsIDOMSVGAnimatedLength * *aHeight)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGRectElement::Height()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> height;
|
||||
mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(getter_AddRefs(height), this);
|
||||
return height.forget();
|
||||
return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength rx; */
|
||||
@ -131,9 +123,7 @@ NS_IMETHODIMP SVGRectElement::GetRx(nsIDOMSVGAnimatedLength * *aRx)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGRectElement::Rx()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> Rx;
|
||||
mLengthAttributes[ATTR_RX].ToDOMAnimatedLength(getter_AddRefs(Rx), this);
|
||||
return Rx.forget();
|
||||
return mLengthAttributes[ATTR_RX].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength ry; */
|
||||
@ -146,9 +136,7 @@ NS_IMETHODIMP SVGRectElement::GetRy(nsIDOMSVGAnimatedLength * *aRy)
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
SVGRectElement::Ry()
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGAnimatedLength> Ry;
|
||||
mLengthAttributes[ATTR_RY].ToDOMAnimatedLength(getter_AddRefs(Ry), this);
|
||||
return Ry.forget();
|
||||
return mLengthAttributes[ATTR_RY].ToDOMAnimatedLength(this);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -485,6 +485,13 @@ nsSVGLength2::SetAnimValue(float aValue, nsSVGElement *aSVGElement)
|
||||
nsresult
|
||||
nsSVGLength2::ToDOMAnimatedLength(nsIDOMSVGAnimatedLength **aResult,
|
||||
nsSVGElement *aSVGElement)
|
||||
{
|
||||
*aResult = ToDOMAnimatedLength(aSVGElement).get();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
nsSVGLength2::ToDOMAnimatedLength(nsSVGElement* aSVGElement)
|
||||
{
|
||||
nsRefPtr<DOMAnimatedLength> domAnimatedLength =
|
||||
sSVGAnimatedLengthTearoffTable.GetTearoff(this);
|
||||
@ -493,8 +500,7 @@ nsSVGLength2::ToDOMAnimatedLength(nsIDOMSVGAnimatedLength **aResult,
|
||||
sSVGAnimatedLengthTearoffTable.AddTearoff(this, domAnimatedLength);
|
||||
}
|
||||
|
||||
domAnimatedLength.forget(aResult);
|
||||
return NS_OK;
|
||||
return domAnimatedLength.forget();
|
||||
}
|
||||
|
||||
nsSVGLength2::DOMAnimatedLength::~DOMAnimatedLength()
|
||||
|
@ -85,6 +85,10 @@ public:
|
||||
|
||||
nsresult ToDOMAnimatedLength(nsIDOMSVGAnimatedLength **aResult,
|
||||
nsSVGElement* aSVGElement);
|
||||
|
||||
already_AddRefed<nsIDOMSVGAnimatedLength>
|
||||
ToDOMAnimatedLength(nsSVGElement* aSVGElement);
|
||||
|
||||
// Returns a new nsISMILAttr object that the caller must delete
|
||||
nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user