nsCOMPtr<nsIDocument> doc(mDocument); if (!doc) { mNodeInfo->GetDocument(getter_AddRefs(doc)); } if (aResult.ParseColor(aValue, doc)) {
if (aResult.ParseColor(aValue, nsGenericHTMLLeafElement::GetOwnerDocument())) {
nsHTMLFrameElement::StringToAttribute(nsIAtom* aAttribute,                                      const nsAString& aValue,                                      nsHTMLValue& aResult){  if (aAttribute == nsHTMLAtoms::bordercolor) {    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::frameborder) {    if (ParseFrameborderValue(aValue, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::marginwidth) {    if (aResult.ParseSpecialIntValue(aValue, eHTMLUnit_Pixel, PR_TRUE, PR_FALSE)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::marginheight) {    if (aResult.ParseSpecialIntValue(aValue, eHTMLUnit_Pixel, PR_TRUE, PR_FALSE)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  else if (aAttribute == nsHTMLAtoms::noresize) {    aResult.SetEmptyValue();    return NS_CONTENT_ATTR_HAS_VALUE;  }  else if (aAttribute == nsHTMLAtoms::scrolling) {    if (ParseScrollingValue(aValue, aResult)) {      return NS_CONTENT_ATTR_HAS_VALUE;    }  }  return NS_CONTENT_ATTR_NOT_THERE;}