示例#1
0
void setJSHTMLObjectElementCodeBase(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(exec);
    JSHTMLObjectElement* castedThis = jsDynamicCast<JSHTMLObjectElement*>(JSValue::decode(thisValue));
    if (!castedThis) {
        throwVMTypeError(exec);
        return;
    }
    HTMLObjectElement& impl = castedThis->impl();
    const String& nativeValue(valueToStringWithNullCheck(exec, value));
    if (exec->hadException())
        return;
    impl.setAttribute(WebCore::HTMLNames::codebaseAttr, nativeValue);
}
示例#2
0
EncodedJSValue JSC_HOST_CALL jsHTMLObjectElementPrototypeFunctionSetCustomValidity(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    JSHTMLObjectElement* castedThis = jsDynamicCast<JSHTMLObjectElement*>(thisValue);
    if (!castedThis)
        return throwVMTypeError(exec);
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSHTMLObjectElement::info());
    HTMLObjectElement& impl = castedThis->impl();
    if (exec->argumentCount() < 1)
        return throwVMError(exec, createNotEnoughArgumentsError(exec));
    const String& error(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    impl.setCustomValidity(error);
    return JSValue::encode(jsUndefined());
}
示例#3
0
EncodedJSValue JSC_HOST_CALL jsHTMLObjectElementPrototypeFunctionGetSVGDocument(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(&JSHTMLObjectElement::s_info))
        return throwVMTypeError(exec);
    JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(thisValue));
    HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl());
    ExceptionCode ec = 0;
    if (!checkNodeSecurity(exec, imp->getSVGDocument(ec)))
        return JSValue::encode(jsUndefined());


    JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getSVGDocument(ec)));
    setDOMException(exec, ec);
    return JSValue::encode(result);
}
示例#4
0
void setJSHTMLObjectElementWidth(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(thisObject);
    HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl());
    imp->setAttribute(WebCore::HTMLNames::widthAttr, valueToStringWithNullCheck(exec, value));
}
示例#5
0
void setJSHTMLObjectElementVspace(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(thisObject);
    HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl());
    imp->setIntegralAttribute(WebCore::HTMLNames::vspaceAttr, value.toInt32(exec));
}
示例#6
0
void setJSHTMLObjectElementDeclare(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(thisObject);
    HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl());
    imp->setBooleanAttribute(WebCore::HTMLNames::declareAttr, value.toBoolean(exec));
}
示例#7
0
JSValue jsHTMLObjectElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLObjectElement* domObject = static_cast<JSHTMLObjectElement*>(asObject(slotBase));
    return JSHTMLObjectElement::getConstructor(exec, domObject->globalObject());
}
示例#8
0
JSValue jsHTMLObjectElementContentDocument(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase));
    HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl());
    return checkNodeSecurity(exec, imp->contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->contentDocument())) : jsUndefined();
}