else if (aAttribute == nsHTMLAtoms::hspace) { if (nsGenericHTMLElement::ParseValue(aValue, 0, aResult, eHTMLUnit_Pixel)) { return NS_CONTENT_ATTR_HAS_VALUE; } } else if (aAttribute == nsHTMLAtoms::vspace) { if (nsGenericHTMLElement::ParseValue(aValue, 0, aResult, eHTMLUnit_Pixel)) { return NS_CONTENT_ATTR_HAS_VALUE; } }
nsHTMLTableElement::StringToAttribute(nsIAtom* aAttribute,                                      const nsString& aValue,                                      nsHTMLValue& aResult){  /* ignore summary, just a string */  /* attributes that resolve to pixels, with min=0 */  if ((aAttribute == nsHTMLAtoms::cellspacing) ||      (aAttribute == nsHTMLAtoms::cellpadding)) {    if (nsGenericHTMLElement::ParseValueOrPercent(aValue, aResult, eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  /* attributes that are either empty, or integers, with min=0 */  else if (aAttribute == nsHTMLAtoms::cols) {    if (nsGenericHTMLElement::ParseValue(aValue, 0, aResult, eHTMLUnit_Integer)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  /* attributes that are either empty, or pixels */  else if (aAttribute == nsHTMLAtoms::border) {    PRInt32 min = (aValue.IsEmpty()) ? 1 : 0;    if (nsGenericHTMLElement::ParseValue(aValue, min, aResult, eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }    else {       // XXX this should really be NavQuirks only to allow non numeric value      aResult.SetPixelValue(1);      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  /* attributes that resolve to integers or percents */  else if (aAttribute == nsHTMLAtoms::height) {    if (nsGenericHTMLElement::ParseValueOrPercent(aValue, aResult, eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  /* attributes that resolve to integers or percents or proportions */  else if (aAttribute == nsHTMLAtoms::width) {    if (nsGenericHTMLElement::ParseValueOrPercentOrProportional(aValue, aResult, eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  /* other attributes */  else if (aAttribute == nsHTMLAtoms::align) {    if (mInner.ParseTableHAlignValue(aValue, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::bgcolor) {    if (nsGenericHTMLElement::ParseColor(aValue, mInner.mDocument, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::bordercolor) {    if (nsGenericHTMLElement::ParseColor(aValue, mInner.mDocument, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::frame) {    if (nsGenericHTMLElement::ParseEnumValue(aValue, kFrameTable, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::layout) {    if (nsGenericHTMLElement::ParseEnumValue(aValue, kLayoutTable, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::rules) {    if (nsGenericHTMLElement::ParseEnumValue(aValue, kRulesTable, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  return NS_CONTENT_ATTR_NOT_THERE;}