nsCOMPtr<nsIDOMSelection> selection; nsresult res = GetSelection(getter_AddRefs(selection)); if (!NS_SUCCEEDED(res)) return res;  PRBool isCollapsed; if (NS_SUCCEEDED(selection->GetIsCollapsed(&isCollapsed)) && isCollapsed) return NS_ERROR_NOT_AVAILABLE;  res = Copy(); if (NS_SUCCEEDED(res)) res = DeleteSelection(eNone); return res;
return nsTextEditor::Cut();
NS_IMETHODIMP nsHTMLEditor::Cut(){  nsCOMPtr<nsIDOMSelection> selection;  nsresult res = GetSelection(getter_AddRefs(selection));  if (!NS_SUCCEEDED(res))    return res;  PRBool isCollapsed;  if (NS_SUCCEEDED(selection->GetIsCollapsed(&isCollapsed)) && isCollapsed)    return NS_ERROR_NOT_AVAILABLE;  res = Copy();  if (NS_SUCCEEDED(res))    res = DeleteSelection(eNone);  return res;}