Fix for bug #11717. Check in Ok'ed by cyeh@netscape.com

Don't do the super class'es IsSuccessful because it always returns PR_FALSE
because the (this) pointer is not equal to the submitter.
This commit is contained in:
kmcclusk%netscape.com 1999-08-12 22:06:09 +00:00
parent f2284ad072
commit e38d06108e
2 changed files with 8 additions and 2 deletions

View File

@ -38,7 +38,10 @@ nsGfxButtonControlFrame::IsSuccessful(nsIFormControlFrame* aSubmitter)
PRInt32 type;
GetType(&type);
if ((NS_FORM_INPUT_HIDDEN == type) || (this == aSubmitter)) {
return nsHTMLButtonControlFrame::IsSuccessful(aSubmitter);
// Can not use the nsHTMLButtonControlFrame::IsSuccessful because
// it will fail it's test of (this==aSubmitter)
nsAutoString name;
return (NS_CONTENT_ATTR_HAS_VALUE == GetName(&name));
} else {
return PR_FALSE;
}

View File

@ -38,7 +38,10 @@ nsGfxButtonControlFrame::IsSuccessful(nsIFormControlFrame* aSubmitter)
PRInt32 type;
GetType(&type);
if ((NS_FORM_INPUT_HIDDEN == type) || (this == aSubmitter)) {
return nsHTMLButtonControlFrame::IsSuccessful(aSubmitter);
// Can not use the nsHTMLButtonControlFrame::IsSuccessful because
// it will fail it's test of (this==aSubmitter)
nsAutoString name;
return (NS_CONTENT_ATTR_HAS_VALUE == GetName(&name));
} else {
return PR_FALSE;
}