if (actionURI) { nsAutoString target; rv = GetTarget(target); NS_ENSURE_SUCCESS(rv, rv);     PRBool aCancelSubmit = PR_FALSE; rv = NotifySubmitObservers(actionURI, &aCancelSubmit); NS_ENSURE_SUCCESS(rv, rv);  if (!aCancelSubmit) {    rv = submission->SubmitTo(actionURI, target, this, aPresContext); }
if (!actionURI) { mIsSubmitting = PR_FALSE; return NS_OK;
nsHTMLFormElement::DoSubmit(nsIPresContext* aPresContext, nsEvent* aEvent){  nsIContent *originatingElement = nsnull;  // Get the originating frame (failure is non-fatal)  if (aEvent) {    if (NS_FORM_EVENT == aEvent->eventStructType) {      originatingElement = ((nsFormEvent *)aEvent)->originator;    }  }  //  // Get the submission object  //  nsCOMPtr<nsIFormSubmission> submission;  nsresult rv = GetSubmissionFromForm(this, aPresContext,                                      getter_AddRefs(submission));  NS_ENSURE_SUCCESS(rv, rv);  //  // Dump the data into the submission object  //  rv = WalkFormElements(submission, originatingElement);  NS_ENSURE_SUCCESS(rv, rv);  //  // Get the action and target  //  nsCOMPtr<nsIURI> actionURI;  rv = GetActionURL(getter_AddRefs(actionURI));  NS_ENSURE_SUCCESS(rv, rv);  if (actionURI) {    nsAutoString target;    rv = GetTarget(target);    NS_ENSURE_SUCCESS(rv, rv);    //    // Notify observers of submit    //    PRBool aCancelSubmit = PR_FALSE;    rv = NotifySubmitObservers(actionURI, &aCancelSubmit);    NS_ENSURE_SUCCESS(rv, rv);    if (!aCancelSubmit) {      //      // Submit      //      rv = submission->SubmitTo(actionURI, target, this, aPresContext);    }  }  return rv;}