2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
22 #include "JSHTMLOptGroupElement.h"
24 #include "HTMLNames.h"
25 #include "HTMLOptGroupElement.h"
27 #include <runtime/JSString.h>
28 #include <wtf/GetPtr.h>
34 ASSERT_CLASS_FITS_IN_CELL(JSHTMLOptGroupElement);
38 #define THUNK_GENERATOR(generator) , generator
40 #define THUNK_GENERATOR(generator)
43 #define INTRINSIC(intrinsic) , intrinsic
45 #define INTRINSIC(intrinsic)
48 static const HashTableValue JSHTMLOptGroupElementTableValues[] =
50 { "disabled", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLOptGroupElementDisabled), (intptr_t)setJSHTMLOptGroupElementDisabled THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
51 { "label", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLOptGroupElementLabel), (intptr_t)setJSHTMLOptGroupElementLabel THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
52 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLOptGroupElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
53 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
56 #undef THUNK_GENERATOR
57 static const HashTable JSHTMLOptGroupElementTable = { 10, 7, JSHTMLOptGroupElementTableValues, 0 };
58 /* Hash table for constructor */
60 #define THUNK_GENERATOR(generator) , generator
62 #define THUNK_GENERATOR(generator)
65 #define INTRINSIC(intrinsic) , intrinsic
67 #define INTRINSIC(intrinsic)
70 static const HashTableValue JSHTMLOptGroupElementConstructorTableValues[] =
72 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
75 #undef THUNK_GENERATOR
76 static const HashTable JSHTMLOptGroupElementConstructorTable = { 1, 0, JSHTMLOptGroupElementConstructorTableValues, 0 };
77 const ClassInfo JSHTMLOptGroupElementConstructor::s_info = { "HTMLOptGroupElementConstructor", &DOMConstructorObject::s_info, &JSHTMLOptGroupElementConstructorTable, 0, CREATE_METHOD_TABLE(JSHTMLOptGroupElementConstructor) };
79 JSHTMLOptGroupElementConstructor::JSHTMLOptGroupElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
80 : DOMConstructorObject(structure, globalObject)
84 void JSHTMLOptGroupElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
86 Base::finishCreation(exec->globalData());
87 ASSERT(inherits(&s_info));
88 putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLOptGroupElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
91 bool JSHTMLOptGroupElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
93 return getStaticValueSlot<JSHTMLOptGroupElementConstructor, JSDOMWrapper>(exec, &JSHTMLOptGroupElementConstructorTable, static_cast<JSHTMLOptGroupElementConstructor*>(cell), propertyName, slot);
96 bool JSHTMLOptGroupElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
98 return getStaticValueDescriptor<JSHTMLOptGroupElementConstructor, JSDOMWrapper>(exec, &JSHTMLOptGroupElementConstructorTable, static_cast<JSHTMLOptGroupElementConstructor*>(object), propertyName, descriptor);
101 /* Hash table for prototype */
103 #define THUNK_GENERATOR(generator) , generator
105 #define THUNK_GENERATOR(generator)
108 #define INTRINSIC(intrinsic) , intrinsic
110 #define INTRINSIC(intrinsic)
113 static const HashTableValue JSHTMLOptGroupElementPrototypeTableValues[] =
115 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
118 #undef THUNK_GENERATOR
119 static const HashTable JSHTMLOptGroupElementPrototypeTable = { 1, 0, JSHTMLOptGroupElementPrototypeTableValues, 0 };
120 const ClassInfo JSHTMLOptGroupElementPrototype::s_info = { "HTMLOptGroupElementPrototype", &JSC::JSNonFinalObject::s_info, &JSHTMLOptGroupElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSHTMLOptGroupElementPrototype) };
122 JSObject* JSHTMLOptGroupElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
124 return getDOMPrototype<JSHTMLOptGroupElement>(exec, globalObject);
127 const ClassInfo JSHTMLOptGroupElement::s_info = { "HTMLOptGroupElement", &JSHTMLElement::s_info, &JSHTMLOptGroupElementTable, 0 , CREATE_METHOD_TABLE(JSHTMLOptGroupElement) };
129 JSHTMLOptGroupElement::JSHTMLOptGroupElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLOptGroupElement> impl)
130 : JSHTMLElement(structure, globalObject, impl)
134 void JSHTMLOptGroupElement::finishCreation(JSGlobalData& globalData)
136 Base::finishCreation(globalData);
137 ASSERT(inherits(&s_info));
140 JSObject* JSHTMLOptGroupElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
142 return JSHTMLOptGroupElementPrototype::create(exec->globalData(), globalObject, JSHTMLOptGroupElementPrototype::createStructure(exec->globalData(), globalObject, JSHTMLElementPrototype::self(exec, globalObject)));
145 bool JSHTMLOptGroupElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
147 JSHTMLOptGroupElement* thisObject = jsCast<JSHTMLOptGroupElement*>(cell);
148 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
149 return getStaticValueSlot<JSHTMLOptGroupElement, Base>(exec, &JSHTMLOptGroupElementTable, thisObject, propertyName, slot);
152 bool JSHTMLOptGroupElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
154 JSHTMLOptGroupElement* thisObject = jsCast<JSHTMLOptGroupElement*>(object);
155 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
156 return getStaticValueDescriptor<JSHTMLOptGroupElement, Base>(exec, &JSHTMLOptGroupElementTable, thisObject, propertyName, descriptor);
159 JSValue jsHTMLOptGroupElementDisabled(ExecState* exec, JSValue slotBase, const Identifier&)
161 JSHTMLOptGroupElement* castedThis = static_cast<JSHTMLOptGroupElement*>(asObject(slotBase));
163 HTMLOptGroupElement* imp = static_cast<HTMLOptGroupElement*>(castedThis->impl());
164 JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::disabledAttr));
169 JSValue jsHTMLOptGroupElementLabel(ExecState* exec, JSValue slotBase, const Identifier&)
171 JSHTMLOptGroupElement* castedThis = static_cast<JSHTMLOptGroupElement*>(asObject(slotBase));
173 HTMLOptGroupElement* imp = static_cast<HTMLOptGroupElement*>(castedThis->impl());
174 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::labelAttr));
179 JSValue jsHTMLOptGroupElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
181 JSHTMLOptGroupElement* domObject = static_cast<JSHTMLOptGroupElement*>(asObject(slotBase));
182 return JSHTMLOptGroupElement::getConstructor(exec, domObject->globalObject());
185 void JSHTMLOptGroupElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
187 JSHTMLOptGroupElement* thisObject = jsCast<JSHTMLOptGroupElement*>(cell);
188 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
189 lookupPut<JSHTMLOptGroupElement, Base>(exec, propertyName, value, &JSHTMLOptGroupElementTable, thisObject, slot);
192 void setJSHTMLOptGroupElementDisabled(ExecState* exec, JSObject* thisObject, JSValue value)
194 JSHTMLOptGroupElement* castedThis = static_cast<JSHTMLOptGroupElement*>(thisObject);
195 HTMLOptGroupElement* imp = static_cast<HTMLOptGroupElement*>(castedThis->impl());
196 imp->setBooleanAttribute(WebCore::HTMLNames::disabledAttr, value.toBoolean(exec));
200 void setJSHTMLOptGroupElementLabel(ExecState* exec, JSObject* thisObject, JSValue value)
202 JSHTMLOptGroupElement* castedThis = static_cast<JSHTMLOptGroupElement*>(thisObject);
203 HTMLOptGroupElement* imp = static_cast<HTMLOptGroupElement*>(castedThis->impl());
204 imp->setAttribute(WebCore::HTMLNames::labelAttr, valueToStringWithNullCheck(exec, value));
208 JSValue JSHTMLOptGroupElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
210 return getDOMConstructor<JSHTMLOptGroupElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));