tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSHTMLOListElement.cpp
1 /*
2     This file is part of the WebKit open source project.
3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
4
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.
9
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.
14
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.
19 */
20
21 #include "config.h"
22 #include "JSHTMLOListElement.h"
23
24 #include "HTMLNames.h"
25 #include "HTMLOListElement.h"
26 #include "KURL.h"
27 #include <runtime/JSString.h>
28 #include <wtf/GetPtr.h>
29
30 using namespace JSC;
31
32 namespace WebCore {
33
34 ASSERT_CLASS_FITS_IN_CELL(JSHTMLOListElement);
35
36 /* Hash table */
37 #if ENABLE(JIT)
38 #define THUNK_GENERATOR(generator) , generator
39 #else
40 #define THUNK_GENERATOR(generator)
41 #endif
42 #if ENABLE(DFG_JIT)
43 #define INTRINSIC(intrinsic) , intrinsic
44 #else
45 #define INTRINSIC(intrinsic)
46 #endif
47
48 static const HashTableValue JSHTMLOListElementTableValues[] =
49 {
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) }
55 };
56
57 #undef THUNK_GENERATOR
58 static const HashTable JSHTMLOListElementTable = { 8, 7, JSHTMLOListElementTableValues, 0 };
59 /* Hash table for constructor */
60 #if ENABLE(JIT)
61 #define THUNK_GENERATOR(generator) , generator
62 #else
63 #define THUNK_GENERATOR(generator)
64 #endif
65 #if ENABLE(DFG_JIT)
66 #define INTRINSIC(intrinsic) , intrinsic
67 #else
68 #define INTRINSIC(intrinsic)
69 #endif
70
71 static const HashTableValue JSHTMLOListElementConstructorTableValues[] =
72 {
73     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
74 };
75
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) };
79
80 JSHTMLOListElementConstructor::JSHTMLOListElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
81     : DOMConstructorObject(structure, globalObject)
82 {
83 }
84
85 void JSHTMLOListElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
86 {
87     Base::finishCreation(exec->globalData());
88     ASSERT(inherits(&s_info));
89     putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLOListElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
90 }
91
92 bool JSHTMLOListElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
93 {
94     return getStaticValueSlot<JSHTMLOListElementConstructor, JSDOMWrapper>(exec, &JSHTMLOListElementConstructorTable, static_cast<JSHTMLOListElementConstructor*>(cell), propertyName, slot);
95 }
96
97 bool JSHTMLOListElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
98 {
99     return getStaticValueDescriptor<JSHTMLOListElementConstructor, JSDOMWrapper>(exec, &JSHTMLOListElementConstructorTable, static_cast<JSHTMLOListElementConstructor*>(object), propertyName, descriptor);
100 }
101
102 /* Hash table for prototype */
103 #if ENABLE(JIT)
104 #define THUNK_GENERATOR(generator) , generator
105 #else
106 #define THUNK_GENERATOR(generator)
107 #endif
108 #if ENABLE(DFG_JIT)
109 #define INTRINSIC(intrinsic) , intrinsic
110 #else
111 #define INTRINSIC(intrinsic)
112 #endif
113
114 static const HashTableValue JSHTMLOListElementPrototypeTableValues[] =
115 {
116     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
117 };
118
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) };
122
123 JSObject* JSHTMLOListElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
124 {
125     return getDOMPrototype<JSHTMLOListElement>(exec, globalObject);
126 }
127
128 const ClassInfo JSHTMLOListElement::s_info = { "HTMLOListElement", &JSHTMLElement::s_info, &JSHTMLOListElementTable, 0 , CREATE_METHOD_TABLE(JSHTMLOListElement) };
129
130 JSHTMLOListElement::JSHTMLOListElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLOListElement> impl)
131     : JSHTMLElement(structure, globalObject, impl)
132 {
133 }
134
135 void JSHTMLOListElement::finishCreation(JSGlobalData& globalData)
136 {
137     Base::finishCreation(globalData);
138     ASSERT(inherits(&s_info));
139 }
140
141 JSObject* JSHTMLOListElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
142 {
143     return JSHTMLOListElementPrototype::create(exec->globalData(), globalObject, JSHTMLOListElementPrototype::createStructure(exec->globalData(), globalObject, JSHTMLElementPrototype::self(exec, globalObject)));
144 }
145
146 bool JSHTMLOListElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
147 {
148     JSHTMLOListElement* thisObject = jsCast<JSHTMLOListElement*>(cell);
149     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
150     return getStaticValueSlot<JSHTMLOListElement, Base>(exec, &JSHTMLOListElementTable, thisObject, propertyName, slot);
151 }
152
153 bool JSHTMLOListElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
154 {
155     JSHTMLOListElement* thisObject = jsCast<JSHTMLOListElement*>(object);
156     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
157     return getStaticValueDescriptor<JSHTMLOListElement, Base>(exec, &JSHTMLOListElementTable, thisObject, propertyName, descriptor);
158 }
159
160 JSValue jsHTMLOListElementCompact(ExecState* exec, JSValue slotBase, const Identifier&)
161 {
162     JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(asObject(slotBase));
163     UNUSED_PARAM(exec);
164     HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
165     JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::compactAttr));
166     return result;
167 }
168
169
170 JSValue jsHTMLOListElementStart(ExecState* exec, JSValue slotBase, const Identifier&)
171 {
172     JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(asObject(slotBase));
173     UNUSED_PARAM(exec);
174     HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
175     JSValue result = jsNumber(imp->start());
176     return result;
177 }
178
179
180 JSValue jsHTMLOListElementType(ExecState* exec, JSValue slotBase, const Identifier&)
181 {
182     JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(asObject(slotBase));
183     UNUSED_PARAM(exec);
184     HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
185     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::typeAttr));
186     return result;
187 }
188
189
190 JSValue jsHTMLOListElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
191 {
192     JSHTMLOListElement* domObject = static_cast<JSHTMLOListElement*>(asObject(slotBase));
193     return JSHTMLOListElement::getConstructor(exec, domObject->globalObject());
194 }
195
196 void JSHTMLOListElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
197 {
198     JSHTMLOListElement* thisObject = jsCast<JSHTMLOListElement*>(cell);
199     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
200     lookupPut<JSHTMLOListElement, Base>(exec, propertyName, value, &JSHTMLOListElementTable, thisObject, slot);
201 }
202
203 void setJSHTMLOListElementCompact(ExecState* exec, JSObject* thisObject, JSValue value)
204 {
205     JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(thisObject);
206     HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
207     imp->setBooleanAttribute(WebCore::HTMLNames::compactAttr, value.toBoolean(exec));
208 }
209
210
211 void setJSHTMLOListElementStart(ExecState* exec, JSObject* thisObject, JSValue value)
212 {
213     JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(thisObject);
214     HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
215     imp->setStart(value.toInt32(exec));
216 }
217
218
219 void setJSHTMLOListElementType(ExecState* exec, JSObject* thisObject, JSValue value)
220 {
221     JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(thisObject);
222     HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
223     imp->setAttribute(WebCore::HTMLNames::typeAttr, valueToStringWithNullCheck(exec, value));
224 }
225
226
227 JSValue JSHTMLOListElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
228 {
229     return getDOMConstructor<JSHTMLOListElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
230 }
231
232
233 }