GetDocument(*getter_AddRefs(doc));
GetDocument(getter_AddRefs(doc));
nsHTMLFormElement::DoSubmitOrReset(nsIPresContext* aPresContext,                                   nsEvent* aEvent,                                   PRInt32 aMessage){  NS_ENSURE_ARG_POINTER(aPresContext);  // Make sure the presentation is up-to-date  nsCOMPtr<nsIDocument> doc;  GetDocument(*getter_AddRefs(doc));  if (doc) {    doc->FlushPendingNotifications();  }  // JBK Don't get form frames anymore - bug 34297  // Submit or Reset the form  nsresult rv = NS_OK;  if (NS_FORM_RESET == aMessage) {    rv = DoReset();  }  else if (NS_FORM_SUBMIT == aMessage) {    rv = DoSubmit(aPresContext, aEvent);  }  return rv;}