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 e26086af3fe9e0b6f64af61848bb04b8038fea53..d406695df9120f471e70319c4e1c25ef353a69c3 100644 |
--- a/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp |
+++ b/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp |
@@ -210,4 +210,23 @@ |
v8SetReturnValueString(info, result, info.GetIsolate()); |
} |
+void V8CSSStyleDeclaration::namedPropertySetterCustom(v8::Local<v8::Name> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ if (!name->IsString()) |
+ return; |
+ CSSStyleDeclaration* impl = V8CSSStyleDeclaration::toImpl(info.Holder()); |
+ CSSPropertyID unresolvedProperty = cssPropertyInfo(name.As<v8::String>(), info.GetIsolate()); |
+ if (!unresolvedProperty) |
+ return; |
+ |
+ TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, propertyValue, value); |
+ ExceptionState exceptionState(ExceptionState::SetterContext, getPropertyName(resolveCSSPropertyID(unresolvedProperty)), "CSSStyleDeclaration", info.Holder(), info.GetIsolate()); |
+ impl->setPropertyInternal(unresolvedProperty, propertyValue, false, exceptionState); |
+ |
+ if (exceptionState.throwIfNeeded()) |
+ return; |
+ |
+ v8SetReturnValue(info, value); |
+} |
+ |
} // namespace blink |