nsIFormControlFrame* formControlFrame = GetFormControlFrame(PR_FALSE); if (formControlFrame) { nsCOMPtr<nsIPresContext> presContext; GetPresContext(this, getter_AddRefs(presContext));
nsCOMPtr<nsIPresContext> presContext; GetPresContext(this, getter_AddRefs(presContext));
nsHTMLInputElement::SetCheckedInternal(PRBool aChecked){  //  // Set the value  //  SET_BOOLBIT(mBitField, BF_CHECKED, aChecked);  //  // Notify the frame  //  // No need to flush here since if there's no frame for this input at  // this point we don't care about creating one, once it's created  // the frame will do the right thing.  //  PRInt32 type;  GetType(&type);  nsIFormControlFrame* formControlFrame = GetFormControlFrame(PR_FALSE);  if (formControlFrame) {    nsCOMPtr<nsIPresContext> presContext;    GetPresContext(this, getter_AddRefs(presContext));    if (type == NS_FORM_INPUT_CHECKBOX) {      nsICheckboxControlFrame* checkboxFrame = nsnull;      CallQueryInterface(formControlFrame, &checkboxFrame);      if (checkboxFrame) {        checkboxFrame->OnChecked(presContext, aChecked);      }      // These are frames.  You don't refcount frames.  Silly wabbit.    } else if (type == NS_FORM_INPUT_RADIO) {      nsIRadioControlFrame* radioFrame = nsnull;      CallQueryInterface(formControlFrame, &radioFrame);      if (radioFrame) {        radioFrame->OnChecked(presContext, aChecked);      }      // You don't refcount frames.    }  }  // Notify the document that the CSS :checked pseudoclass for this element  // has changed state.  if (mDocument)    mDocument->ContentStatesChanged(this, nsnull, nsCSSAtoms::checkedPseudo);  return NS_OK;}