/* 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 "JSHTMLOptGroupElement.h" #include "HTMLOptGroupElement.h" #include "KURL.h" #include #include using namespace JSC; namespace WebCore { ASSERT_CLASS_FITS_IN_CELL(JSHTMLOptGroupElement); /* Hash table */ static const HashTableValue JSHTMLOptGroupElementTableValues[4] = { { "disabled", DontDelete, (intptr_t)jsHTMLOptGroupElementDisabled, (intptr_t)setJSHTMLOptGroupElementDisabled }, { "label", DontDelete, (intptr_t)jsHTMLOptGroupElementLabel, (intptr_t)setJSHTMLOptGroupElementLabel }, { "constructor", DontEnum|ReadOnly, (intptr_t)jsHTMLOptGroupElementConstructor, (intptr_t)0 }, { 0, 0, 0, 0 } }; static JSC_CONST_HASHTABLE HashTable JSHTMLOptGroupElementTable = #if ENABLE(PERFECT_HASH_SIZE) { 63, JSHTMLOptGroupElementTableValues, 0 }; #else { 10, 7, JSHTMLOptGroupElementTableValues, 0 }; #endif /* Hash table for constructor */ static const HashTableValue JSHTMLOptGroupElementConstructorTableValues[1] = { { 0, 0, 0, 0 } }; static JSC_CONST_HASHTABLE HashTable JSHTMLOptGroupElementConstructorTable = #if ENABLE(PERFECT_HASH_SIZE) { 0, JSHTMLOptGroupElementConstructorTableValues, 0 }; #else { 1, 0, JSHTMLOptGroupElementConstructorTableValues, 0 }; #endif class JSHTMLOptGroupElementConstructor : public DOMConstructorObject { public: JSHTMLOptGroupElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) : DOMConstructorObject(JSHTMLOptGroupElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { putDirect(exec->propertyNames().prototype, JSHTMLOptGroupElementPrototype::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 createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); } }; const ClassInfo JSHTMLOptGroupElementConstructor::s_info = { "HTMLOptGroupElementConstructor", 0, &JSHTMLOptGroupElementConstructorTable, 0 }; bool JSHTMLOptGroupElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot(exec, &JSHTMLOptGroupElementConstructorTable, this, propertyName, slot); } bool JSHTMLOptGroupElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) { return getStaticValueDescriptor(exec, &JSHTMLOptGroupElementConstructorTable, this, propertyName, descriptor); } /* Hash table for prototype */ static const HashTableValue JSHTMLOptGroupElementPrototypeTableValues[1] = { { 0, 0, 0, 0 } }; static JSC_CONST_HASHTABLE HashTable JSHTMLOptGroupElementPrototypeTable = #if ENABLE(PERFECT_HASH_SIZE) { 0, JSHTMLOptGroupElementPrototypeTableValues, 0 }; #else { 1, 0, JSHTMLOptGroupElementPrototypeTableValues, 0 }; #endif const ClassInfo JSHTMLOptGroupElementPrototype::s_info = { "HTMLOptGroupElementPrototype", 0, &JSHTMLOptGroupElementPrototypeTable, 0 }; JSObject* JSHTMLOptGroupElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) { return getDOMPrototype(exec, globalObject); } const ClassInfo JSHTMLOptGroupElement::s_info = { "HTMLOptGroupElement", &JSHTMLElement::s_info, &JSHTMLOptGroupElementTable, 0 }; JSHTMLOptGroupElement::JSHTMLOptGroupElement(PassRefPtr structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) : JSHTMLElement(structure, globalObject, impl) { } JSObject* JSHTMLOptGroupElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) { return new (exec) JSHTMLOptGroupElementPrototype(JSHTMLOptGroupElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject))); } bool JSHTMLOptGroupElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot(exec, &JSHTMLOptGroupElementTable, this, propertyName, slot); } bool JSHTMLOptGroupElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) { return getStaticValueDescriptor(exec, &JSHTMLOptGroupElementTable, this, propertyName, descriptor); } JSValue jsHTMLOptGroupElementDisabled(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSHTMLOptGroupElement* castedThis = static_cast(asObject(slot.slotBase())); UNUSED_PARAM(exec); HTMLOptGroupElement* imp = static_cast(castedThis->impl()); return jsBoolean(imp->disabled()); } JSValue jsHTMLOptGroupElementLabel(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSHTMLOptGroupElement* castedThis = static_cast(asObject(slot.slotBase())); UNUSED_PARAM(exec); HTMLOptGroupElement* imp = static_cast(castedThis->impl()); return jsString(exec, imp->label()); } JSValue jsHTMLOptGroupElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSHTMLOptGroupElement* domObject = static_cast(asObject(slot.slotBase())); return JSHTMLOptGroupElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLOptGroupElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { lookupPut(exec, propertyName, value, &JSHTMLOptGroupElementTable, this, slot); } void setJSHTMLOptGroupElementDisabled(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLOptGroupElement* imp = static_cast(static_cast(thisObject)->impl()); imp->setDisabled(value.toBoolean(exec)); } void setJSHTMLOptGroupElementLabel(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLOptGroupElement* imp = static_cast(static_cast(thisObject)->impl()); imp->setLabel(valueToStringWithNullCheck(exec, value)); } JSValue JSHTMLOptGroupElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { return getDOMConstructor(exec, static_cast(globalObject)); } }