Fixing nsbeta2+ bug #35321 (button.setAttribute('disabled', false) disables button instead of enabling it).
git-svn-id: svn://10.0.0.236/trunk@70241 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2cbc1dcd1a
commit
05b84c1c86
@ -3464,8 +3464,13 @@ nsGenericHTMLContainerFormElement::SetAttribute(PRInt32 aNameSpaceID, nsIAtom* a
|
||||
// Add the control to the hash table
|
||||
nsCOMPtr<nsIFormControl> control;
|
||||
control = do_QueryInterface(mContent);
|
||||
if (mForm && (nsHTMLAtoms::name == aName || nsHTMLAtoms::id == aName))
|
||||
if (mForm && (nsHTMLAtoms::name == aName || nsHTMLAtoms::id == aName)) {
|
||||
mForm->AddElementToTable(control, aValue);
|
||||
} else if (nsHTMLAtoms::disabled == aName &&
|
||||
mNodeInfo->Equals(nsHTMLAtoms::button) &&
|
||||
aValue.EqualsWithConversion("false", PR_TRUE)) {
|
||||
return nsGenericHTMLElement::UnsetAttribute(aNameSpaceID, aName, aNotify);
|
||||
}
|
||||
|
||||
return nsGenericHTMLElement::SetAttribute(aNameSpaceID, aName, aValue, aNotify);
|
||||
}
|
||||
|
||||
@ -3464,8 +3464,13 @@ nsGenericHTMLContainerFormElement::SetAttribute(PRInt32 aNameSpaceID, nsIAtom* a
|
||||
// Add the control to the hash table
|
||||
nsCOMPtr<nsIFormControl> control;
|
||||
control = do_QueryInterface(mContent);
|
||||
if (mForm && (nsHTMLAtoms::name == aName || nsHTMLAtoms::id == aName))
|
||||
if (mForm && (nsHTMLAtoms::name == aName || nsHTMLAtoms::id == aName)) {
|
||||
mForm->AddElementToTable(control, aValue);
|
||||
} else if (nsHTMLAtoms::disabled == aName &&
|
||||
mNodeInfo->Equals(nsHTMLAtoms::button) &&
|
||||
aValue.EqualsWithConversion("false", PR_TRUE)) {
|
||||
return nsGenericHTMLElement::UnsetAttribute(aNameSpaceID, aName, aNotify);
|
||||
}
|
||||
|
||||
return nsGenericHTMLElement::SetAttribute(aNameSpaceID, aName, aValue, aNotify);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user