GetGlobalTransform(ctx, nsnull);
if (NS_FAILED(GetGlobalTransform(ctx, nsnull))) { cairo_destroy(ctx); return NS_ERROR_FAILURE; }
nsSVGCairoGlyphGeometry::ContainsPoint(float x, float y, PRBool *_retval){  *_retval = PR_FALSE;  /* get the metrics */  nsCOMPtr<nsISVGCairoGlyphMetrics> metrics;  {    nsCOMPtr<nsISVGRendererGlyphMetrics> xpmetrics;    mSource->GetMetrics(getter_AddRefs(xpmetrics));    metrics = do_QueryInterface(xpmetrics);    NS_ASSERTION(metrics, "wrong metrics object!");    if (!metrics)      return NS_ERROR_FAILURE;  }  cairo_t *ctx = cairo_create(gSVGCairoDummySurface);  GetGlobalTransform(ctx, nsnull);  metrics->SelectFont(ctx);  nsAutoString text;  mSource->GetCharacterData(text);  nsSVGCharacterPosition *cp;  if (NS_FAILED(mSource->GetCharacterPosition(&cp))) {    cairo_destroy(ctx);    return NS_ERROR_FAILURE;  }  float xx, yy;  mSource->GetX(&xx);  mSource->GetY(&yy);  cairo_matrix_t matrix;  for (PRUint32 i=0; i<text.Length(); i++) {    cairo_get_matrix(ctx, &matrix);    if (cp) {      cairo_move_to(ctx, cp[i].x, cp[i].y);      cairo_rotate(ctx, cp[i].angle);    } else {      cairo_move_to(ctx, xx, yy);    }    cairo_text_extents_t extent;    cairo_text_extents(ctx,                       NS_ConvertUCS2toUTF8(Substring(text, i, 1)).get(),                       &extent);    cairo_rel_move_to(ctx, extent.x_bearing, extent.y_bearing);    cairo_rel_line_to(ctx, extent.width, 0);    cairo_rel_line_to(ctx, 0, extent.height);    cairo_rel_line_to(ctx, -extent.width, 0);    cairo_close_path(ctx);    cairo_set_matrix(ctx, &matrix);    if (!cp) {      xx += extent.x_advance;      yy += extent.y_advance;    }  }  delete [] cp;  cairo_identity_matrix(ctx);  *_retval = cairo_in_fill(ctx, x, y);  cairo_destroy(ctx);  return NS_OK;}