formContent->HandleDOMEvent(aPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
nsCOMPtr<nsIPresShell> shell; nsresult result = aPresContext->GetShell(getter_AddRefs(shell)); if (NS_SUCCEEDED(result) && shell) { shell->HandleDOMEventWithTarget(formContent, &event, &status); }
nsImageControlFrame::MouseClicked(nsIPresContext* aPresContext) {  PRInt32 type;  GetType(&type);  if ((nsnull != mFormFrame) && !nsFormFrame::GetDisabled(this)) {    nsIContent *formContent = nsnull;    mFormFrame->GetContent(&formContent);    nsEventStatus status;    nsEvent event;    event.eventStructType = NS_EVENT;    event.message = NS_FORM_SUBMIT;    if (nsnull != formContent) {      formContent->HandleDOMEvent(aPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);       NS_RELEASE(formContent);    }    if (nsEventStatus_eConsumeNoDefault != status) {      mFormFrame->OnSubmit(aPresContext, this);    }  } }