コード例 #1
0
ファイル: JSClipboard.cpp プロジェクト: lentinic/EAWebKit
JSValue* jsClipboardPrototypeFunctionSetDragImage(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
    if (!thisValue->isObject(&JSClipboard::s_info))
        return throwError(exec, TypeError);
    JSClipboard* castedThisObj = static_cast<JSClipboard*>(thisValue);
    return castedThisObj->setDragImage(exec, args);
}
コード例 #2
0
ファイル: JSClipboard.cpp プロジェクト: Xertz/EAWebKit
JSValue jsClipboardItems(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSClipboard* castedThis = static_cast<JSClipboard*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    Clipboard* imp = static_cast<Clipboard*>(castedThis->impl());
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->items()));
    return result;
}
コード例 #3
0
ファイル: JSClipboard.cpp プロジェクト: Xertz/EAWebKit
JSValue jsClipboardEffectAllowed(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSClipboard* castedThis = static_cast<JSClipboard*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    Clipboard* imp = static_cast<Clipboard*>(castedThis->impl());
    JSValue result = jsStringOrUndefined(exec, imp->effectAllowed());
    return result;
}
コード例 #4
0
ファイル: JSClipboard.cpp プロジェクト: Xertz/EAWebKit
EncodedJSValue JSC_HOST_CALL jsClipboardPrototypeFunctionSetDragImage(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(&JSClipboard::s_info))
        return throwVMTypeError(exec);
    JSClipboard* castedThis = static_cast<JSClipboard*>(asObject(thisValue));
    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSClipboard::s_info);
    return JSValue::encode(castedThis->setDragImage(exec));
}
コード例 #5
0
ファイル: JSClipboard.cpp プロジェクト: Xertz/EAWebKit
EncodedJSValue JSC_HOST_CALL jsClipboardPrototypeFunctionSetData(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(&JSClipboard::s_info))
        return throwVMTypeError(exec);
    JSClipboard* castedThis = static_cast<JSClipboard*>(asObject(thisValue));
    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSClipboard::s_info);
    Clipboard* imp = static_cast<Clipboard*>(castedThis->impl());
    if (exec->argumentCount() < 2)
        return JSValue::encode(jsUndefined());
    const String& type(ustringToString(exec->argument(0).toString(exec)));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    const String& data(ustringToString(exec->argument(1).toString(exec)));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());


    JSC::JSValue result = jsBoolean(imp->setData(type, data));
    return JSValue::encode(result);
}
コード例 #6
0
ファイル: JSClipboard.cpp プロジェクト: Xertz/EAWebKit
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)));
}
コード例 #7
0
ファイル: JSClipboard.cpp プロジェクト: Xertz/EAWebKit
JSValue jsClipboardConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSClipboard* domObject = static_cast<JSClipboard*>(asObject(slotBase));
    return JSClipboard::getConstructor(exec, domObject->globalObject());
}
コード例 #8
0
ファイル: JSClipboard.cpp プロジェクト: Xertz/EAWebKit
JSValue jsClipboardTypes(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSClipboard* castedThis = static_cast<JSClipboard*>(asObject(slotBase));
    return castedThis->types(exec);
}