Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Unified Diff: Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp

Issue 1145463003: Revert of [bindings] Remove custom setter used in CSSStyleDeclaration (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698