*getter_AddRefs(nodeInfo));
getter_AddRefs(nodeInfo));
HTMLContentSink::OpenForm(const nsIParserNode& aNode){  MOZ_TIMER_DEBUGLOG(("Start: nsHTMLContentSink::OpenForm()\n"));  MOZ_TIMER_START(mWatch);  nsresult result = NS_OK;  mCurrentContext->FlushTextAndRelease();  SINK_TRACE_NODE(SINK_TRACE_CALLS,                  "HTMLContentSink::OpenForm",                   eHTMLTag_form,                  mCurrentContext->mStackPos,                   this);  // Close out previous form if it's there. If there is one  // around, it's probably because the last one wasn't well-formed.  mCurrentForm = nsnull;  // Check if the parent is a table, tbody, thead, tfoot, tr, col or  // colgroup. If so, we fix up by making the form leaf content.  if (mCurrentContext->IsCurrentContainer(eHTMLTag_table) ||      mCurrentContext->IsCurrentContainer(eHTMLTag_tbody) ||      mCurrentContext->IsCurrentContainer(eHTMLTag_thead) ||      mCurrentContext->IsCurrentContainer(eHTMLTag_tfoot) ||      mCurrentContext->IsCurrentContainer(eHTMLTag_tr) ||      mCurrentContext->IsCurrentContainer(eHTMLTag_col) ||      mCurrentContext->IsCurrentContainer(eHTMLTag_colgroup)) {    nsCOMPtr<nsINodeInfo> nodeInfo;    result = mNodeInfoManager->GetNodeInfo(nsHTMLAtoms::form, nsnull,                                           kNameSpaceID_None,                                           *getter_AddRefs(nodeInfo));    NS_ENSURE_SUCCESS(result, result);    nsCOMPtr<nsIHTMLContent> content;    result = NS_NewHTMLFormElement(getter_AddRefs(content), nodeInfo);    NS_ENSURE_SUCCESS(result, result);    mCurrentForm = do_QueryInterface(content);    result = AddLeaf(aNode);  } else {    mFlags |= NS_SINK_FLAG_FORM_ON_STACK;    // Otherwise the form can be a content parent.    result = mCurrentContext->OpenContainer(aNode);    if (NS_SUCCEEDED(result)) {      nsCOMPtr<nsIHTMLContent> content =        dont_AddRef(mCurrentContext->GetCurrentContainer());      mCurrentForm = do_QueryInterface(content);    }  }  MOZ_TIMER_DEBUGLOG(("Stop: nsHTMLContentSink::OpenForm()\n"));  MOZ_TIMER_STOP(mWatch);  return result;}