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:
@@ -762,10 +762,14 @@ PRBool
|
||||
nsFormControlFrame::IsSuccessful(nsIFormControlFrame* aSubmitter)
|
||||
{
|
||||
nsAutoString name;
|
||||
PRBool disabled = PR_FALSE;
|
||||
nsFormControlHelper::GetDisabled(mContent, &disabled);
|
||||
|
||||
// Since JS Submit() calls are not linked to an element, aSubmitter is null.
|
||||
// Return success to allow the call to go through.
|
||||
if (aSubmitter == nsnull) return PR_TRUE;
|
||||
return (NS_CONTENT_ATTR_HAS_VALUE == GetName(&name));
|
||||
|
||||
return !disabled && (NS_CONTENT_ATTR_HAS_VALUE == GetName(&name));
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
|
||||
Reference in New Issue
Block a user