nsCOMPtr<nsIContent> rootContent; mDocument->GetRootContent(getter_AddRefs(rootContent)); rv = esm->SetContentState(rootContent, NS_EVENT_STATE_FOCUS);
rv = esm->SetContentState(nsnull, NS_EVENT_STATE_FOCUS);
nsHTMLAnchorElement::RemoveFocus(nsIPresContext* aPresContext){  NS_ENSURE_ARG_POINTER(aPresContext);  // If we are disabled, we probably shouldn't have focus in the  // first place, so allow it to be removed.  nsresult rv = NS_OK;  nsCOMPtr<nsIEventStateManager> esm;  aPresContext->GetEventStateManager(getter_AddRefs(esm));  if (esm) {    if (!mDocument)      return NS_ERROR_NULL_POINTER;    nsCOMPtr<nsIContent> rootContent;    mDocument->GetRootContent(getter_AddRefs(rootContent));    rv = esm->SetContentState(rootContent, NS_EVENT_STATE_FOCUS);  }  return rv;}