Index: Source/core/css/CSSFilterValue.cpp |
diff --git a/Source/core/css/CSSFilterValue.cpp b/Source/core/css/CSSFilterValue.cpp |
index 0bde847c406e39246bdf7fceeec4a6dcd44d254c..2ef89c255b7d7dbc58130c3b553fcd4956853178 100644 |
--- a/Source/core/css/CSSFilterValue.cpp |
+++ b/Source/core/css/CSSFilterValue.cpp |
@@ -26,7 +26,7 @@ |
#include "config.h" |
#include "core/css/CSSFilterValue.h" |
-#include "wtf/text/WTFString.h" |
+#include "wtf/text/StringBuilder.h" |
namespace WebCore { |
@@ -38,46 +38,48 @@ CSSFilterValue::CSSFilterValue(FilterOperationType operationType) |
String CSSFilterValue::customCSSText() const |
{ |
- String result; |
+ StringBuilder result; |
switch (m_type) { |
case ReferenceFilterOperation: |
- result = "url("; |
+ result.append("url("); |
break; |
case GrayscaleFilterOperation: |
- result = "grayscale("; |
+ result.append("grayscale("); |
break; |
case SepiaFilterOperation: |
- result = "sepia("; |
+ result.append("sepia("); |
break; |
case SaturateFilterOperation: |
- result = "saturate("; |
+ result.append("saturate("); |
break; |
case HueRotateFilterOperation: |
- result = "hue-rotate("; |
+ result.append("hue-rotate("); |
break; |
case InvertFilterOperation: |
- result = "invert("; |
+ result.append("invert("); |
break; |
case OpacityFilterOperation: |
- result = "opacity("; |
+ result.append("opacity("); |
break; |
case BrightnessFilterOperation: |
- result = "brightness("; |
+ result.append("brightness("); |
break; |
case ContrastFilterOperation: |
- result = "contrast("; |
+ result.append("contrast("); |
break; |
case BlurFilterOperation: |
- result = "blur("; |
+ result.append("blur("); |
break; |
case DropShadowFilterOperation: |
- result = "drop-shadow("; |
+ result.append("drop-shadow("); |
break; |
default: |
break; |
} |
- return result + CSSValueList::customCSSText() + ")"; |
+ result.append(CSSValueList::customCSSText()); |
+ result.append(')'); |
+ return result.toString(); |
} |
CSSFilterValue::CSSFilterValue(const CSSFilterValue& cloneFrom) |