| Index: Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp
|
| diff --git a/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp b/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp
|
| index 2625d258589fb29b72ebdfb8a44bc04911378fd4..e26086af3fe9e0b6f64af61848bb04b8038fea53 100644
|
| --- a/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp
|
| +++ b/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp
|
| @@ -151,6 +151,32 @@
|
| return unresolvedProperty;
|
| }
|
|
|
| +void V8CSSStyleDeclaration::namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8::Array>& info)
|
| +{
|
| + typedef Vector<String, numCSSProperties - 1> PreAllocatedPropertyVector;
|
| + DEFINE_STATIC_LOCAL(PreAllocatedPropertyVector, propertyNames, ());
|
| + static unsigned propertyNamesLength = 0;
|
| +
|
| + if (propertyNames.isEmpty()) {
|
| + for (int id = firstCSSProperty; id <= lastCSSProperty; ++id) {
|
| + CSSPropertyID propertyId = static_cast<CSSPropertyID>(id);
|
| + if (CSSPropertyMetadata::isEnabledProperty(propertyId))
|
| + propertyNames.append(getJSPropertyName(propertyId));
|
| + }
|
| + std::sort(propertyNames.begin(), propertyNames.end(), codePointCompareLessThan);
|
| + propertyNamesLength = propertyNames.size();
|
| + }
|
| +
|
| + v8::Local<v8::Array> properties = v8::Array::New(info.GetIsolate(), propertyNamesLength);
|
| + for (unsigned i = 0; i < propertyNamesLength; ++i) {
|
| + String key = propertyNames.at(i);
|
| + ASSERT(!key.isNull());
|
| + properties->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIsolate(), key));
|
| + }
|
| +
|
| + v8SetReturnValue(info, properties);
|
| +}
|
| +
|
| void V8CSSStyleDeclaration::namedPropertyQueryCustom(v8::Local<v8::Name> v8Name, const v8::PropertyCallbackInfo<v8::Integer>& info)
|
| {
|
| if (!v8Name->IsString())
|
|
|