tizen beta release
[framework/web/webkit-efl.git] / DerivedSources / WebCore / JSHTMLHeadingElement.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 "JSHTMLHeadingElement.h"
23
24 #include "HTMLHeadingElement.h"
25 #include "HTMLNames.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(JSHTMLHeadingElement);
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 JSHTMLHeadingElementTableValues[] =
49 {
50     { "align", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLHeadingElementAlign), (intptr_t)setJSHTMLHeadingElementAlign THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
51     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLHeadingElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
52     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
53 };
54
55 #undef THUNK_GENERATOR
56 static const HashTable JSHTMLHeadingElementTable = { 5, 3, JSHTMLHeadingElementTableValues, 0 };
57 /* Hash table for constructor */
58 #if ENABLE(JIT)
59 #define THUNK_GENERATOR(generator) , generator
60 #else
61 #define THUNK_GENERATOR(generator)
62 #endif
63 #if ENABLE(DFG_JIT)
64 #define INTRINSIC(intrinsic) , intrinsic
65 #else
66 #define INTRINSIC(intrinsic)
67 #endif
68
69 static const HashTableValue JSHTMLHeadingElementConstructorTableValues[] =
70 {
71     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
72 };
73
74 #undef THUNK_GENERATOR
75 static const HashTable JSHTMLHeadingElementConstructorTable = { 1, 0, JSHTMLHeadingElementConstructorTableValues, 0 };
76 const ClassInfo JSHTMLHeadingElementConstructor::s_info = { "HTMLHeadingElementConstructor", &DOMConstructorObject::s_info, &JSHTMLHeadingElementConstructorTable, 0, CREATE_METHOD_TABLE(JSHTMLHeadingElementConstructor) };
77
78 JSHTMLHeadingElementConstructor::JSHTMLHeadingElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
79     : DOMConstructorObject(structure, globalObject)
80 {
81 }
82
83 void JSHTMLHeadingElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
84 {
85     Base::finishCreation(exec->globalData());
86     ASSERT(inherits(&s_info));
87     putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLHeadingElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
88 }
89
90 bool JSHTMLHeadingElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
91 {
92     return getStaticValueSlot<JSHTMLHeadingElementConstructor, JSDOMWrapper>(exec, &JSHTMLHeadingElementConstructorTable, static_cast<JSHTMLHeadingElementConstructor*>(cell), propertyName, slot);
93 }
94
95 bool JSHTMLHeadingElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
96 {
97     return getStaticValueDescriptor<JSHTMLHeadingElementConstructor, JSDOMWrapper>(exec, &JSHTMLHeadingElementConstructorTable, static_cast<JSHTMLHeadingElementConstructor*>(object), propertyName, descriptor);
98 }
99
100 /* Hash table for prototype */
101 #if ENABLE(JIT)
102 #define THUNK_GENERATOR(generator) , generator
103 #else
104 #define THUNK_GENERATOR(generator)
105 #endif
106 #if ENABLE(DFG_JIT)
107 #define INTRINSIC(intrinsic) , intrinsic
108 #else
109 #define INTRINSIC(intrinsic)
110 #endif
111
112 static const HashTableValue JSHTMLHeadingElementPrototypeTableValues[] =
113 {
114     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
115 };
116
117 #undef THUNK_GENERATOR
118 static const HashTable JSHTMLHeadingElementPrototypeTable = { 1, 0, JSHTMLHeadingElementPrototypeTableValues, 0 };
119 const ClassInfo JSHTMLHeadingElementPrototype::s_info = { "HTMLHeadingElementPrototype", &JSC::JSNonFinalObject::s_info, &JSHTMLHeadingElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSHTMLHeadingElementPrototype) };
120
121 JSObject* JSHTMLHeadingElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
122 {
123     return getDOMPrototype<JSHTMLHeadingElement>(exec, globalObject);
124 }
125
126 const ClassInfo JSHTMLHeadingElement::s_info = { "HTMLHeadingElement", &JSHTMLElement::s_info, &JSHTMLHeadingElementTable, 0 , CREATE_METHOD_TABLE(JSHTMLHeadingElement) };
127
128 JSHTMLHeadingElement::JSHTMLHeadingElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLHeadingElement> impl)
129     : JSHTMLElement(structure, globalObject, impl)
130 {
131 }
132
133 void JSHTMLHeadingElement::finishCreation(JSGlobalData& globalData)
134 {
135     Base::finishCreation(globalData);
136     ASSERT(inherits(&s_info));
137 }
138
139 JSObject* JSHTMLHeadingElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
140 {
141     return JSHTMLHeadingElementPrototype::create(exec->globalData(), globalObject, JSHTMLHeadingElementPrototype::createStructure(exec->globalData(), globalObject, JSHTMLElementPrototype::self(exec, globalObject)));
142 }
143
144 bool JSHTMLHeadingElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
145 {
146     JSHTMLHeadingElement* thisObject = jsCast<JSHTMLHeadingElement*>(cell);
147     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
148     return getStaticValueSlot<JSHTMLHeadingElement, Base>(exec, &JSHTMLHeadingElementTable, thisObject, propertyName, slot);
149 }
150
151 bool JSHTMLHeadingElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
152 {
153     JSHTMLHeadingElement* thisObject = jsCast<JSHTMLHeadingElement*>(object);
154     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
155     return getStaticValueDescriptor<JSHTMLHeadingElement, Base>(exec, &JSHTMLHeadingElementTable, thisObject, propertyName, descriptor);
156 }
157
158 JSValue jsHTMLHeadingElementAlign(ExecState* exec, JSValue slotBase, const Identifier&)
159 {
160     JSHTMLHeadingElement* castedThis = static_cast<JSHTMLHeadingElement*>(asObject(slotBase));
161     UNUSED_PARAM(exec);
162     HTMLHeadingElement* imp = static_cast<HTMLHeadingElement*>(castedThis->impl());
163     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alignAttr));
164     return result;
165 }
166
167
168 JSValue jsHTMLHeadingElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
169 {
170     JSHTMLHeadingElement* domObject = static_cast<JSHTMLHeadingElement*>(asObject(slotBase));
171     return JSHTMLHeadingElement::getConstructor(exec, domObject->globalObject());
172 }
173
174 void JSHTMLHeadingElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
175 {
176     JSHTMLHeadingElement* thisObject = jsCast<JSHTMLHeadingElement*>(cell);
177     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
178     lookupPut<JSHTMLHeadingElement, Base>(exec, propertyName, value, &JSHTMLHeadingElementTable, thisObject, slot);
179 }
180
181 void setJSHTMLHeadingElementAlign(ExecState* exec, JSObject* thisObject, JSValue value)
182 {
183     JSHTMLHeadingElement* castedThis = static_cast<JSHTMLHeadingElement*>(thisObject);
184     HTMLHeadingElement* imp = static_cast<HTMLHeadingElement*>(castedThis->impl());
185     imp->setAttribute(WebCore::HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value));
186 }
187
188
189 JSValue JSHTMLHeadingElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
190 {
191     return getDOMConstructor<JSHTMLHeadingElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
192 }
193
194
195 }