rv = mPresShell->GetImageLocation(node, locationText);
rv = mPresShell->GetLinkLocation(node, locationText);
NS_IMETHODIMP DocumentViewerImpl::CopyImageLocation(){  NS_ENSURE_TRUE(mPresShell, NS_ERROR_NOT_INITIALIZED);  nsCOMPtr<nsIDOMNode> node;  nsresult rv = GetPopupImageNode(getter_AddRefs(node));  // make noise if we're not in an image  NS_ENSURE_SUCCESS(rv, rv);  NS_ENSURE_TRUE(node, NS_ERROR_FAILURE);  nsAutoString locationText;  rv = mPresShell->GetImageLocation(node, locationText);  NS_ENSURE_SUCCESS(rv, rv);  nsCOMPtr<nsIClipboardHelper> clipboard(do_GetService("@mozilla.org/widget/clipboardhelper;1", &rv));  NS_ENSURE_SUCCESS(rv, rv);  // copy the href onto the clipboard  return clipboard->CopyString(locationText);}