diff -r 000000000000 -r 4f2f89ce4247 WebCore/generated/JSHTMLEmbedElement.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WebCore/generated/JSHTMLEmbedElement.cpp Fri Sep 17 09:02:29 2010 +0300 @@ -0,0 +1,299 @@ +/* + 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 "JSHTMLEmbedElement.h" + +#include "HTMLEmbedElement.h" +#include "HTMLNames.h" +#include "JSDOMBinding.h" +#include "JSHTMLEmbedElementCustom.h" +#include "JSSVGDocument.h" +#include "KURL.h" +#include "SVGDocument.h" +#include +#include +#include + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSHTMLEmbedElement); + +/* Hash table */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSHTMLEmbedElementTableValues[8] = +{ + { "align", DontDelete, (intptr_t)static_cast(jsHTMLEmbedElementAlign), (intptr_t)setJSHTMLEmbedElementAlign THUNK_GENERATOR(0) }, + { "height", DontDelete, (intptr_t)static_cast(jsHTMLEmbedElementHeight), (intptr_t)setJSHTMLEmbedElementHeight THUNK_GENERATOR(0) }, + { "name", DontDelete, (intptr_t)static_cast(jsHTMLEmbedElementName), (intptr_t)setJSHTMLEmbedElementName THUNK_GENERATOR(0) }, + { "src", DontDelete, (intptr_t)static_cast(jsHTMLEmbedElementSrc), (intptr_t)setJSHTMLEmbedElementSrc THUNK_GENERATOR(0) }, + { "type", DontDelete, (intptr_t)static_cast(jsHTMLEmbedElementType), (intptr_t)setJSHTMLEmbedElementType THUNK_GENERATOR(0) }, + { "width", DontDelete, (intptr_t)static_cast(jsHTMLEmbedElementWidth), (intptr_t)setJSHTMLEmbedElementWidth THUNK_GENERATOR(0) }, + { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast(jsHTMLEmbedElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSHTMLEmbedElementTable = { 19, 15, JSHTMLEmbedElementTableValues, 0 }; +/* Hash table for constructor */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSHTMLEmbedElementConstructorTableValues[1] = +{ + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSHTMLEmbedElementConstructorTable = { 1, 0, JSHTMLEmbedElementConstructorTableValues, 0 }; +class JSHTMLEmbedElementConstructor : public DOMConstructorObject { +public: + JSHTMLEmbedElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); + + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); + virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + static PassRefPtr createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); + } +protected: + static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; +}; + +const ClassInfo JSHTMLEmbedElementConstructor::s_info = { "HTMLEmbedElementConstructor", 0, &JSHTMLEmbedElementConstructorTable, 0 }; + +JSHTMLEmbedElementConstructor::JSHTMLEmbedElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLEmbedElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) +{ + putDirect(exec->propertyNames().prototype, JSHTMLEmbedElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); +} + +bool JSHTMLEmbedElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSHTMLEmbedElementConstructorTable, this, propertyName, slot); +} + +bool JSHTMLEmbedElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSHTMLEmbedElementConstructorTable, this, propertyName, descriptor); +} + +/* Hash table for prototype */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSHTMLEmbedElementPrototypeTableValues[2] = +{ + { "getSVGDocument", DontDelete | Function, (intptr_t)static_cast(jsHTMLEmbedElementPrototypeFunctionGetSVGDocument), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSHTMLEmbedElementPrototypeTable = { 2, 1, JSHTMLEmbedElementPrototypeTableValues, 0 }; +const ClassInfo JSHTMLEmbedElementPrototype::s_info = { "HTMLEmbedElementPrototype", 0, &JSHTMLEmbedElementPrototypeTable, 0 }; + +JSObject* JSHTMLEmbedElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype(exec, globalObject); +} + +bool JSHTMLEmbedElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticFunctionSlot(exec, &JSHTMLEmbedElementPrototypeTable, this, propertyName, slot); +} + +bool JSHTMLEmbedElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticFunctionDescriptor(exec, &JSHTMLEmbedElementPrototypeTable, this, propertyName, descriptor); +} + +const ClassInfo JSHTMLEmbedElement::s_info = { "HTMLEmbedElement", &JSHTMLElement::s_info, &JSHTMLEmbedElementTable, 0 }; + +JSHTMLEmbedElement::JSHTMLEmbedElement(NonNullPassRefPtr structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) + : JSHTMLElement(structure, globalObject, impl) +{ +} + +JSObject* JSHTMLEmbedElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSHTMLEmbedElementPrototype(globalObject, JSHTMLEmbedElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject))); +} + +bool JSHTMLEmbedElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + if (getOwnPropertySlotDelegate(exec, propertyName, slot)) + return true; + return getStaticValueSlot(exec, &JSHTMLEmbedElementTable, this, propertyName, slot); +} + +bool JSHTMLEmbedElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + if (getOwnPropertyDescriptorDelegate(exec, propertyName, descriptor)) + return true; + return getStaticValueDescriptor(exec, &JSHTMLEmbedElementTable, this, propertyName, descriptor); +} + +JSValue jsHTMLEmbedElementAlign(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLEmbedElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLEmbedElement* imp = static_cast(castedThis->impl()); + JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alignAttr)); + return result; +} + +JSValue jsHTMLEmbedElementHeight(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLEmbedElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLEmbedElement* imp = static_cast(castedThis->impl()); + JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::heightAttr)); + return result; +} + +JSValue jsHTMLEmbedElementName(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLEmbedElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLEmbedElement* imp = static_cast(castedThis->impl()); + JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::nameAttr)); + return result; +} + +JSValue jsHTMLEmbedElementSrc(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLEmbedElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLEmbedElement* imp = static_cast(castedThis->impl()); + JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::srcAttr)); + return result; +} + +JSValue jsHTMLEmbedElementType(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLEmbedElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLEmbedElement* imp = static_cast(castedThis->impl()); + JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::typeAttr)); + return result; +} + +JSValue jsHTMLEmbedElementWidth(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLEmbedElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLEmbedElement* imp = static_cast(castedThis->impl()); + JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::widthAttr)); + return result; +} + +JSValue jsHTMLEmbedElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLEmbedElement* domObject = static_cast(asObject(slotBase)); + return JSHTMLEmbedElement::getConstructor(exec, domObject->globalObject()); +} +void JSHTMLEmbedElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) +{ + if (putDelegate(exec, propertyName, value, slot)) + return; + lookupPut(exec, propertyName, value, &JSHTMLEmbedElementTable, this, slot); +} + +void setJSHTMLEmbedElementAlign(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSHTMLEmbedElement* castedThis = static_cast(thisObject); + HTMLEmbedElement* imp = static_cast(castedThis->impl()); + imp->setAttribute(WebCore::HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value)); +} + +void setJSHTMLEmbedElementHeight(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSHTMLEmbedElement* castedThis = static_cast(thisObject); + HTMLEmbedElement* imp = static_cast(castedThis->impl()); + imp->setAttribute(WebCore::HTMLNames::heightAttr, valueToStringWithNullCheck(exec, value)); +} + +void setJSHTMLEmbedElementName(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSHTMLEmbedElement* castedThis = static_cast(thisObject); + HTMLEmbedElement* imp = static_cast(castedThis->impl()); + imp->setAttribute(WebCore::HTMLNames::nameAttr, valueToStringWithNullCheck(exec, value)); +} + +void setJSHTMLEmbedElementSrc(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSHTMLEmbedElement* castedThis = static_cast(thisObject); + HTMLEmbedElement* imp = static_cast(castedThis->impl()); + imp->setAttribute(WebCore::HTMLNames::srcAttr, valueToStringWithNullCheck(exec, value)); +} + +void setJSHTMLEmbedElementType(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSHTMLEmbedElement* castedThis = static_cast(thisObject); + HTMLEmbedElement* imp = static_cast(castedThis->impl()); + imp->setAttribute(WebCore::HTMLNames::typeAttr, valueToStringWithNullCheck(exec, value)); +} + +void setJSHTMLEmbedElementWidth(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSHTMLEmbedElement* castedThis = static_cast(thisObject); + HTMLEmbedElement* imp = static_cast(castedThis->impl()); + imp->setAttribute(WebCore::HTMLNames::widthAttr, valueToStringWithNullCheck(exec, value)); +} + +JSValue JSHTMLEmbedElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMConstructor(exec, static_cast(globalObject)); +} + +EncodedJSValue JSC_HOST_CALL jsHTMLEmbedElementPrototypeFunctionGetSVGDocument(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSHTMLEmbedElement::s_info)) + return throwVMTypeError(exec); + JSHTMLEmbedElement* castedThis = static_cast(asObject(thisValue)); + HTMLEmbedElement* imp = static_cast(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); +} + + +}