nsHTMLBodyElement::GetALink(nsAString& aAlinkColor) { nsresult rv = GetAttr(kNameSpaceID_None, nsHTMLAtoms::alink, aAlinkColor);    if (rv == NS_CONTENT_ATTR_NOT_THERE) { nsCOMPtr<nsIPresContext> context; GetPresContext(this, getter_AddRefs(context));  if (context) {   nscolor alinkColor; context->GetDefaultLinkColor(&alinkColor);  nsHTMLValue value(alinkColor); ColorToString(value, aAlinkColor); } }  return NS_OK; }
NS_IMPL_HTMLBODY_COLOR_ATTR(alink, ALink, LinkColor)
nsHTMLBodyElement::GetALink(nsAString& aAlinkColor){  nsresult rv = GetAttr(kNameSpaceID_None, nsHTMLAtoms::alink, aAlinkColor);  // If we don't have an attribute, find the default color from the  // UA stylesheet.  if (rv == NS_CONTENT_ATTR_NOT_THERE) {    nsCOMPtr<nsIPresContext> context;    GetPresContext(this, getter_AddRefs(context));    if (context) {      // XXX We don't have the backend or the UI to get ALINKs from the      // UA stylesheet yet, so we'll piggyback to the default link color like IE.      nscolor alinkColor;      context->GetDefaultLinkColor(&alinkColor);      nsHTMLValue value(alinkColor);      ColorToString(value, aAlinkColor);    }  }  return NS_OK;}