PRInt32 type; GetType(&type); if (type == NS_FORM_INPUT_RADIO) { nsAutoString value(NS_LITERAL_STRING("0"));    nsIFormControlFrame* formControlFrame = GetFormControlFrame(PR_FALSE);  if (formControlFrame) { formControlFrame->GetProperty(nsHTMLAtoms::checked, value); } else {  nsCOMPtr<nsIPresState> presState; GetPrimaryPresState(this, getter_AddRefs(presState));   if (presState) { presState->GetStateProperty(NS_LITERAL_STRING("checked"), value); } }  if (value.Equals(NS_LITERAL_STRING("1"))) { *aChecked = PR_TRUE; } else { *aChecked = PR_FALSE; } } else { if (!GET_BOOLBIT(mBitField, BF_CHECKED_CHANGED)) { GetDefaultChecked(aChecked); } else { *aChecked = GET_BOOLBIT(mBitField, BF_CHECKED); } }
*aChecked = GET_BOOLBIT(mBitField, BF_CHECKED);
nsHTMLInputElement::GetChecked(PRBool* aChecked){  PRInt32 type;  GetType(&type);  if (type == NS_FORM_INPUT_RADIO) {    nsAutoString value(NS_LITERAL_STRING("0"));    // No need to flush here, if there's no frame created for this input    // yet, we know our own checked state.    nsIFormControlFrame* formControlFrame = GetFormControlFrame(PR_FALSE);    if (formControlFrame) {      formControlFrame->GetProperty(nsHTMLAtoms::checked, value);    }    else {      // Retrieve the presentation state instead.      nsCOMPtr<nsIPresState> presState;      GetPrimaryPresState(this, getter_AddRefs(presState));      // Obtain the value property from the presentation state.      if (presState) {        presState->GetStateProperty(NS_LITERAL_STRING("checked"), value);      }    }    if (value.Equals(NS_LITERAL_STRING("1"))) {      *aChecked = PR_TRUE;    } else {      *aChecked = PR_FALSE;    }  } else {    if (!GET_BOOLBIT(mBitField, BF_CHECKED_CHANGED)) {      GetDefaultChecked(aChecked);    } else {      *aChecked = GET_BOOLBIT(mBitField, BF_CHECKED);    }  }  return NS_OK;}