| Index: third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp
|
| index 2a7174787f9535f29f5b220d36a250e265fb8185..043e4a03a608ade096d2b66ea162a2da7a5e1fac 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp
|
| @@ -131,19 +131,18 @@ static CSSPropertyID parseCSSPropertyID(const String& propertyName)
|
| // Example: 'backgroundPositionY' -> 'background-position-y'
|
| //
|
| // Also, certain prefixes such as 'css-' are stripped.
|
| -static CSSPropertyID cssPropertyInfo(v8::Local<v8::String> v8PropertyName)
|
| +static CSSPropertyID cssPropertyInfo(const AtomicString& name)
|
| {
|
| - String propertyName = toCoreString(v8PropertyName);
|
| typedef HashMap<String, CSSPropertyID> CSSPropertyIDMap;
|
| DEFINE_STATIC_LOCAL(CSSPropertyIDMap, map, ());
|
| - CSSPropertyIDMap::iterator iter = map.find(propertyName);
|
| + CSSPropertyIDMap::iterator iter = map.find(name);
|
| if (iter != map.end())
|
| return iter->value;
|
|
|
| - CSSPropertyID unresolvedProperty = parseCSSPropertyID(propertyName);
|
| + CSSPropertyID unresolvedProperty = parseCSSPropertyID(name);
|
| if (unresolvedProperty == CSSPropertyVariable)
|
| unresolvedProperty = CSSPropertyInvalid;
|
| - map.add(propertyName, unresolvedProperty);
|
| + map.add(name, unresolvedProperty);
|
| ASSERT(!unresolvedProperty || CSSPropertyMetadata::isEnabledProperty(unresolvedProperty));
|
| return unresolvedProperty;
|
| }
|
| @@ -176,20 +175,20 @@ void V8CSSStyleDeclaration::namedPropertyEnumeratorCustom(const v8::PropertyCall
|
| v8SetReturnValue(info, properties);
|
| }
|
|
|
| -void V8CSSStyleDeclaration::namedPropertyQueryCustom(v8::Local<v8::Name> v8Name, const v8::PropertyCallbackInfo<v8::Integer>& info)
|
| +void V8CSSStyleDeclaration::namedPropertyQueryCustom(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Integer>& info)
|
| {
|
| // NOTE: cssPropertyInfo lookups incur several mallocs.
|
| // Successful lookups have the same cost the first time, but are cached.
|
| - if (cssPropertyInfo(v8Name.As<v8::String>())) {
|
| + if (cssPropertyInfo(name)) {
|
| v8SetReturnValueInt(info, 0);
|
| return;
|
| }
|
| }
|
|
|
| -void V8CSSStyleDeclaration::namedPropertyGetterCustom(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +void V8CSSStyleDeclaration::namedPropertyGetterCustom(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| // Search the style declaration.
|
| - CSSPropertyID unresolvedProperty = cssPropertyInfo(name.As<v8::String>());
|
| + CSSPropertyID unresolvedProperty = cssPropertyInfo(name);
|
|
|
| // Do not handle non-property names.
|
| if (!unresolvedProperty)
|
| @@ -207,10 +206,10 @@ void V8CSSStyleDeclaration::namedPropertyGetterCustom(v8::Local<v8::Name> name,
|
| v8SetReturnValueString(info, result, info.GetIsolate());
|
| }
|
|
|
| -void V8CSSStyleDeclaration::namedPropertySetterCustom(v8::Local<v8::Name> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +void V8CSSStyleDeclaration::namedPropertySetterCustom(const AtomicString& name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| CSSStyleDeclaration* impl = V8CSSStyleDeclaration::toImpl(info.Holder());
|
| - CSSPropertyID unresolvedProperty = cssPropertyInfo(name.As<v8::String>());
|
| + CSSPropertyID unresolvedProperty = cssPropertyInfo(name);
|
| if (!unresolvedProperty)
|
| return;
|
|
|
|
|