!(aFlags & NS_EVENT_FLAG_CAPTURE)) {
!(aFlags & NS_EVENT_FLAG_CAPTURE) && !(aFlags & NS_EVENT_FLAG_SYSTEM_EVENT)) {
nsHTMLFormElement::HandleDOMEvent(nsIPresContext* aPresContext,                                  nsEvent* aEvent,                                  nsIDOMEvent** aDOMEvent,                                  PRUint32 aFlags,                                  nsEventStatus* aEventStatus){  NS_ENSURE_ARG_POINTER(aEvent);  // If this is the bubble stage, there is a nested form below us which received  // a submit event.  We do *not* want to handle the submit event for this form  // too.  So to avert a disaster, we stop the bubbling altogether.  if ((aFlags & NS_EVENT_FLAG_BUBBLE) &&      (aEvent->message == NS_FORM_RESET || aEvent->message == NS_FORM_SUBMIT)) {    return NS_OK;  }  // Ignore recursive calls to submit and reset  if (aEvent->message == NS_FORM_SUBMIT) {    if (mGeneratingSubmit) {      return NS_OK;    }    mGeneratingSubmit = PR_TRUE;  }  else if (aEvent->message == NS_FORM_RESET) {    if (mGeneratingReset) {      return NS_OK;    }    mGeneratingReset = PR_TRUE;  }  nsresult rv = nsGenericHTMLContainerElement::HandleDOMEvent(aPresContext,                                                              aEvent,                                                              aDOMEvent,                                                              aFlags,                                                              aEventStatus);  if (NS_SUCCEEDED(rv) && (*aEventStatus == nsEventStatus_eIgnore) &&      !(aFlags & NS_EVENT_FLAG_CAPTURE)) {    switch (aEvent->message) {      case NS_FORM_RESET:      case NS_FORM_SUBMIT:      {        rv = DoSubmitOrReset(aPresContext, aEvent, aEvent->message);      }      break;    }  }  if (aEvent->message == NS_FORM_SUBMIT) {    mGeneratingSubmit = PR_FALSE;  }  else if (aEvent->message == NS_FORM_RESET) {    mGeneratingReset = PR_FALSE;  }  return rv;}