aNodeInfo->GetNameAtom(*getter_AddRefs(atom)); aNodeInfo->GetNamespaceID(nsid);
if ((nsLayoutAtoms::onclick == aAttribute) || (nsLayoutAtoms::ondblclick == aAttribute) || (nsLayoutAtoms::onmousedown == aAttribute) || (nsLayoutAtoms::onmouseup == aAttribute) || (nsLayoutAtoms::onmouseover == aAttribute) || (nsLayoutAtoms::onmouseout == aAttribute)) mInner.AddScriptEventListener(aAttribute, aValue, kIDOMMouseListenerIID); else if ((nsLayoutAtoms::onkeydown == aAttribute) || (nsLayoutAtoms::onkeyup == aAttribute) || (nsLayoutAtoms::onkeypress == aAttribute)) mInner.AddScriptEventListener(aAttribute, aValue, kIDOMKeyListenerIID); else if (nsLayoutAtoms::onmousemove == aAttribute) mInner.AddScriptEventListener(aAttribute, aValue, kIDOMMouseMotionListenerIID); else if (nsLayoutAtoms::onload == aAttribute) mInner.AddScriptEventListener(nsLayoutAtoms::onload, aValue, kIDOMLoadListenerIID); else if ((nsLayoutAtoms::onunload == aAttribute) || (nsLayoutAtoms::onabort == aAttribute) || (nsLayoutAtoms::onerror == aAttribute)) mInner.AddScriptEventListener(aAttribute, aValue, kIDOMLoadListenerIID); else if ((nsLayoutAtoms::onfocus == aAttribute) || (nsLayoutAtoms::onblur == aAttribute)) mInner.AddScriptEventListener(aAttribute, aValue, kIDOMFocusListenerIID); else if ((nsLayoutAtoms::onsubmit == aAttribute) || (nsLayoutAtoms::onreset == aAttribute) || (nsLayoutAtoms::onchange == aAttribute) || (nsLayoutAtoms::onselect == aAttribute)) mInner.AddScriptEventListener(aAttribute, aValue, kIDOMFormListenerIID); else if (nsLayoutAtoms::onpaint == aAttribute) mInner.AddScriptEventListener(aAttribute, aValue, kIDOMPaintListenerIID); else if (nsLayoutAtoms::oninput == aAttribute) mInner.AddScriptEventListener(aAttribute, aValue, kIDOMFormListenerIID);  nsHTMLValue val;  if (NS_CONTENT_ATTR_NOT_THERE != StringToAttribute(aAttribute, aValue, val)) {  result = SetHTMLAttribute(aAttribute, val, aNotify); return result; } else { if (mInner.ParseCommonAttribute(aAttribute, aValue, val)) {  result = SetHTMLAttribute(aAttribute, val, aNotify); return result; } if (0 == aValue.Length()) { val.SetEmptyValue(); result = SetHTMLAttribute(aAttribute, val, aNotify); return result; }
nsHTMLUnknownElement::SetAttribute(nsINodeInfo *aNodeInfo,                                   const nsString& aValue,                                   PRBool aNotify){  NS_ENSURE_ARG_POINTER(aNodeInfo);    nsCOMPtr<nsIAtom> atom;    PRInt32 nsid;    aNodeInfo->GetNameAtom(*getter_AddRefs(atom));    aNodeInfo->GetNamespaceID(nsid);    // We still rely on the old way of setting the attribute.      return SetAttribute(nsid, atom, aValue, aNotify);  }