Fixed a bug with percent values being converted to strings
git-svn-id: svn://10.0.0.236/trunk@9786 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2196,7 +2196,8 @@ static const char* RGBToCSSString(nscolor aColor)
|
||||
}
|
||||
|
||||
|
||||
void ValueToString(const nsCSSValue& aValue, PRInt32 aPropID, nsString& aBuffer)
|
||||
static void
|
||||
ValueToString(const nsCSSValue& aValue, PRInt32 aPropID, nsString& aBuffer)
|
||||
{
|
||||
nsCSSUnit unit = aValue.GetUnit();
|
||||
|
||||
@@ -2236,7 +2237,7 @@ void ValueToString(const nsCSSValue& aValue, PRInt32 aPropID, nsString& aBuffer)
|
||||
}
|
||||
}
|
||||
else if (eCSSUnit_Percent == unit) {
|
||||
aBuffer.Append(aValue.GetFloatValue() * 100.0f);
|
||||
aBuffer.Append(aValue.GetPercentValue() * 100.0f);
|
||||
}
|
||||
else if (eCSSUnit_Percent < unit) { // length unit
|
||||
aBuffer.Append(aValue.GetFloatValue());
|
||||
|
||||
Reference in New Issue
Block a user