diff -r 000000000000 -r 4f2f89ce4247 WebCore/generated/JSHTMLMeterElement.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WebCore/generated/JSHTMLMeterElement.cpp Fri Sep 17 09:02:29 2010 +0300 @@ -0,0 +1,300 @@ +/* + 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" + +#if ENABLE(METER_TAG) + +#include "JSHTMLMeterElement.h" + +#include "HTMLFormElement.h" +#include "HTMLMeterElement.h" +#include "JSHTMLFormElement.h" +#include "JSNodeList.h" +#include "NameNodeList.h" +#include "NodeList.h" +#include +#include + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSHTMLMeterElement); + +/* Hash table */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSHTMLMeterElementTableValues[10] = +{ + { "value", DontDelete, (intptr_t)static_cast(jsHTMLMeterElementValue), (intptr_t)setJSHTMLMeterElementValue THUNK_GENERATOR(0) }, + { "min", DontDelete, (intptr_t)static_cast(jsHTMLMeterElementMin), (intptr_t)setJSHTMLMeterElementMin THUNK_GENERATOR(0) }, + { "max", DontDelete, (intptr_t)static_cast(jsHTMLMeterElementMax), (intptr_t)setJSHTMLMeterElementMax THUNK_GENERATOR(0) }, + { "low", DontDelete, (intptr_t)static_cast(jsHTMLMeterElementLow), (intptr_t)setJSHTMLMeterElementLow THUNK_GENERATOR(0) }, + { "high", DontDelete, (intptr_t)static_cast(jsHTMLMeterElementHigh), (intptr_t)setJSHTMLMeterElementHigh THUNK_GENERATOR(0) }, + { "optimum", DontDelete, (intptr_t)static_cast(jsHTMLMeterElementOptimum), (intptr_t)setJSHTMLMeterElementOptimum THUNK_GENERATOR(0) }, + { "form", DontDelete | ReadOnly, (intptr_t)static_cast(jsHTMLMeterElementForm), (intptr_t)0 THUNK_GENERATOR(0) }, + { "labels", DontDelete | ReadOnly, (intptr_t)static_cast(jsHTMLMeterElementLabels), (intptr_t)0 THUNK_GENERATOR(0) }, + { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast(jsHTMLMeterElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSHTMLMeterElementTable = { 32, 31, JSHTMLMeterElementTableValues, 0 }; +/* Hash table for constructor */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSHTMLMeterElementConstructorTableValues[1] = +{ + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSHTMLMeterElementConstructorTable = { 1, 0, JSHTMLMeterElementConstructorTableValues, 0 }; +class JSHTMLMeterElementConstructor : public DOMConstructorObject { +public: + JSHTMLMeterElementConstructor(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 JSHTMLMeterElementConstructor::s_info = { "HTMLMeterElementConstructor", 0, &JSHTMLMeterElementConstructorTable, 0 }; + +JSHTMLMeterElementConstructor::JSHTMLMeterElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLMeterElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) +{ + putDirect(exec->propertyNames().prototype, JSHTMLMeterElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); +} + +bool JSHTMLMeterElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSHTMLMeterElementConstructorTable, this, propertyName, slot); +} + +bool JSHTMLMeterElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSHTMLMeterElementConstructorTable, this, propertyName, descriptor); +} + +/* Hash table for prototype */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSHTMLMeterElementPrototypeTableValues[1] = +{ + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSHTMLMeterElementPrototypeTable = { 1, 0, JSHTMLMeterElementPrototypeTableValues, 0 }; +const ClassInfo JSHTMLMeterElementPrototype::s_info = { "HTMLMeterElementPrototype", 0, &JSHTMLMeterElementPrototypeTable, 0 }; + +JSObject* JSHTMLMeterElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype(exec, globalObject); +} + +const ClassInfo JSHTMLMeterElement::s_info = { "HTMLMeterElement", &JSHTMLElement::s_info, &JSHTMLMeterElementTable, 0 }; + +JSHTMLMeterElement::JSHTMLMeterElement(NonNullPassRefPtr structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) + : JSHTMLElement(structure, globalObject, impl) +{ +} + +JSObject* JSHTMLMeterElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSHTMLMeterElementPrototype(globalObject, JSHTMLMeterElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject))); +} + +bool JSHTMLMeterElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSHTMLMeterElementTable, this, propertyName, slot); +} + +bool JSHTMLMeterElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSHTMLMeterElementTable, this, propertyName, descriptor); +} + +JSValue jsHTMLMeterElementValue(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLMeterElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + JSValue result = jsNumber(exec, imp->value()); + return result; +} + +JSValue jsHTMLMeterElementMin(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLMeterElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + JSValue result = jsNumber(exec, imp->min()); + return result; +} + +JSValue jsHTMLMeterElementMax(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLMeterElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + JSValue result = jsNumber(exec, imp->max()); + return result; +} + +JSValue jsHTMLMeterElementLow(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLMeterElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + JSValue result = jsNumber(exec, imp->low()); + return result; +} + +JSValue jsHTMLMeterElementHigh(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLMeterElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + JSValue result = jsNumber(exec, imp->high()); + return result; +} + +JSValue jsHTMLMeterElementOptimum(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLMeterElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + JSValue result = jsNumber(exec, imp->optimum()); + return result; +} + +JSValue jsHTMLMeterElementForm(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLMeterElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); + return result; +} + +JSValue jsHTMLMeterElementLabels(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLMeterElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->labels())); + return result; +} + +JSValue jsHTMLMeterElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSHTMLMeterElement* domObject = static_cast(asObject(slotBase)); + return JSHTMLMeterElement::getConstructor(exec, domObject->globalObject()); +} +void JSHTMLMeterElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) +{ + lookupPut(exec, propertyName, value, &JSHTMLMeterElementTable, this, slot); +} + +void setJSHTMLMeterElementValue(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSHTMLMeterElement* castedThis = static_cast(thisObject); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + ExceptionCode ec = 0; + imp->setValue(value.toNumber(exec), ec); + setDOMException(exec, ec); +} + +void setJSHTMLMeterElementMin(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSHTMLMeterElement* castedThis = static_cast(thisObject); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + ExceptionCode ec = 0; + imp->setMin(value.toNumber(exec), ec); + setDOMException(exec, ec); +} + +void setJSHTMLMeterElementMax(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSHTMLMeterElement* castedThis = static_cast(thisObject); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + ExceptionCode ec = 0; + imp->setMax(value.toNumber(exec), ec); + setDOMException(exec, ec); +} + +void setJSHTMLMeterElementLow(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSHTMLMeterElement* castedThis = static_cast(thisObject); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + ExceptionCode ec = 0; + imp->setLow(value.toNumber(exec), ec); + setDOMException(exec, ec); +} + +void setJSHTMLMeterElementHigh(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSHTMLMeterElement* castedThis = static_cast(thisObject); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + ExceptionCode ec = 0; + imp->setHigh(value.toNumber(exec), ec); + setDOMException(exec, ec); +} + +void setJSHTMLMeterElementOptimum(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSHTMLMeterElement* castedThis = static_cast(thisObject); + HTMLMeterElement* imp = static_cast(castedThis->impl()); + ExceptionCode ec = 0; + imp->setOptimum(value.toNumber(exec), ec); + setDOMException(exec, ec); +} + +JSValue JSHTMLMeterElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMConstructor(exec, static_cast(globalObject)); +} + + +} + +#endif // ENABLE(METER_TAG)