/* | |
This file is part of the WebKit open source project. | |
This file has been generated by generate-bindings.pl. DO NOT MODIFY! | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Library General Public | |
License as published by the Free Software Foundation; either | |
version 2 of the License, or (at your option) any later version. | |
This library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Library General Public License for more details. | |
You should have received a copy of the GNU Library General Public License | |
along with this library; see the file COPYING.LIB. If not, write to | |
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
Boston, MA 02110-1301, USA. | |
*/ | |
#include "config.h" | |
#include "JSHTMLObjectElement.h" | |
#include "Document.h" | |
#include "HTMLFormElement.h" | |
#include "HTMLNames.h" | |
#include "HTMLObjectElement.h" | |
#include "JSDOMBinding.h" | |
#include "JSDocument.h" | |
#include "JSHTMLFormElement.h" | |
#include "JSHTMLObjectElementCustom.h" | |
#include "JSSVGDocument.h" | |
#include "KURL.h" | |
#include "SVGDocument.h" | |
#include <runtime/Error.h> | |
#include <runtime/JSNumberCell.h> | |
#include <runtime/JSString.h> | |
#include <wtf/GetPtr.h> | |
using namespace JSC; | |
namespace WebCore { | |
ASSERT_CLASS_FITS_IN_CELL(JSHTMLObjectElement); | |
/* Hash table */ | |
static const HashTableValue JSHTMLObjectElementTableValues[21] = | |
{ | |
{ "form", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementForm), (intptr_t)0 }, | |
{ "code", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementCode), (intptr_t)setJSHTMLObjectElementCode }, | |
{ "align", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementAlign), (intptr_t)setJSHTMLObjectElementAlign }, | |
{ "archive", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementArchive), (intptr_t)setJSHTMLObjectElementArchive }, | |
{ "border", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementBorder), (intptr_t)setJSHTMLObjectElementBorder }, | |
{ "codeBase", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementCodeBase), (intptr_t)setJSHTMLObjectElementCodeBase }, | |
{ "codeType", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementCodeType), (intptr_t)setJSHTMLObjectElementCodeType }, | |
{ "data", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementData), (intptr_t)setJSHTMLObjectElementData }, | |
{ "declare", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementDeclare), (intptr_t)setJSHTMLObjectElementDeclare }, | |
{ "height", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementHeight), (intptr_t)setJSHTMLObjectElementHeight }, | |
{ "hspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementHspace), (intptr_t)setJSHTMLObjectElementHspace }, | |
{ "name", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementName), (intptr_t)setJSHTMLObjectElementName }, | |
{ "standby", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementStandby), (intptr_t)setJSHTMLObjectElementStandby }, | |
{ "type", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementType), (intptr_t)setJSHTMLObjectElementType }, | |
{ "useMap", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementUseMap), (intptr_t)setJSHTMLObjectElementUseMap }, | |
{ "vspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementVspace), (intptr_t)setJSHTMLObjectElementVspace }, | |
{ "width", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementWidth), (intptr_t)setJSHTMLObjectElementWidth }, | |
{ "willValidate", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementWillValidate), (intptr_t)0 }, | |
{ "contentDocument", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementContentDocument), (intptr_t)0 }, | |
{ "constructor", DontEnum|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLObjectElementConstructor), (intptr_t)0 }, | |
{ 0, 0, 0, 0 } | |
}; | |
static JSC_CONST_HASHTABLE HashTable JSHTMLObjectElementTable = | |
#if ENABLE(PERFECT_HASH_SIZE) | |
{ 127, JSHTMLObjectElementTableValues, 0 }; | |
#else | |
{ 66, 63, JSHTMLObjectElementTableValues, 0 }; | |
#endif | |
/* Hash table for constructor */ | |
static const HashTableValue JSHTMLObjectElementConstructorTableValues[1] = | |
{ | |
{ 0, 0, 0, 0 } | |
}; | |
static JSC_CONST_HASHTABLE HashTable JSHTMLObjectElementConstructorTable = | |
#if ENABLE(PERFECT_HASH_SIZE) | |
{ 0, JSHTMLObjectElementConstructorTableValues, 0 }; | |
#else | |
{ 1, 0, JSHTMLObjectElementConstructorTableValues, 0 }; | |
#endif | |
class JSHTMLObjectElementConstructor : public DOMConstructorObject { | |
public: | |
JSHTMLObjectElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) | |
: DOMConstructorObject(JSHTMLObjectElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) | |
{ | |
putDirect(exec->propertyNames().prototype, JSHTMLObjectElementPrototype::self(exec, globalObject), None); | |
} | |
virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); | |
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); | |
virtual const ClassInfo* classInfo() const { return &s_info; } | |
static const ClassInfo s_info; | |
static PassRefPtr<Structure> createStructure(JSValue proto) | |
{ | |
return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); | |
} | |
protected: | |
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | DOMConstructorObject::StructureFlags; | |
}; | |
const ClassInfo JSHTMLObjectElementConstructor::s_info = { "HTMLObjectElementConstructor", 0, &JSHTMLObjectElementConstructorTable, 0 }; | |
bool JSHTMLObjectElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) | |
{ | |
return getStaticValueSlot<JSHTMLObjectElementConstructor, DOMObject>(exec, &JSHTMLObjectElementConstructorTable, this, propertyName, slot); | |
} | |
bool JSHTMLObjectElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) | |
{ | |
return getStaticValueDescriptor<JSHTMLObjectElementConstructor, DOMObject>(exec, &JSHTMLObjectElementConstructorTable, this, propertyName, descriptor); | |
} | |
/* Hash table for prototype */ | |
static const HashTableValue JSHTMLObjectElementPrototypeTableValues[2] = | |
{ | |
{ "getSVGDocument", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsHTMLObjectElementPrototypeFunctionGetSVGDocument), (intptr_t)0 }, | |
{ 0, 0, 0, 0 } | |
}; | |
static JSC_CONST_HASHTABLE HashTable JSHTMLObjectElementPrototypeTable = | |
#if ENABLE(PERFECT_HASH_SIZE) | |
{ 0, JSHTMLObjectElementPrototypeTableValues, 0 }; | |
#else | |
{ 2, 1, JSHTMLObjectElementPrototypeTableValues, 0 }; | |
#endif | |
const ClassInfo JSHTMLObjectElementPrototype::s_info = { "HTMLObjectElementPrototype", 0, &JSHTMLObjectElementPrototypeTable, 0 }; | |
JSObject* JSHTMLObjectElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) | |
{ | |
return getDOMPrototype<JSHTMLObjectElement>(exec, globalObject); | |
} | |
bool JSHTMLObjectElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) | |
{ | |
return getStaticFunctionSlot<JSObject>(exec, &JSHTMLObjectElementPrototypeTable, this, propertyName, slot); | |
} | |
bool JSHTMLObjectElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) | |
{ | |
return getStaticFunctionDescriptor<JSObject>(exec, &JSHTMLObjectElementPrototypeTable, this, propertyName, descriptor); | |
} | |
const ClassInfo JSHTMLObjectElement::s_info = { "HTMLObjectElement", &JSHTMLElement::s_info, &JSHTMLObjectElementTable, 0 }; | |
JSHTMLObjectElement::JSHTMLObjectElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLObjectElement> impl) | |
: JSHTMLElement(structure, globalObject, impl) | |
{ | |
} | |
JSObject* JSHTMLObjectElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) | |
{ | |
return new (exec) JSHTMLObjectElementPrototype(JSHTMLObjectElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject))); | |
} | |
bool JSHTMLObjectElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) | |
{ | |
if (getOwnPropertySlotDelegate(exec, propertyName, slot)) | |
return true; | |
return getStaticValueSlot<JSHTMLObjectElement, Base>(exec, &JSHTMLObjectElementTable, this, propertyName, slot); | |
} | |
bool JSHTMLObjectElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) | |
{ | |
if (getOwnPropertyDescriptorDelegate(exec, propertyName, descriptor)) | |
return true; | |
return getStaticValueDescriptor<JSHTMLObjectElement, Base>(exec, &JSHTMLObjectElementTable, this, propertyName, descriptor); | |
} | |
JSValue jsHTMLObjectElementForm(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); | |
return result; | |
} | |
JSValue jsHTMLObjectElementCode(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getAttribute(HTMLNames::codeAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementAlign(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getAttribute(HTMLNames::alignAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementArchive(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getAttribute(HTMLNames::archiveAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementBorder(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getAttribute(HTMLNames::borderAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementCodeBase(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getAttribute(HTMLNames::codebaseAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementCodeType(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getAttribute(HTMLNames::codetypeAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementData(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getURLAttribute(HTMLNames::dataAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementDeclare(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsBoolean(imp->declare()); | |
return result; | |
} | |
JSValue jsHTMLObjectElementHeight(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getAttribute(HTMLNames::heightAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementHspace(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsNumber(exec, imp->hspace()); | |
return result; | |
} | |
JSValue jsHTMLObjectElementName(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getAttribute(HTMLNames::nameAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementStandby(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getAttribute(HTMLNames::standbyAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementType(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getAttribute(HTMLNames::typeAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementUseMap(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getAttribute(HTMLNames::usemapAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementVspace(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsNumber(exec, imp->vspace()); | |
return result; | |
} | |
JSValue jsHTMLObjectElementWidth(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->getAttribute(HTMLNames::widthAttr)); | |
return result; | |
} | |
JSValue jsHTMLObjectElementWillValidate(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); | |
JSValue result = jsBoolean(imp->willValidate()); | |
return result; | |
} | |
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(); | |
} | |
JSValue jsHTMLObjectElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLObjectElement* domObject = static_cast<JSHTMLObjectElement*>(asObject(slotBase)); | |
return JSHTMLObjectElement::getConstructor(exec, domObject->globalObject()); | |
} | |
void JSHTMLObjectElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) | |
{ | |
if (putDelegate(exec, propertyName, value, slot)) | |
return; | |
lookupPut<JSHTMLObjectElement, Base>(exec, propertyName, value, &JSHTMLObjectElementTable, this, slot); | |
} | |
void setJSHTMLObjectElementCode(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::codeAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
void setJSHTMLObjectElementAlign(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
void setJSHTMLObjectElementArchive(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::archiveAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
void setJSHTMLObjectElementBorder(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::borderAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
void setJSHTMLObjectElementCodeBase(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::codebaseAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
void setJSHTMLObjectElementCodeType(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::codetypeAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
void setJSHTMLObjectElementData(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::dataAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
void setJSHTMLObjectElementDeclare(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setDeclare(value.toBoolean(exec)); | |
} | |
void setJSHTMLObjectElementHeight(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::heightAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
void setJSHTMLObjectElementHspace(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setHspace(value.toInt32(exec)); | |
} | |
void setJSHTMLObjectElementName(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::nameAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
void setJSHTMLObjectElementStandby(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::standbyAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
void setJSHTMLObjectElementType(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::typeAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
void setJSHTMLObjectElementUseMap(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::usemapAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
void setJSHTMLObjectElementVspace(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setVspace(value.toInt32(exec)); | |
} | |
void setJSHTMLObjectElementWidth(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(thisObject); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
imp->setAttribute(HTMLNames::widthAttr, valueToStringWithNullCheck(exec, value)); | |
} | |
JSValue JSHTMLObjectElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) | |
{ | |
return getDOMConstructor<JSHTMLObjectElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); | |
} | |
JSValue JSC_HOST_CALL jsHTMLObjectElementPrototypeFunctionGetSVGDocument(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSHTMLObjectElement::s_info)) | |
return throwError(exec, TypeError); | |
JSHTMLObjectElement* castedThisObj = static_cast<JSHTMLObjectElement*>(asObject(thisValue)); | |
HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThisObj->impl()); | |
ExceptionCode ec = 0; | |
if (!checkNodeSecurity(exec, imp->getSVGDocument(ec))) | |
return jsUndefined(); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getSVGDocument(ec))); | |
setDOMException(exec, ec); | |
return result; | |
} | |
} |