NS_METHOD GetAttribute(const nsAReadableString& aName, nsAWritableString& aReturn) { return nsGenericElement::GetAttribute(aName, aReturn);
nsGenericHTMLElement::GetAttribute(nsIAtom *aAttribute, nsString &aResult) const { nsHTMLValue value; nsresult result = GetAttribute(aAttribute, value);  char cbuf[20]; nscolor color; if (NS_CONTENT_ATTR_HAS_VALUE == result) {  if (NS_CONTENT_ATTR_HAS_VALUE == mContent->AttributeToString(aAttribute, value, aResult)) { return result; }   switch (value.GetUnit()) { case eHTMLUnit_Empty: aResult.Truncate(); break;  case eHTMLUnit_String: case eHTMLUnit_Null: value.GetStringValue(aResult); break;  case eHTMLUnit_Integer: aResult.Truncate(); aResult.Append(value.GetIntValue(), 10); break;  case eHTMLUnit_Pixel: aResult.Truncate(); aResult.Append(value.GetPixelValue(), 10); break;  case eHTMLUnit_Percent: aResult.Truncate(0); aResult.Append(PRInt32(value.GetPercentValue() * 100.0f), 10); aResult.Append('%'); break;  case eHTMLUnit_Color: color = nscolor(value.GetColorValue()); PR_snprintf(cbuf, sizeof(cbuf), "#%02x%02x%02x", NS_GET_R(color), NS_GET_G(color), NS_GET_B(color)); aResult.Truncate(0); aResult.Append(cbuf); break;  default: case eHTMLUnit_Enumerated: NS_NOTREACHED("no default enumerated value to string conversion"); result = NS_CONTENT_ATTR_NOT_THERE; break; }
  NS_METHOD GetAttribute(const nsAReadableString& aName,                         nsAWritableString& aReturn)   {    return nsGenericElement::GetAttribute(aName, aReturn);  }