Bug 41013: Prevent event passing from frames to content during document destruction r=joki

git-svn-id: svn://10.0.0.236/trunk@73495 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pollmann%netscape.com
2000-06-29 02:02:43 +00:00
parent 0e43b9fadb
commit ba1a3e50a6
10 changed files with 137 additions and 13 deletions

View File

@@ -375,6 +375,8 @@ nsImageControlFrame::GetName(nsString* aResult)
PRBool
nsImageControlFrame::IsSuccessful(nsIFormControlFrame* aSubmitter)
{
// Image control will only add it's value if it is clicked on.
// XXX Is this right?
return (this == (aSubmitter));
}
@@ -456,7 +458,11 @@ nsImageControlFrame::MouseClicked(nsIPresContext* aPresContext)
event.eventStructType = NS_EVENT;
event.message = NS_FORM_SUBMIT;
if (nsnull != formContent) {
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);
}
NS_RELEASE(formContent);
}
if (nsEventStatus_eConsumeNoDefault != status) {