Bug 42662: Values of disabled form elements should not be submitted; r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@75557 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -41,14 +41,18 @@ nsGfxButtonControlFrame::IsSuccessful(nsIFormControlFrame* aSubmitter)
|
||||
{
|
||||
PRInt32 type;
|
||||
GetType(&type);
|
||||
PRBool successful = PR_TRUE;
|
||||
if ((NS_FORM_INPUT_HIDDEN == type) || (this == 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));
|
||||
PRBool disabled = PR_FALSE;
|
||||
nsFormControlHelper::GetDisabled(mContent, &disabled);
|
||||
successful = !disabled && (NS_CONTENT_ATTR_HAS_VALUE == GetName(&name));
|
||||
} else {
|
||||
return PR_FALSE;
|
||||
successful = PR_FALSE;
|
||||
}
|
||||
return successful;
|
||||
}
|
||||
|
||||
PRInt32
|
||||
|
||||
Reference in New Issue
Block a user