static void effectAllowedAttrSetter(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->setEffectAllowed(v);
    return;
}
Esempio n. 2
0
static void effectAllowedAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.Clipboard.effectAllowed._set");
    Clipboard* imp = V8Clipboard::toNative(info.Holder());
    V8Parameter<> v = value;
    imp->setEffectAllowed(v);
    return;
}
Esempio n. 3
0
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;
    }
    }
}
Esempio n. 4
0
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;
    }
}
Esempio n. 5
0
void setJSClipboardEffectAllowed(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSClipboard* castedThis = static_cast<JSClipboard*>(thisObject);
    Clipboard* imp = static_cast<Clipboard*>(castedThis->impl());
    imp->setEffectAllowed(ustringToString(value.toString(exec)));
}