nsGenericHTMLElement::SetAttribute(const nsAString& aName, const nsAString& aValue) { const nsAttrName* name = InternalGetExistingAttrNameFromQName(aName);  if (!name) { nsresult rv = nsContentUtils::CheckQName(aName, PR_FALSE); NS_ENSURE_SUCCESS(rv, rv);  nsCOMPtr<nsIAtom> nameAtom; if (mNodeInfo->NamespaceEquals(kNameSpaceID_None)) { nsAutoString lower; ToLowerCase(aName, lower); nameAtom = do_GetAtom(lower); } else { nameAtom = do_GetAtom(aName); } NS_ENSURE_TRUE(nameAtom, NS_ERROR_OUT_OF_MEMORY);  return SetAttr(kNameSpaceID_None, nameAtom, aValue, PR_TRUE);
nsresult    SetAttribute(const nsString& aName, const nsString& aValue) { return nsGenericElement::SetAttribute(aName, aValue);
nsGenericHTMLElement::SetAttribute(const nsAString& aName,                                   const nsAString& aValue){  const nsAttrName* name = InternalGetExistingAttrNameFromQName(aName);  if (!name) {    nsresult rv = nsContentUtils::CheckQName(aName, PR_FALSE);    NS_ENSURE_SUCCESS(rv, rv);    nsCOMPtr<nsIAtom> nameAtom;    if (mNodeInfo->NamespaceEquals(kNameSpaceID_None)) {      nsAutoString lower;      ToLowerCase(aName, lower);      nameAtom = do_GetAtom(lower);    }    else {      nameAtom = do_GetAtom(aName);    }    NS_ENSURE_TRUE(nameAtom, NS_ERROR_OUT_OF_MEMORY);    return SetAttr(kNameSpaceID_None, nameAtom, aValue, PR_TRUE);  }  return SetAttr(name->NamespaceID(), name->LocalName(), name->GetPrefix(),                 aValue, PR_TRUE);}