nsCOMPtr<nsIDOMSVGRadialGradientElement> aRgrad = do_QueryInterface(mContent); NS_ASSERTION(aRgrad, "Wrong content element (not radial gradient)"); if (aRgrad == nsnull) { return NS_ERROR_FAILURE;
if (!mFx) { PrivateGetFx(getter_AddRefs(mFx)); if (!mFx) return NS_ERROR_FAILURE; NS_ADD_SVGVALUE_OBSERVER(mFx);
nsSVGRadialGradientFrame::GetFx(float *aFx){  nsCOMPtr<nsIDOMSVGRadialGradientElement> aRgrad = do_QueryInterface(mContent);  NS_ASSERTION(aRgrad, "Wrong content element (not radial gradient)");  if (aRgrad == nsnull) {    return NS_ERROR_FAILURE;  }  // See if we need to get the value from another gradient  if (checkURITarget(nsSVGAtoms::fx)) {    // Yes, get it from the target    nsISVGGradient *aNextGrad;    if (nsSVGGradientFrame::GetNextGradient(&aNextGrad, nsISVGGradient::SVG_RADIAL_GRADIENT) == NS_OK) {      nsCOMPtr<nsISVGRadialGradient> aRNgrad = do_QueryInterface(aNextGrad);      aRNgrad->GetFx(aFx);      return NS_OK;    }    // There are no gradients in the list with our type --  the spec    // states that if there is no explicit fx value, we return the cx value    // see http://www.w3.org/TR/SVG11/pservers.html#RadialGradients    return GetCx(aFx);  }  // No, return the values  nsCOMPtr<nsIDOMSVGAnimatedLength> aLen;  aRgrad->GetFx(getter_AddRefs(aLen));  nsCOMPtr<nsIDOMSVGLength> sLen;  aLen->GetAnimVal(getter_AddRefs(sLen));  sLen->GetValue(aFx);  return NS_OK;}