nsHTMLOptionCollection::NamedItem(const nsString& aName, nsIDOMNode** aReturn)
nsHTMLSelectElement::NamedItem(const nsString& aName, nsIDOMNode** aReturn)
nsHTMLOptionCollection::NamedItem(const nsString& aName, nsIDOMNode** aReturn){  if (mDirty && (nsnull != mSelect)) {    GetOptions();  }  PRUint32 count = mElements.Count();  nsresult result = NS_OK;  *aReturn = nsnull;  for (PRUint32 i = 0; i < count && *aReturn == nsnull; i++) {    nsIDOMHTMLOptionElement *option;    option = (nsIDOMHTMLOptionElement*)mElements.ElementAt(i);    if (nsnull != option) {      nsIContent *content;            result = option->QueryInterface(kIContentIID, (void **)&content);      if (NS_OK == result) {        nsAutoString name;        // XXX Should it be an EqualsIgnoreCase?        if (((content->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::name, name) == NS_CONTENT_ATTR_HAS_VALUE) &&             (aName.Equals(name))) ||            ((content->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::id, name) == NS_CONTENT_ATTR_HAS_VALUE) &&             (aName.Equals(name)))) {          result = option->QueryInterface(kIDOMNodeIID, (void **)aReturn);        }        NS_RELEASE(content);      }    }  }    return result;}