else {  nsCOMPtr<nsIPresState> presState; nsGenericHTMLElement::GetPrimaryPresState(this, nsIStatefulFrame::eCheckboxType, getter_AddRefs(presState));   if (presState) { nsAutoString value; if (PR_TRUE == aValue) value = "1"; else value = "0"; presState->SetStateProperty("checked", value); } }
nsHTMLInputElement::SetChecked(PRBool aValue){  nsIFormControlFrame* formControlFrame = nsnull;  if (NS_OK == nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame)) {    nsIPresContext* presContext;    nsGenericHTMLElement::GetPresContext(this, &presContext);    if (PR_TRUE == aValue) {     formControlFrame->SetProperty(presContext, nsHTMLAtoms::checked, "1");    }    else {      formControlFrame->SetProperty(presContext, nsHTMLAtoms::checked, "0");    }    NS_IF_RELEASE(presContext);  }  return NS_OK;     }