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:
hyatt%netscape.com
2000-03-13 13:05:46 +00:00
parent 506dd5cf36
commit 3031fc5564
2 changed files with 10 additions and 0 deletions

View File

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

View File

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