nsCOMPtr<nsIDocument> doc(mDocument); if (!doc) { mNodeInfo->GetDocument(getter_AddRefs(doc)); } if (aResult.ParseColor(aValue, doc)) {
if (aResult.ParseColor(aValue, nsGenericHTMLContainerElement::GetOwnerDocument())) {
nsHTMLTableSectionElement::StringToAttribute(nsIAtom* aAttribute,                                             const nsAString& aValue,                                             nsHTMLValue& aResult){  /* ignore these attributes, stored simply as strings     ch   */  /* attributes that resolve to integers */  if (aAttribute == nsHTMLAtoms::charoff) {    if (aResult.ParseIntWithBounds(aValue, eHTMLUnit_Integer, 0)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::height) {    /* attributes that resolve to integers or percents */    if (aResult.ParseSpecialIntValue(aValue, eHTMLUnit_Pixel, PR_TRUE, PR_FALSE)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::align) {    /* other attributes */    if (ParseTableCellHAlignValue(aValue, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::bgcolor) {    nsCOMPtr<nsIDocument> doc(mDocument);    if (!doc) {      mNodeInfo->GetDocument(getter_AddRefs(doc));    }    if (aResult.ParseColor(aValue, doc)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::valign) {    if (ParseTableVAlignValue(aValue, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  return NS_CONTENT_ATTR_NOT_THERE;}