aBuffer.Append(aValue.GetFloatValue() * 100.0f);
aBuffer.Append(aValue.GetPercentValue() * 100.0f);
void ValueToString(const nsCSSValue& aValue, PRInt32 aPropID, nsString& aBuffer){  nsCSSUnit unit = aValue.GetUnit();  if (eCSSUnit_Null == unit) {    return;  }  if (eCSSUnit_String == unit) {    nsAutoString  buffer;    aValue.GetStringValue(buffer);    aBuffer.Append(buffer);  }  else if (eCSSUnit_Integer == unit) {    aBuffer.Append(aValue.GetIntValue(), 10);  }  else if (eCSSUnit_Enumerated == unit) {    const char* name = nsCSSProps::LookupProperty(aPropID, aValue.GetIntValue());    if (name != nsnull) {      aBuffer.Append(name);    }  }  else if (eCSSUnit_Color == unit){    nscolor color = aValue.GetColorValue();    const char* name = RGBToCSSString(color);    if (name != nsnull)      aBuffer.Append(name);    else    {      aBuffer.Append("rgb(");      aBuffer.Append(NS_GET_R(color), 10);      aBuffer.Append(",");      aBuffer.Append(NS_GET_G(color), 10);      aBuffer.Append(",");      aBuffer.Append(NS_GET_B(color), 10);      aBuffer.Append(')');    }  }  else if (eCSSUnit_Percent == unit) {    aBuffer.Append(aValue.GetFloatValue() * 100.0f);  }  else if (eCSSUnit_Percent < unit) {  // length unit    aBuffer.Append(aValue.GetFloatValue());  }  switch (unit) {    case eCSSUnit_Null:       break;    case eCSSUnit_Auto:       aBuffer.Append("auto"); break;    case eCSSUnit_Inherit:    aBuffer.Append("inherit"); break;    case eCSSUnit_None:       aBuffer.Append("none"); break;    case eCSSUnit_Normal:     aBuffer.Append("normal"); break;    case eCSSUnit_String:     break;    case eCSSUnit_Integer:    break;    case eCSSUnit_Enumerated: break;    case eCSSUnit_Color:      break;    case eCSSUnit_Percent:    aBuffer.Append("%");    break;    case eCSSUnit_Number:     break;    case eCSSUnit_Inch:       aBuffer.Append("in");   break;    case eCSSUnit_Foot:       aBuffer.Append("ft");   break;    case eCSSUnit_Mile:       aBuffer.Append("mi");   break;    case eCSSUnit_Millimeter: aBuffer.Append("mm");   break;    case eCSSUnit_Centimeter: aBuffer.Append("cm");   break;    case eCSSUnit_Meter:      aBuffer.Append("m");    break;    case eCSSUnit_Kilometer:  aBuffer.Append("km");   break;    case eCSSUnit_Point:      aBuffer.Append("pt");   break;    case eCSSUnit_Pica:       aBuffer.Append("pc");   break;    case eCSSUnit_Didot:      aBuffer.Append("dt");   break;    case eCSSUnit_Cicero:     aBuffer.Append("cc");   break;    case eCSSUnit_EM:         aBuffer.Append("em");   break;    case eCSSUnit_EN:         aBuffer.Append("en");   break;    case eCSSUnit_XHeight:    aBuffer.Append("ex");   break;    case eCSSUnit_CapHeight:  aBuffer.Append("cap");  break;    case eCSSUnit_Pixel:      aBuffer.Append("px");   break;  }}