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 "JSHTMLOListElement.h"
24 #include "HTMLNames.h"
25 #include "HTMLOListElement.h"
27 #include <runtime/JSString.h>
28 #include <wtf/GetPtr.h>
34 ASSERT_CLASS_FITS_IN_CELL(JSHTMLOListElement);
38 #define THUNK_GENERATOR(generator) , generator
40 #define THUNK_GENERATOR(generator)
43 #define INTRINSIC(intrinsic) , intrinsic
45 #define INTRINSIC(intrinsic)
48 static const HashTableValue JSHTMLOListElementTableValues[] =
50 { "compact", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLOListElementCompact), (intptr_t)setJSHTMLOListElementCompact THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
51 { "start", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLOListElementStart), (intptr_t)setJSHTMLOListElementStart THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
52 { "type", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLOListElementType), (intptr_t)setJSHTMLOListElementType THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
53 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLOListElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
54 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
57 #undef THUNK_GENERATOR
58 static const HashTable JSHTMLOListElementTable = { 8, 7, JSHTMLOListElementTableValues, 0 };
59 /* Hash table for constructor */
61 #define THUNK_GENERATOR(generator) , generator
63 #define THUNK_GENERATOR(generator)
66 #define INTRINSIC(intrinsic) , intrinsic
68 #define INTRINSIC(intrinsic)
71 static const HashTableValue JSHTMLOListElementConstructorTableValues[] =
73 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
76 #undef THUNK_GENERATOR
77 static const HashTable JSHTMLOListElementConstructorTable = { 1, 0, JSHTMLOListElementConstructorTableValues, 0 };
78 const ClassInfo JSHTMLOListElementConstructor::s_info = { "HTMLOListElementConstructor", &DOMConstructorObject::s_info, &JSHTMLOListElementConstructorTable, 0, CREATE_METHOD_TABLE(JSHTMLOListElementConstructor) };
80 JSHTMLOListElementConstructor::JSHTMLOListElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
81 : DOMConstructorObject(structure, globalObject)
85 void JSHTMLOListElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
87 Base::finishCreation(exec->globalData());
88 ASSERT(inherits(&s_info));
89 putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLOListElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
92 bool JSHTMLOListElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
94 return getStaticValueSlot<JSHTMLOListElementConstructor, JSDOMWrapper>(exec, &JSHTMLOListElementConstructorTable, static_cast<JSHTMLOListElementConstructor*>(cell), propertyName, slot);
97 bool JSHTMLOListElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
99 return getStaticValueDescriptor<JSHTMLOListElementConstructor, JSDOMWrapper>(exec, &JSHTMLOListElementConstructorTable, static_cast<JSHTMLOListElementConstructor*>(object), propertyName, descriptor);
102 /* Hash table for prototype */
104 #define THUNK_GENERATOR(generator) , generator
106 #define THUNK_GENERATOR(generator)
109 #define INTRINSIC(intrinsic) , intrinsic
111 #define INTRINSIC(intrinsic)
114 static const HashTableValue JSHTMLOListElementPrototypeTableValues[] =
116 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
119 #undef THUNK_GENERATOR
120 static const HashTable JSHTMLOListElementPrototypeTable = { 1, 0, JSHTMLOListElementPrototypeTableValues, 0 };
121 const ClassInfo JSHTMLOListElementPrototype::s_info = { "HTMLOListElementPrototype", &JSC::JSNonFinalObject::s_info, &JSHTMLOListElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSHTMLOListElementPrototype) };
123 JSObject* JSHTMLOListElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
125 return getDOMPrototype<JSHTMLOListElement>(exec, globalObject);
128 const ClassInfo JSHTMLOListElement::s_info = { "HTMLOListElement", &JSHTMLElement::s_info, &JSHTMLOListElementTable, 0 , CREATE_METHOD_TABLE(JSHTMLOListElement) };
130 JSHTMLOListElement::JSHTMLOListElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLOListElement> impl)
131 : JSHTMLElement(structure, globalObject, impl)
135 void JSHTMLOListElement::finishCreation(JSGlobalData& globalData)
137 Base::finishCreation(globalData);
138 ASSERT(inherits(&s_info));
141 JSObject* JSHTMLOListElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
143 return JSHTMLOListElementPrototype::create(exec->globalData(), globalObject, JSHTMLOListElementPrototype::createStructure(exec->globalData(), globalObject, JSHTMLElementPrototype::self(exec, globalObject)));
146 bool JSHTMLOListElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
148 JSHTMLOListElement* thisObject = jsCast<JSHTMLOListElement*>(cell);
149 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
150 return getStaticValueSlot<JSHTMLOListElement, Base>(exec, &JSHTMLOListElementTable, thisObject, propertyName, slot);
153 bool JSHTMLOListElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
155 JSHTMLOListElement* thisObject = jsCast<JSHTMLOListElement*>(object);
156 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
157 return getStaticValueDescriptor<JSHTMLOListElement, Base>(exec, &JSHTMLOListElementTable, thisObject, propertyName, descriptor);
160 JSValue jsHTMLOListElementCompact(ExecState* exec, JSValue slotBase, const Identifier&)
162 JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(asObject(slotBase));
164 HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
165 JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::compactAttr));
170 JSValue jsHTMLOListElementStart(ExecState* exec, JSValue slotBase, const Identifier&)
172 JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(asObject(slotBase));
174 HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
175 JSValue result = jsNumber(imp->start());
180 JSValue jsHTMLOListElementType(ExecState* exec, JSValue slotBase, const Identifier&)
182 JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(asObject(slotBase));
184 HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
185 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::typeAttr));
190 JSValue jsHTMLOListElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
192 JSHTMLOListElement* domObject = static_cast<JSHTMLOListElement*>(asObject(slotBase));
193 return JSHTMLOListElement::getConstructor(exec, domObject->globalObject());
196 void JSHTMLOListElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
198 JSHTMLOListElement* thisObject = jsCast<JSHTMLOListElement*>(cell);
199 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
200 lookupPut<JSHTMLOListElement, Base>(exec, propertyName, value, &JSHTMLOListElementTable, thisObject, slot);
203 void setJSHTMLOListElementCompact(ExecState* exec, JSObject* thisObject, JSValue value)
205 JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(thisObject);
206 HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
207 imp->setBooleanAttribute(WebCore::HTMLNames::compactAttr, value.toBoolean(exec));
211 void setJSHTMLOListElementStart(ExecState* exec, JSObject* thisObject, JSValue value)
213 JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(thisObject);
214 HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
215 imp->setStart(value.toInt32(exec));
219 void setJSHTMLOListElementType(ExecState* exec, JSObject* thisObject, JSValue value)
221 JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(thisObject);
222 HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
223 imp->setAttribute(WebCore::HTMLNames::typeAttr, valueToStringWithNullCheck(exec, value));
227 JSValue JSHTMLOListElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
229 return getDOMConstructor<JSHTMLOListElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));