const nsString& aValue,
const nsAReadableString& aValue,
nsHTMLInputElement::StringToAttribute(nsIAtom* aAttribute,                                      const nsString& aValue,                                      nsHTMLValue& aResult){  if (aAttribute == nsHTMLAtoms::type) {    nsGenericHTMLElement::EnumTable *table = kInputTypeTable;    while (nsnull != table->tag) {       if (aValue.EqualsIgnoreCase(table->tag)) {        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 (nsGenericHTMLElement::ParseValueOrPercent(aValue, aResult,                                                  eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }   else if (aAttribute == nsHTMLAtoms::height) {    if (nsGenericHTMLElement::ParseValueOrPercent(aValue, aResult,                                                  eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }   else if (aAttribute == nsHTMLAtoms::maxlength) {    if (nsGenericHTMLElement::ParseValue(aValue, 0, aResult, eHTMLUnit_Integer)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::size) {    if (nsGenericHTMLElement::ParseValue(aValue, 0, aResult, eHTMLUnit_Integer)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::tabindex) {    if (nsGenericHTMLElement::ParseValue(aValue, 0, aResult, eHTMLUnit_Integer)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::border) {    if (nsGenericHTMLElement::ParseValue(aValue, 0, aResult, eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }   else if (aAttribute == nsHTMLAtoms::align) {    if (nsGenericHTMLElement::ParseAlignValue(aValue, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (IsImage()) {    if (nsGenericHTMLElement::ParseImageAttribute(aAttribute,                                                  aValue, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  return NS_CONTENT_ATTR_NOT_THERE;}