if (!mGradientTransform) { PrivateGetGradientTransform(getter_AddRefs(mGradientTransform),aSource); if (!mGradientTransform) return NS_ERROR_FAILURE; NS_ADD_SVGVALUE_OBSERVER(mGradientTransform);
*aGradientTransform = nsnull; nsCOMPtr<nsIDOMSVGAnimatedTransformList> aTrans; nsCOMPtr<nsIDOMSVGGradientElement> aGrad = do_QueryInterface(mContent); NS_ASSERTION(aGrad, "Wrong content element (not gradient)"); if (aGrad == nsnull) { return NS_ERROR_FAILURE;
nsSVGGradientFrame::GetGradientTransform(nsIDOMSVGMatrix **aGradientTransform,                                         nsISVGGeometrySource *aSource){  if (!mGradientTransform) {    PrivateGetGradientTransform(getter_AddRefs(mGradientTransform),aSource);    if (!mGradientTransform)      return NS_ERROR_FAILURE;    NS_ADD_SVGVALUE_OBSERVER(mGradientTransform);  }  *aGradientTransform = mGradientTransform;  NS_ADDREF(*aGradientTransform);  return NS_OK;}