else if (value.GetUnit() == eHTMLUnit_Integer) {
else if (value.GetUnit() == eHTMLUnit_Integer && mType != NS_FORM_INPUT_TEXT && mType != NS_FORM_INPUT_PASSWORD) {
nsHTMLInputElement::AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,                                 const nsAString* aValue,                                 PRBool aNotify){  //  // When name or type changes, radio should be added to radio group.  // (type changes are handled in the form itself currently)  // If the parser is not done creating the radio, we also should not do it.  //  if ((aName == nsHTMLAtoms::name || (aName == nsHTMLAtoms::type && !mForm)) &&      mType == NS_FORM_INPUT_RADIO &&      (mForm || !(GET_BOOLBIT(mBitField, BF_PARSER_CREATING)))) {    AddedToRadioGroup();  }  //  // Some elements have to change their value when the value and checked  // attributes change (but they only do so when ValueChanged() and  // CheckedChanged() are false--i.e. the value has not been changed by the  // user or by JS)  //  // We only really need to call reset for the value so that the text control  // knows the new value.  No other reason.  //  if (aName == nsHTMLAtoms::value &&      !GET_BOOLBIT(mBitField, BF_VALUE_CHANGED) &&      (mType == NS_FORM_INPUT_TEXT ||       mType == NS_FORM_INPUT_PASSWORD ||       mType == NS_FORM_INPUT_FILE)) {    Reset();  }  //  // Checked must be set no matter what type of control it is, since  // GetChecked() must reflect the new value  //  if (aName == nsHTMLAtoms::checked &&      !GET_BOOLBIT(mBitField, BF_CHECKED_CHANGED)) {    // Delay setting checked if the parser is creating this element (wait until    // everything is set)    if (GET_BOOLBIT(mBitField, BF_PARSER_CREATING)) {      SET_BOOLBIT(mBitField, BF_SHOULD_INIT_CHECKED, PR_TRUE);    } else {      PRBool defaultChecked;      GetDefaultChecked(&defaultChecked);      SetChecked(defaultChecked);      SetCheckedChanged(PR_FALSE);    }  }  if (aName == nsHTMLAtoms::type) {    // If we are changing type from File/Text/Passwd to other input types    // we need save the mValue into value attribute    if (mValue &&        mType != NS_FORM_INPUT_TEXT &&        mType != NS_FORM_INPUT_PASSWORD &&        mType != NS_FORM_INPUT_FILE) {      SetAttr(kNameSpaceID_None, nsHTMLAtoms::value,              NS_ConvertUTF8toUCS2(mValue), PR_FALSE);      if (mValue) {        nsMemory::Free(mValue);        mValue = nsnull;      }    }    // If the type of the input has changed we might need to change the type    // of the size attribute.    nsHTMLValue value;    if (NS_CONTENT_ATTR_HAS_VALUE ==        GetHTMLAttribute(nsHTMLAtoms::size, value)) {      if (value.GetUnit() == eHTMLUnit_Pixel &&          (mType == NS_FORM_INPUT_TEXT ||           mType == NS_FORM_INPUT_PASSWORD)) {        nsHTMLValue newValue(value.GetPixelValue(), eHTMLUnit_Integer);        SetHTMLAttribute(nsHTMLAtoms::size, newValue, PR_FALSE);      }      else if (value.GetUnit() == eHTMLUnit_Integer) {        nsHTMLValue newValue(value.GetIntValue(), eHTMLUnit_Pixel);        SetHTMLAttribute(nsHTMLAtoms::size, newValue, PR_FALSE);      }    }  }}