if (NS_SUCCEEDED(result) && mCurrentContext->IsCurrentContainer(eHTMLTag_form)) {
if (mCurrentContext->IsCurrentContainer(eHTMLTag_form)) { mCurrentContext->FlushTextAndRelease();
HTMLContentSink::CloseForm(){  MOZ_TIMER_DEBUGLOG(("Start: nsHTMLContentSink::CloseForm()\n"));  MOZ_TIMER_START(mWatch);  nsresult result = NS_OK;  SINK_TRACE_NODE(SINK_TRACE_CALLS,                  "HTMLContentSink::CloseForm",                  eHTMLTag_form,                  mCurrentContext->mStackPos - 1,                   this);  if (mCurrentForm) {    // If there is a <p> tag on the container stack, close it    if (mCurrentContext->IsCurrentContainer(eHTMLTag_p)) {      result = mCurrentContext->CloseContainer(eHTMLTag_p);    }        // if this is a well-formed form, close it too    if (NS_SUCCEEDED(result) &&        mCurrentContext->IsCurrentContainer(eHTMLTag_form)) {      result = mCurrentContext->CloseContainer(eHTMLTag_form);      mFlags &= ~NS_SINK_FLAG_FORM_ON_STACK;    }    mCurrentForm = nsnull;  }  MOZ_TIMER_DEBUGLOG(("Stop: nsHTMLContentSink::CloseForm()\n"));  MOZ_TIMER_STOP(mWatch);  return result;}