diff options
author | Ben Murdoch <benm@google.com> | 2011-06-02 12:07:03 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-10 10:47:21 +0100 |
commit | 2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch) | |
tree | e4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp | |
parent | 87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff) | |
download | external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2 |
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp')
-rw-r--r-- | Source/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp b/Source/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp index 850ae14..097924b 100644 --- a/Source/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp +++ b/Source/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp @@ -40,6 +40,8 @@ #include "V8Binding.h" #include "V8Proxy.h" +#include <wtf/text/StringBuilder.h> +#include <wtf/text/StringConcatenate.h> #include <wtf/ASCIICType.h> #include <wtf/PassRefPtr.h> #include <wtf/RefPtr.h> @@ -107,8 +109,8 @@ static CSSPropertyInfo* cssPropertyInfo(v8::Handle<v8::String>v8PropertyName) if (!length) return 0; - Vector<UChar> name; - name.reserveCapacity(length); + StringBuilder builder; + builder.reserveCapacity(length); unsigned i = 0; @@ -123,23 +125,21 @@ static CSSPropertyInfo* cssPropertyInfo(v8::Handle<v8::String>v8PropertyName) } else if (hasCSSPropertyNamePrefix(propertyName, "webkit") || hasCSSPropertyNamePrefix(propertyName, "khtml") || hasCSSPropertyNamePrefix(propertyName, "apple")) - name.append('-'); + builder.append('-'); else if (WTF::isASCIIUpper(propertyName[0])) return 0; - name.append(WTF::toASCIILower(propertyName[i++])); + builder.append(WTF::toASCIILower(propertyName[i++])); for (; i < length; ++i) { UChar c = propertyName[i]; if (!WTF::isASCIIUpper(c)) - name.append(c); - else { - name.append('-'); - name.append(WTF::toASCIILower(c)); - } + builder.append(c); + else + builder.append(makeString('-', toASCIILower(c))); } - String propName = String::adopt(name); + String propName = builder.toString(); int propertyID = cssPropertyID(propName); if (propertyID) { propInfo = new CSSPropertyInfo(); |