handling disabled case for checkboxes and radios.
git-svn-id: svn://10.0.0.236/trunk@62761 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -148,6 +148,11 @@ nsXULCheckboxElement::GetChecked(PRBool* aChecked)
|
||||
NS_IMETHODIMP
|
||||
nsXULCheckboxElement::SetChecked(PRBool aChecked)
|
||||
{
|
||||
PRBool disabled;
|
||||
GetDisabled(&disabled);
|
||||
if (disabled)
|
||||
return NS_OK;
|
||||
|
||||
if(aChecked)
|
||||
mOuter->SetAttribute("checked", "true");
|
||||
else
|
||||
|
||||
@@ -83,6 +83,11 @@ nsXULRadioGroupElement::GetSelectedItem(nsIDOMXULRadioElement** aResult)
|
||||
NS_IMETHODIMP
|
||||
nsXULRadioGroupElement::SetSelectedItem(nsIDOMXULRadioElement* aItem)
|
||||
{
|
||||
PRBool disabled;
|
||||
aItem->GetDisabled(&disabled);
|
||||
if (disabled)
|
||||
return NS_OK;
|
||||
|
||||
if (mSelectedItem)
|
||||
mSelectedItem->SetChecked(PR_FALSE);
|
||||
mSelectedItem = aItem;
|
||||
|
||||
Reference in New Issue
Block a user