aContent->SetAttr(kNameSpaceID_None, keyAtom, uv, aNotify); } else {  aContent->SetAttr(kNameSpaceID_None, keyAtom, v, aNotify); }
aContent->SetAttr(kNameSpaceID_None, keyAtom, uv, aNotify); } else {  aContent->SetAttr(kNameSpaceID_None, keyAtom, v, aNotify);
HTMLContentSink::AddAttributes(const nsIParserNode& aNode,                               nsIHTMLContent* aContent, PRBool aNotify){  // Add tag attributes to the content attributes  PRInt32 ac = aNode.GetAttributeCount();  if (ac == 0) {    // No attributes, nothing to do. Do an early return to avoid    // constructing the nsAutoString object for nothing.    return NS_OK;  }  nsAutoString k;  nsHTMLTag nodeType = nsHTMLTag(aNode.GetNodeType());  for (PRInt32 i = 0; i < ac; i++) {    // Get lower-cased key    const nsAString& key = aNode.GetKeyAt(i);    k.Assign(key);    ToLowerCase(k);    nsCOMPtr<nsIAtom> keyAtom = do_GetAtom(k);    if (!aContent->HasAttr(kNameSpaceID_None, keyAtom)) {      // Get value and remove mandatory quotes      static const char* kWhitespace = "\n\r\t\b";      const nsAString& v =        nsContentUtils::TrimCharsInSet(kWhitespace, aNode.GetValueAt(i));      if (nodeType == eHTMLTag_a && keyAtom == nsHTMLAtoms::name) {        NS_ConvertUCS2toUTF8 cname(v);        NS_ConvertUTF8toUCS2 uv(nsUnescape(NS_CONST_CAST(char *,                                                         cname.get())));        // Add attribute to content        aContent->SetAttr(kNameSpaceID_None, keyAtom, uv, aNotify);      } else {        // Add attribute to content        aContent->SetAttr(kNameSpaceID_None, keyAtom, v, aNotify);      }    }  }  return NS_OK;}