if (ParseValue(aValue, 0, aResult, eHTMLUnit_Integer)) {
if (aResult.ParseIntWithBounds(aValue, eHTMLUnit_Integer, 0)) {
nsHTMLInputElement::StringToAttribute(nsIAtom* aAttribute,                                      const nsAString& aValue,                                      nsHTMLValue& aResult){  if (aAttribute == nsHTMLAtoms::type) {    nsGenericHTMLElement::EnumTable *table = kInputTypeTable;    nsAutoString valueStr(aValue);    while (nsnull != table->tag) {       if (valueStr.EqualsIgnoreCase(table->tag)) {        // If the type is being changed to file, set the element value        // to the empty string. This is for security.        if (table->value == NS_FORM_INPUT_FILE) {          SetValue(NS_LITERAL_STRING(""));        }        aResult.SetIntValue(table->value, eHTMLUnit_Enumerated);        mType = table->value;  // set the type of this input        return NS_CONTENT_ATTR_HAS_VALUE;      }      table++;    }  }  else if (aAttribute == nsHTMLAtoms::checked) {    aResult.SetEmptyValue();    return NS_CONTENT_ATTR_HAS_VALUE;  }  else if (aAttribute == nsHTMLAtoms::disabled) {    aResult.SetEmptyValue();    return NS_CONTENT_ATTR_HAS_VALUE;  }  else if (aAttribute == nsHTMLAtoms::readonly) {    aResult.SetEmptyValue();    return NS_CONTENT_ATTR_HAS_VALUE;  }  else if (aAttribute == nsHTMLAtoms::width) {    if (ParseValueOrPercent(aValue, aResult, eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::height) {    if (ParseValueOrPercent(aValue, aResult, eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::maxlength) {    if (ParseValue(aValue, 0, aResult, eHTMLUnit_Integer)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::size) {    if (mType == NS_FORM_INPUT_TEXT ||        mType == NS_FORM_INPUT_PASSWORD) {      if (ParseValue(aValue, 0, aResult, eHTMLUnit_Integer)) {        return NS_CONTENT_ATTR_HAS_VALUE;      }    }    else {      if (ParseValue(aValue, 0, aResult, eHTMLUnit_Pixel)) {        return NS_CONTENT_ATTR_HAS_VALUE;      }    }  }  else if (aAttribute == nsHTMLAtoms::tabindex) {    if (ParseValue(aValue, 0, aResult, eHTMLUnit_Integer)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::border) {    if (ParseValue(aValue, 0, aResult, eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::align) {    if (ParseAlignValue(aValue, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (IsImage()) {    if (ParseImageAttribute(aAttribute, aValue, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  return NS_CONTENT_ATTR_NOT_THERE;}