if (ParseEnumValue(aValue, kRulesTable, aResult)) {
if (aResult.ParseEnumValue(aValue, kRulesTable)) {
nsHTMLTableElement::StringToAttribute(nsIAtom* aAttribute,                                      const nsAString& aValue,                                      nsHTMLValue& aResult){  /* ignore summary, just a string */  /* attributes that resolve to pixels, with min=0 */  if ((aAttribute == nsHTMLAtoms::cellspacing) ||      (aAttribute == nsHTMLAtoms::cellpadding)) {    if (ParseValueOrPercent(aValue, aResult, eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::cols) {    /* attributes that are either empty, or integers, with min=0 */    if (ParseValue(aValue, 0, aResult, eHTMLUnit_Integer)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::border) {    /* attributes that are either empty, or pixels */    PRInt32 min = (aValue.IsEmpty()) ? 1 : 0;    if (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;    }  }  else if (aAttribute == nsHTMLAtoms::height) {    /* attributes that resolve to integers or percents */    if (ParseValueOrPercent(aValue, aResult, eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::width) {    /* attributes that resolve to integers or percents or proportions */    if (ParseValueOrPercent(aValue, aResult, eHTMLUnit_Pixel)) {      // treat 0 width as auto      nsHTMLUnit unit = aResult.GetUnit();      if ((eHTMLUnit_Pixel == unit) && (0 == aResult.GetPixelValue())) {        return NS_CONTENT_ATTR_NOT_THERE;      }      else if ((eHTMLUnit_Integer == unit) && (0 == aResult.GetIntValue())) {        return NS_CONTENT_ATTR_NOT_THERE;      }      else if ((eHTMLUnit_Percent == unit) && (0.0f == aResult.GetPercentValue())) {        return NS_CONTENT_ATTR_NOT_THERE;      }      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::align) {    /* other attributes */    if (ParseTableHAlignValue(aValue, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::bgcolor) {    if (ParseColor(aValue, mDocument, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::bordercolor) {    if (ParseColor(aValue, mDocument, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::frame) {    if (ParseEnumValue(aValue, kFrameTable, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::layout) {    if (ParseEnumValue(aValue, kLayoutTable, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::rules) {    if (ParseEnumValue(aValue, kRulesTable, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::hspace) {    if (ParseValue(aValue, 0, aResult, eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::vspace) {    if (ParseValue(aValue, 0, aResult, eHTMLUnit_Pixel)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  return NS_CONTENT_ATTR_NOT_THERE;}