if (aNode) { nsCOMPtr<nsIAtom> atom; nsCOMPtr<nsIContent> content = do_QueryInterface(aNode); if (content) content->GetTag(getter_AddRefs(atom)); if (atom) { if (atom.get() == aAtom) { return PR_TRUE; } } } return PR_FALSE;
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode); return content && content->Tag() == aAtom;
nsDocumentEncoder::IsTag(nsIDOMNode* aNode, nsIAtom* aAtom){  if (aNode)  {    nsCOMPtr<nsIAtom> atom;    nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);    if (content)      content->GetTag(getter_AddRefs(atom));    if (atom)    {      if (atom.get() == aAtom)      {        return PR_TRUE;      }    }  }  return PR_FALSE;}