Bug 50143: All radio buttons should be unchecked before checking new one when restoring frame state r=jst@netscape.com

This commit is contained in:
pollmann%netscape.com 2000-08-31 00:59:31 +00:00
parent 3d8b2da92b
commit 80059f709d
2 changed files with 2 additions and 8 deletions

View File

@ -402,12 +402,9 @@ nsGfxRadioControlFrame::RestoreState(nsIPresContext* aPresContext, nsIPresState*
mIsRestored = PR_TRUE;
nsAutoString string;
aState->GetStateProperty(NS_ConvertASCIItoUCS2("checked"), string);
PRBool state = (string.EqualsWithConversion(NS_STRING_TRUE)) ? PR_TRUE : PR_FALSE;
SetRadioState(aPresContext, state); // sets mChecked
SetProperty(aPresContext, nsHTMLAtoms::checked, string);
mRestoredChecked = mChecked;
return NS_OK;
}

View File

@ -402,12 +402,9 @@ nsGfxRadioControlFrame::RestoreState(nsIPresContext* aPresContext, nsIPresState*
mIsRestored = PR_TRUE;
nsAutoString string;
aState->GetStateProperty(NS_ConvertASCIItoUCS2("checked"), string);
PRBool state = (string.EqualsWithConversion(NS_STRING_TRUE)) ? PR_TRUE : PR_FALSE;
SetRadioState(aPresContext, state); // sets mChecked
SetProperty(aPresContext, nsHTMLAtoms::checked, string);
mRestoredChecked = mChecked;
return NS_OK;
}