return NULL;
return nsnull;
CairoGradient(cairo_t *ctx, nsISVGGradient *aGrad,              nsISVGGeometrySource *aSource){  NS_ASSERTION(aGrad, "Called CairoGradient without a gradient!");  if (!aGrad)    return NULL;  // Get the transform list (if there is one)  nsCOMPtr<nsIDOMSVGMatrix> svgMatrix;  aGrad->GetGradientTransform(getter_AddRefs(svgMatrix), aSource);  NS_ASSERTION(svgMatrix, "CairoGradient: GetGradientTransform returns null");  cairo_matrix_t patternMatrix = SVGToMatrix(svgMatrix);  cairo_pattern_t *gradient;  // Linear or Radial?  PRUint32 type;  aGrad->GetGradientType(&type);  if (type == nsISVGGradient::SVG_LINEAR_GRADIENT)    gradient = CairoLinearGradient(ctx, aGrad);  else if (type == nsISVGGradient::SVG_RADIAL_GRADIENT)    gradient = CairoRadialGradient(ctx, aGrad);  else     return NULL; // Shouldn't happen  PRUint16 aSpread;  aGrad->GetSpreadMethod(&aSpread);  if (aSpread == nsIDOMSVGGradientElement::SVG_SPREADMETHOD_PAD)    cairo_pattern_set_extend(gradient, CAIRO_EXTEND_NONE);  else if (aSpread == nsIDOMSVGGradientElement::SVG_SPREADMETHOD_REFLECT)    cairo_pattern_set_extend(gradient, CAIRO_EXTEND_REFLECT);  else if (aSpread == nsIDOMSVGGradientElement::SVG_SPREADMETHOD_REPEAT)    cairo_pattern_set_extend(gradient, CAIRO_EXTEND_REPEAT);    cairo_matrix_invert(&patternMatrix);  cairo_pattern_set_matrix(gradient, &patternMatrix);  CairoSetStops(gradient, aGrad);  return gradient;}