| Index: Source/core/css/CSSPrimitiveValue.cpp
|
| diff --git a/Source/core/css/CSSPrimitiveValue.cpp b/Source/core/css/CSSPrimitiveValue.cpp
|
| index eb350e7a9c08f786ef201246fcfdbbca73bcc720..f943d69746201186965eb760d05195a5f9ec7e5c 100644
|
| --- a/Source/core/css/CSSPrimitiveValue.cpp
|
| +++ b/Source/core/css/CSSPrimitiveValue.cpp
|
| @@ -1046,32 +1046,7 @@ String CSSPrimitiveValue::customCSSText(CSSTextFormattingFlags formattingFlag) c
|
| if (m_primitiveUnitType == CSS_PARSER_HEXCOLOR)
|
| Color::parseHexColor(m_value.string, rgbColor);
|
| Color color(rgbColor);
|
| -
|
| - StringBuilder result;
|
| - result.reserveCapacity(32);
|
| - bool colorHasAlpha = color.hasAlpha();
|
| - if (colorHasAlpha)
|
| - result.append("rgba(", 5);
|
| - else
|
| - result.append("rgb(", 4);
|
| -
|
| - result.appendNumber(static_cast<unsigned char>(color.red()));
|
| - result.append(", ", 2);
|
| -
|
| - result.appendNumber(static_cast<unsigned char>(color.green()));
|
| - result.append(", ", 2);
|
| -
|
| - result.appendNumber(static_cast<unsigned char>(color.blue()));
|
| - if (colorHasAlpha) {
|
| - result.append(", ", 2);
|
| -
|
| - NumberToStringBuffer buffer;
|
| - const char* alphaString = numberToFixedPrecisionString(color.alpha() / 255.0f, 6, buffer, true);
|
| - result.append(alphaString, strlen(alphaString));
|
| - }
|
| -
|
| - result.append(')');
|
| - text = result.toString();
|
| + text = color.serializedAsCSSComponentValue();
|
| break;
|
| }
|
| case CSS_FR:
|
|
|