tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSHTMLLegendElement.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 "JSHTMLLegendElement.h"
23
24 #include "HTMLFormElement.h"
25 #include "HTMLLegendElement.h"
26 #include "HTMLNames.h"
27 #include "JSHTMLFormElement.h"
28 #include "KURL.h"
29 #include <runtime/JSString.h>
30 #include <wtf/GetPtr.h>
31
32 using namespace JSC;
33
34 namespace WebCore {
35
36 ASSERT_CLASS_FITS_IN_CELL(JSHTMLLegendElement);
37
38 /* Hash table */
39 #if ENABLE(JIT)
40 #define THUNK_GENERATOR(generator) , generator
41 #else
42 #define THUNK_GENERATOR(generator)
43 #endif
44 #if ENABLE(DFG_JIT)
45 #define INTRINSIC(intrinsic) , intrinsic
46 #else
47 #define INTRINSIC(intrinsic)
48 #endif
49
50 static const HashTableValue JSHTMLLegendElementTableValues[] =
51 {
52     { "form", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLegendElementForm), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
53     { "align", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLegendElementAlign), (intptr_t)setJSHTMLLegendElementAlign THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
54     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLegendElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
55     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
56 };
57
58 #undef THUNK_GENERATOR
59 static const HashTable JSHTMLLegendElementTable = { 9, 7, JSHTMLLegendElementTableValues, 0 };
60 /* Hash table for constructor */
61 #if ENABLE(JIT)
62 #define THUNK_GENERATOR(generator) , generator
63 #else
64 #define THUNK_GENERATOR(generator)
65 #endif
66 #if ENABLE(DFG_JIT)
67 #define INTRINSIC(intrinsic) , intrinsic
68 #else
69 #define INTRINSIC(intrinsic)
70 #endif
71
72 static const HashTableValue JSHTMLLegendElementConstructorTableValues[] =
73 {
74     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
75 };
76
77 #undef THUNK_GENERATOR
78 static const HashTable JSHTMLLegendElementConstructorTable = { 1, 0, JSHTMLLegendElementConstructorTableValues, 0 };
79 const ClassInfo JSHTMLLegendElementConstructor::s_info = { "HTMLLegendElementConstructor", &DOMConstructorObject::s_info, &JSHTMLLegendElementConstructorTable, 0, CREATE_METHOD_TABLE(JSHTMLLegendElementConstructor) };
80
81 JSHTMLLegendElementConstructor::JSHTMLLegendElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
82     : DOMConstructorObject(structure, globalObject)
83 {
84 }
85
86 void JSHTMLLegendElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
87 {
88     Base::finishCreation(exec->globalData());
89     ASSERT(inherits(&s_info));
90     putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLLegendElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
91 }
92
93 bool JSHTMLLegendElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
94 {
95     return getStaticValueSlot<JSHTMLLegendElementConstructor, JSDOMWrapper>(exec, &JSHTMLLegendElementConstructorTable, static_cast<JSHTMLLegendElementConstructor*>(cell), propertyName, slot);
96 }
97
98 bool JSHTMLLegendElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
99 {
100     return getStaticValueDescriptor<JSHTMLLegendElementConstructor, JSDOMWrapper>(exec, &JSHTMLLegendElementConstructorTable, static_cast<JSHTMLLegendElementConstructor*>(object), propertyName, descriptor);
101 }
102
103 /* Hash table for prototype */
104 #if ENABLE(JIT)
105 #define THUNK_GENERATOR(generator) , generator
106 #else
107 #define THUNK_GENERATOR(generator)
108 #endif
109 #if ENABLE(DFG_JIT)
110 #define INTRINSIC(intrinsic) , intrinsic
111 #else
112 #define INTRINSIC(intrinsic)
113 #endif
114
115 static const HashTableValue JSHTMLLegendElementPrototypeTableValues[] =
116 {
117     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
118 };
119
120 #undef THUNK_GENERATOR
121 static const HashTable JSHTMLLegendElementPrototypeTable = { 1, 0, JSHTMLLegendElementPrototypeTableValues, 0 };
122 const ClassInfo JSHTMLLegendElementPrototype::s_info = { "HTMLLegendElementPrototype", &JSC::JSNonFinalObject::s_info, &JSHTMLLegendElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSHTMLLegendElementPrototype) };
123
124 JSObject* JSHTMLLegendElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
125 {
126     return getDOMPrototype<JSHTMLLegendElement>(exec, globalObject);
127 }
128
129 const ClassInfo JSHTMLLegendElement::s_info = { "HTMLLegendElement", &JSHTMLElement::s_info, &JSHTMLLegendElementTable, 0 , CREATE_METHOD_TABLE(JSHTMLLegendElement) };
130
131 JSHTMLLegendElement::JSHTMLLegendElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLLegendElement> impl)
132     : JSHTMLElement(structure, globalObject, impl)
133 {
134 }
135
136 void JSHTMLLegendElement::finishCreation(JSGlobalData& globalData)
137 {
138     Base::finishCreation(globalData);
139     ASSERT(inherits(&s_info));
140 }
141
142 JSObject* JSHTMLLegendElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
143 {
144     return JSHTMLLegendElementPrototype::create(exec->globalData(), globalObject, JSHTMLLegendElementPrototype::createStructure(exec->globalData(), globalObject, JSHTMLElementPrototype::self(exec, globalObject)));
145 }
146
147 bool JSHTMLLegendElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
148 {
149     JSHTMLLegendElement* thisObject = jsCast<JSHTMLLegendElement*>(cell);
150     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
151     return getStaticValueSlot<JSHTMLLegendElement, Base>(exec, &JSHTMLLegendElementTable, thisObject, propertyName, slot);
152 }
153
154 bool JSHTMLLegendElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
155 {
156     JSHTMLLegendElement* thisObject = jsCast<JSHTMLLegendElement*>(object);
157     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
158     return getStaticValueDescriptor<JSHTMLLegendElement, Base>(exec, &JSHTMLLegendElementTable, thisObject, propertyName, descriptor);
159 }
160
161 JSValue jsHTMLLegendElementForm(ExecState* exec, JSValue slotBase, const Identifier&)
162 {
163     JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(asObject(slotBase));
164     UNUSED_PARAM(exec);
165     HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl());
166     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form()));
167     return result;
168 }
169
170
171 JSValue jsHTMLLegendElementAlign(ExecState* exec, JSValue slotBase, const Identifier&)
172 {
173     JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(asObject(slotBase));
174     UNUSED_PARAM(exec);
175     HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl());
176     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alignAttr));
177     return result;
178 }
179
180
181 JSValue jsHTMLLegendElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
182 {
183     JSHTMLLegendElement* domObject = static_cast<JSHTMLLegendElement*>(asObject(slotBase));
184     return JSHTMLLegendElement::getConstructor(exec, domObject->globalObject());
185 }
186
187 void JSHTMLLegendElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
188 {
189     JSHTMLLegendElement* thisObject = jsCast<JSHTMLLegendElement*>(cell);
190     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
191     lookupPut<JSHTMLLegendElement, Base>(exec, propertyName, value, &JSHTMLLegendElementTable, thisObject, slot);
192 }
193
194 void setJSHTMLLegendElementAlign(ExecState* exec, JSObject* thisObject, JSValue value)
195 {
196     JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(thisObject);
197     HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl());
198     imp->setAttribute(WebCore::HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value));
199 }
200
201
202 JSValue JSHTMLLegendElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
203 {
204     return getDOMConstructor<JSHTMLLegendElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
205 }
206
207
208 }