nsCOMPtr<nsIPresShell> presShell; presContext->GetShell(getter_AddRefs(presShell)); if (presShell) { nsFormEvent event; event.eventStructType = NS_FORM_EVENT; event.message         = NS_FORM_RESET; event.originator      = nsnull; nsEventStatus status  = nsEventStatus_eIgnore; presShell->HandleEventWithTarget(&event, nsnull, this, NS_EVENT_FLAG_INIT, &status); }
nsFormEvent event; event.eventStructType = NS_FORM_EVENT; event.message         = NS_FORM_RESET; event.originator      = nsnull; nsEventStatus status  = nsEventStatus_eIgnore; HandleDOMEvent(presContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
nsHTMLFormElement::Reset(){  // Send the reset event  nsresult rv = NS_OK;  nsCOMPtr<nsIPresContext> presContext;  GetPresContext(this, getter_AddRefs(presContext));  if (presContext) {    nsCOMPtr<nsIPresShell> presShell;    presContext->GetShell(getter_AddRefs(presShell));    if (presShell) {      nsFormEvent event;      event.eventStructType = NS_FORM_EVENT;      event.message         = NS_FORM_RESET;      event.originator      = nsnull;      nsEventStatus status  = nsEventStatus_eIgnore;      presShell->HandleEventWithTarget(&event, nsnull, this,                                       NS_EVENT_FLAG_INIT, &status);    }  }  return rv;}