static void dropEffectAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) { Clipboard* imp = V8Clipboard::toNative(info.Holder()); V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); imp->setDropEffect(v); return; }
static void dropEffectAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) { INC_STATS("DOM.Clipboard.dropEffect._set"); Clipboard* imp = V8Clipboard::toNative(info.Holder()); V8Parameter<> v = value; imp->setDropEffect(v); return; }
void JSClipboard::putValueProperty(ExecState* exec, int token, JSValue* value) { switch (token) { case DropEffectAttrNum: { Clipboard* imp = static_cast<Clipboard*>(impl()); imp->setDropEffect(value->toString(exec)); break; } case EffectAllowedAttrNum: { Clipboard* imp = static_cast<Clipboard*>(impl()); imp->setEffectAllowed(value->toString(exec)); break; } } }
void JSClipboard::putValueProperty(ExecState* exec, int token, JSValue* value, int /*attr*/) { Clipboard* clipboard = impl(); switch (token) { case DropEffect: // can never set this when not for dragging, thus getting always returns NULL string if (clipboard->isForDragging()) clipboard->setDropEffect(value->toString(exec)); break; case EffectAllowed: // can never set this when not for dragging, thus getting always returns NULL string if (clipboard->isForDragging()) clipboard->setEffectAllowed(value->toString(exec)); break; } }
void setJSClipboardDropEffect(ExecState* exec, JSObject* thisObject, JSValue value) { JSClipboard* castedThis = static_cast<JSClipboard*>(thisObject); Clipboard* imp = static_cast<Clipboard*>(castedThis->impl()); imp->setDropEffect(ustringToString(value.toString(exec))); }