return mControls->RemoveElementFromTable(aElement, aName);
nsCOMPtr<nsIContent> content = do_QueryInterface(aChild); if (!content) { return NS_OK; }  nsCOMPtr<nsISupports> supports;  if (!mNameLookupTable.Get(aName, getter_AddRefs(supports))) return NS_OK;  nsCOMPtr<nsIFormControl> fctrl(do_QueryInterface(supports));  if (fctrl) {   if (fctrl == aChild) { mNameLookupTable.Remove(aName); }  return NS_OK; }  nsCOMPtr<nsIDOMNodeList> nodeList(do_QueryInterface(supports)); NS_ENSURE_TRUE(nodeList, NS_ERROR_FAILURE);   nsBaseContentList *list = NS_STATIC_CAST(nsBaseContentList *, (nsIDOMNodeList *)nodeList.get());  list->RemoveElement(content);  PRUint32 length = 0; list->GetLength(&length);  if (!length) {   mNameLookupTable.Remove(aName); } else if (length == 1) {   nsCOMPtr<nsIDOMNode> node; list->Item(0, getter_AddRefs(node));  if (node) { nsCOMPtr<nsISupports> tmp(do_QueryInterface(node)); NS_ENSURE_TRUE(mNameLookupTable.Put(aName, tmp),NS_ERROR_FAILURE); } }  return NS_OK;
nsHTMLFormElement::RemoveElementFromTable(nsIFormControl* aElement,                                          const nsAString& aName){  NS_ENSURE_TRUE(mControls, NS_ERROR_UNEXPECTED);  return mControls->RemoveElementFromTable(aElement, aName);}