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
Родитель c65395e0b9
Коммит 22c7e0a93e
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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;
}