tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSHTMLBodyElement.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 "JSHTMLBodyElement.h"
23
24 #include "EventListener.h"
25 #include "HTMLBodyElement.h"
26 #include "HTMLNames.h"
27 #include "JSEventListener.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(JSHTMLBodyElement);
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 JSHTMLBodyElementTableValues[] =
51 {
52     { "aLink", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementALink), (intptr_t)setJSHTMLBodyElementALink THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
53     { "background", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementBackground), (intptr_t)setJSHTMLBodyElementBackground THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
54     { "bgColor", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementBgColor), (intptr_t)setJSHTMLBodyElementBgColor THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
55     { "link", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementLink), (intptr_t)setJSHTMLBodyElementLink THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
56     { "text", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementText), (intptr_t)setJSHTMLBodyElementText THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
57     { "vLink", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementVLink), (intptr_t)setJSHTMLBodyElementVLink THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
58     { "onbeforeunload", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnbeforeunload), (intptr_t)setJSHTMLBodyElementOnbeforeunload THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
59     { "onhashchange", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnhashchange), (intptr_t)setJSHTMLBodyElementOnhashchange THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
60     { "onmessage", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnmessage), (intptr_t)setJSHTMLBodyElementOnmessage THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
61     { "onoffline", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnoffline), (intptr_t)setJSHTMLBodyElementOnoffline THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
62     { "ononline", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnonline), (intptr_t)setJSHTMLBodyElementOnonline THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
63     { "onpopstate", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnpopstate), (intptr_t)setJSHTMLBodyElementOnpopstate THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
64     { "onresize", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnresize), (intptr_t)setJSHTMLBodyElementOnresize THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
65     { "onstorage", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnstorage), (intptr_t)setJSHTMLBodyElementOnstorage THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
66     { "onunload", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnunload), (intptr_t)setJSHTMLBodyElementOnunload THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
67 #if ENABLE(ORIENTATION_EVENTS)
68     { "onorientationchange", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnorientationchange), (intptr_t)setJSHTMLBodyElementOnorientationchange THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
69 #endif
70     { "onblur", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnblur), (intptr_t)setJSHTMLBodyElementOnblur THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
71     { "onerror", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnerror), (intptr_t)setJSHTMLBodyElementOnerror THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
72     { "onfocus", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnfocus), (intptr_t)setJSHTMLBodyElementOnfocus THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
73     { "onload", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnload), (intptr_t)setJSHTMLBodyElementOnload THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
74     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
75     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
76 };
77
78 #undef THUNK_GENERATOR
79 static const HashTable JSHTMLBodyElementTable = { 64, 63, JSHTMLBodyElementTableValues, 0 };
80 /* Hash table for constructor */
81 #if ENABLE(JIT)
82 #define THUNK_GENERATOR(generator) , generator
83 #else
84 #define THUNK_GENERATOR(generator)
85 #endif
86 #if ENABLE(DFG_JIT)
87 #define INTRINSIC(intrinsic) , intrinsic
88 #else
89 #define INTRINSIC(intrinsic)
90 #endif
91
92 static const HashTableValue JSHTMLBodyElementConstructorTableValues[] =
93 {
94     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
95 };
96
97 #undef THUNK_GENERATOR
98 static const HashTable JSHTMLBodyElementConstructorTable = { 1, 0, JSHTMLBodyElementConstructorTableValues, 0 };
99 const ClassInfo JSHTMLBodyElementConstructor::s_info = { "HTMLBodyElementConstructor", &DOMConstructorObject::s_info, &JSHTMLBodyElementConstructorTable, 0, CREATE_METHOD_TABLE(JSHTMLBodyElementConstructor) };
100
101 JSHTMLBodyElementConstructor::JSHTMLBodyElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
102     : DOMConstructorObject(structure, globalObject)
103 {
104 }
105
106 void JSHTMLBodyElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
107 {
108     Base::finishCreation(exec->globalData());
109     ASSERT(inherits(&s_info));
110     putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLBodyElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
111 }
112
113 bool JSHTMLBodyElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
114 {
115     return getStaticValueSlot<JSHTMLBodyElementConstructor, JSDOMWrapper>(exec, &JSHTMLBodyElementConstructorTable, static_cast<JSHTMLBodyElementConstructor*>(cell), propertyName, slot);
116 }
117
118 bool JSHTMLBodyElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
119 {
120     return getStaticValueDescriptor<JSHTMLBodyElementConstructor, JSDOMWrapper>(exec, &JSHTMLBodyElementConstructorTable, static_cast<JSHTMLBodyElementConstructor*>(object), propertyName, descriptor);
121 }
122
123 /* Hash table for prototype */
124 #if ENABLE(JIT)
125 #define THUNK_GENERATOR(generator) , generator
126 #else
127 #define THUNK_GENERATOR(generator)
128 #endif
129 #if ENABLE(DFG_JIT)
130 #define INTRINSIC(intrinsic) , intrinsic
131 #else
132 #define INTRINSIC(intrinsic)
133 #endif
134
135 static const HashTableValue JSHTMLBodyElementPrototypeTableValues[] =
136 {
137     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
138 };
139
140 #undef THUNK_GENERATOR
141 static const HashTable JSHTMLBodyElementPrototypeTable = { 1, 0, JSHTMLBodyElementPrototypeTableValues, 0 };
142 const ClassInfo JSHTMLBodyElementPrototype::s_info = { "HTMLBodyElementPrototype", &JSC::JSNonFinalObject::s_info, &JSHTMLBodyElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSHTMLBodyElementPrototype) };
143
144 JSObject* JSHTMLBodyElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
145 {
146     return getDOMPrototype<JSHTMLBodyElement>(exec, globalObject);
147 }
148
149 const ClassInfo JSHTMLBodyElement::s_info = { "HTMLBodyElement", &JSHTMLElement::s_info, &JSHTMLBodyElementTable, 0 , CREATE_METHOD_TABLE(JSHTMLBodyElement) };
150
151 JSHTMLBodyElement::JSHTMLBodyElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLBodyElement> impl)
152     : JSHTMLElement(structure, globalObject, impl)
153 {
154 }
155
156 void JSHTMLBodyElement::finishCreation(JSGlobalData& globalData)
157 {
158     Base::finishCreation(globalData);
159     ASSERT(inherits(&s_info));
160 }
161
162 JSObject* JSHTMLBodyElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
163 {
164     return JSHTMLBodyElementPrototype::create(exec->globalData(), globalObject, JSHTMLBodyElementPrototype::createStructure(exec->globalData(), globalObject, JSHTMLElementPrototype::self(exec, globalObject)));
165 }
166
167 bool JSHTMLBodyElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
168 {
169     JSHTMLBodyElement* thisObject = jsCast<JSHTMLBodyElement*>(cell);
170     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
171     return getStaticValueSlot<JSHTMLBodyElement, Base>(exec, &JSHTMLBodyElementTable, thisObject, propertyName, slot);
172 }
173
174 bool JSHTMLBodyElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
175 {
176     JSHTMLBodyElement* thisObject = jsCast<JSHTMLBodyElement*>(object);
177     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
178     return getStaticValueDescriptor<JSHTMLBodyElement, Base>(exec, &JSHTMLBodyElementTable, thisObject, propertyName, descriptor);
179 }
180
181 JSValue jsHTMLBodyElementALink(ExecState* exec, JSValue slotBase, const Identifier&)
182 {
183     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
184     UNUSED_PARAM(exec);
185     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
186     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alinkAttr));
187     return result;
188 }
189
190
191 JSValue jsHTMLBodyElementBackground(ExecState* exec, JSValue slotBase, const Identifier&)
192 {
193     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
194     UNUSED_PARAM(exec);
195     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
196     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::backgroundAttr));
197     return result;
198 }
199
200
201 JSValue jsHTMLBodyElementBgColor(ExecState* exec, JSValue slotBase, const Identifier&)
202 {
203     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
204     UNUSED_PARAM(exec);
205     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
206     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::bgcolorAttr));
207     return result;
208 }
209
210
211 JSValue jsHTMLBodyElementLink(ExecState* exec, JSValue slotBase, const Identifier&)
212 {
213     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
214     UNUSED_PARAM(exec);
215     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
216     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::linkAttr));
217     return result;
218 }
219
220
221 JSValue jsHTMLBodyElementText(ExecState* exec, JSValue slotBase, const Identifier&)
222 {
223     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
224     UNUSED_PARAM(exec);
225     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
226     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::textAttr));
227     return result;
228 }
229
230
231 JSValue jsHTMLBodyElementVLink(ExecState* exec, JSValue slotBase, const Identifier&)
232 {
233     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
234     UNUSED_PARAM(exec);
235     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
236     JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::vlinkAttr));
237     return result;
238 }
239
240
241 JSValue jsHTMLBodyElementOnbeforeunload(ExecState* exec, JSValue slotBase, const Identifier&)
242 {
243     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
244     UNUSED_PARAM(exec);
245     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
246     if (EventListener* listener = imp->onbeforeunload()) {
247         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
248             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
249                 return jsFunction;
250         }
251     }
252     return jsNull();
253 }
254
255
256 JSValue jsHTMLBodyElementOnhashchange(ExecState* exec, JSValue slotBase, const Identifier&)
257 {
258     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
259     UNUSED_PARAM(exec);
260     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
261     if (EventListener* listener = imp->onhashchange()) {
262         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
263             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
264                 return jsFunction;
265         }
266     }
267     return jsNull();
268 }
269
270
271 JSValue jsHTMLBodyElementOnmessage(ExecState* exec, JSValue slotBase, const Identifier&)
272 {
273     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
274     UNUSED_PARAM(exec);
275     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
276     if (EventListener* listener = imp->onmessage()) {
277         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
278             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
279                 return jsFunction;
280         }
281     }
282     return jsNull();
283 }
284
285
286 JSValue jsHTMLBodyElementOnoffline(ExecState* exec, JSValue slotBase, const Identifier&)
287 {
288     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
289     UNUSED_PARAM(exec);
290     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
291     if (EventListener* listener = imp->onoffline()) {
292         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
293             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
294                 return jsFunction;
295         }
296     }
297     return jsNull();
298 }
299
300
301 JSValue jsHTMLBodyElementOnonline(ExecState* exec, JSValue slotBase, const Identifier&)
302 {
303     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
304     UNUSED_PARAM(exec);
305     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
306     if (EventListener* listener = imp->ononline()) {
307         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
308             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
309                 return jsFunction;
310         }
311     }
312     return jsNull();
313 }
314
315
316 JSValue jsHTMLBodyElementOnpopstate(ExecState* exec, JSValue slotBase, const Identifier&)
317 {
318     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
319     UNUSED_PARAM(exec);
320     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
321     if (EventListener* listener = imp->onpopstate()) {
322         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
323             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
324                 return jsFunction;
325         }
326     }
327     return jsNull();
328 }
329
330
331 JSValue jsHTMLBodyElementOnresize(ExecState* exec, JSValue slotBase, const Identifier&)
332 {
333     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
334     UNUSED_PARAM(exec);
335     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
336     if (EventListener* listener = imp->onresize()) {
337         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
338             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
339                 return jsFunction;
340         }
341     }
342     return jsNull();
343 }
344
345
346 JSValue jsHTMLBodyElementOnstorage(ExecState* exec, JSValue slotBase, const Identifier&)
347 {
348     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
349     UNUSED_PARAM(exec);
350     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
351     if (EventListener* listener = imp->onstorage()) {
352         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
353             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
354                 return jsFunction;
355         }
356     }
357     return jsNull();
358 }
359
360
361 JSValue jsHTMLBodyElementOnunload(ExecState* exec, JSValue slotBase, const Identifier&)
362 {
363     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
364     UNUSED_PARAM(exec);
365     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
366     if (EventListener* listener = imp->onunload()) {
367         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
368             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
369                 return jsFunction;
370         }
371     }
372     return jsNull();
373 }
374
375
376 #if ENABLE(ORIENTATION_EVENTS)
377 JSValue jsHTMLBodyElementOnorientationchange(ExecState* exec, JSValue slotBase, const Identifier&)
378 {
379     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
380     UNUSED_PARAM(exec);
381     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
382     if (EventListener* listener = imp->onorientationchange()) {
383         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
384             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
385                 return jsFunction;
386         }
387     }
388     return jsNull();
389 }
390
391 #endif
392
393 JSValue jsHTMLBodyElementOnblur(ExecState* exec, JSValue slotBase, const Identifier&)
394 {
395     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
396     UNUSED_PARAM(exec);
397     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
398     if (EventListener* listener = imp->onblur()) {
399         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
400             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
401                 return jsFunction;
402         }
403     }
404     return jsNull();
405 }
406
407
408 JSValue jsHTMLBodyElementOnerror(ExecState* exec, JSValue slotBase, const Identifier&)
409 {
410     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
411     UNUSED_PARAM(exec);
412     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
413     if (EventListener* listener = imp->onerror()) {
414         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
415             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
416                 return jsFunction;
417         }
418     }
419     return jsNull();
420 }
421
422
423 JSValue jsHTMLBodyElementOnfocus(ExecState* exec, JSValue slotBase, const Identifier&)
424 {
425     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
426     UNUSED_PARAM(exec);
427     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
428     if (EventListener* listener = imp->onfocus()) {
429         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
430             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
431                 return jsFunction;
432         }
433     }
434     return jsNull();
435 }
436
437
438 JSValue jsHTMLBodyElementOnload(ExecState* exec, JSValue slotBase, const Identifier&)
439 {
440     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
441     UNUSED_PARAM(exec);
442     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
443     if (EventListener* listener = imp->onload()) {
444         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
445             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
446                 return jsFunction;
447         }
448     }
449     return jsNull();
450 }
451
452
453 JSValue jsHTMLBodyElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
454 {
455     JSHTMLBodyElement* domObject = static_cast<JSHTMLBodyElement*>(asObject(slotBase));
456     return JSHTMLBodyElement::getConstructor(exec, domObject->globalObject());
457 }
458
459 void JSHTMLBodyElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
460 {
461     JSHTMLBodyElement* thisObject = jsCast<JSHTMLBodyElement*>(cell);
462     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
463     lookupPut<JSHTMLBodyElement, Base>(exec, propertyName, value, &JSHTMLBodyElementTable, thisObject, slot);
464 }
465
466 void setJSHTMLBodyElementALink(ExecState* exec, JSObject* thisObject, JSValue value)
467 {
468     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
469     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
470     imp->setAttribute(WebCore::HTMLNames::alinkAttr, valueToStringWithNullCheck(exec, value));
471 }
472
473
474 void setJSHTMLBodyElementBackground(ExecState* exec, JSObject* thisObject, JSValue value)
475 {
476     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
477     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
478     imp->setAttribute(WebCore::HTMLNames::backgroundAttr, valueToStringWithNullCheck(exec, value));
479 }
480
481
482 void setJSHTMLBodyElementBgColor(ExecState* exec, JSObject* thisObject, JSValue value)
483 {
484     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
485     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
486     imp->setAttribute(WebCore::HTMLNames::bgcolorAttr, valueToStringWithNullCheck(exec, value));
487 }
488
489
490 void setJSHTMLBodyElementLink(ExecState* exec, JSObject* thisObject, JSValue value)
491 {
492     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
493     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
494     imp->setAttribute(WebCore::HTMLNames::linkAttr, valueToStringWithNullCheck(exec, value));
495 }
496
497
498 void setJSHTMLBodyElementText(ExecState* exec, JSObject* thisObject, JSValue value)
499 {
500     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
501     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
502     imp->setAttribute(WebCore::HTMLNames::textAttr, valueToStringWithNullCheck(exec, value));
503 }
504
505
506 void setJSHTMLBodyElementVLink(ExecState* exec, JSObject* thisObject, JSValue value)
507 {
508     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
509     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
510     imp->setAttribute(WebCore::HTMLNames::vlinkAttr, valueToStringWithNullCheck(exec, value));
511 }
512
513
514 void setJSHTMLBodyElementOnbeforeunload(ExecState* exec, JSObject* thisObject, JSValue value)
515 {
516     UNUSED_PARAM(exec);
517     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
518     JSDOMGlobalObject* globalObject = castedThis->globalObject();
519     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
520     imp->setOnbeforeunload(createJSAttributeEventListener(exec, value, globalObject));
521 }
522
523
524 void setJSHTMLBodyElementOnhashchange(ExecState* exec, JSObject* thisObject, JSValue value)
525 {
526     UNUSED_PARAM(exec);
527     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
528     JSDOMGlobalObject* globalObject = castedThis->globalObject();
529     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
530     imp->setOnhashchange(createJSAttributeEventListener(exec, value, globalObject));
531 }
532
533
534 void setJSHTMLBodyElementOnmessage(ExecState* exec, JSObject* thisObject, JSValue value)
535 {
536     UNUSED_PARAM(exec);
537     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
538     JSDOMGlobalObject* globalObject = castedThis->globalObject();
539     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
540     imp->setOnmessage(createJSAttributeEventListener(exec, value, globalObject));
541 }
542
543
544 void setJSHTMLBodyElementOnoffline(ExecState* exec, JSObject* thisObject, JSValue value)
545 {
546     UNUSED_PARAM(exec);
547     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
548     JSDOMGlobalObject* globalObject = castedThis->globalObject();
549     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
550     imp->setOnoffline(createJSAttributeEventListener(exec, value, globalObject));
551 }
552
553
554 void setJSHTMLBodyElementOnonline(ExecState* exec, JSObject* thisObject, JSValue value)
555 {
556     UNUSED_PARAM(exec);
557     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
558     JSDOMGlobalObject* globalObject = castedThis->globalObject();
559     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
560     imp->setOnonline(createJSAttributeEventListener(exec, value, globalObject));
561 }
562
563
564 void setJSHTMLBodyElementOnpopstate(ExecState* exec, JSObject* thisObject, JSValue value)
565 {
566     UNUSED_PARAM(exec);
567     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
568     JSDOMGlobalObject* globalObject = castedThis->globalObject();
569     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
570     imp->setOnpopstate(createJSAttributeEventListener(exec, value, globalObject));
571 }
572
573
574 void setJSHTMLBodyElementOnresize(ExecState* exec, JSObject* thisObject, JSValue value)
575 {
576     UNUSED_PARAM(exec);
577     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
578     JSDOMGlobalObject* globalObject = castedThis->globalObject();
579     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
580     imp->setOnresize(createJSAttributeEventListener(exec, value, globalObject));
581 }
582
583
584 void setJSHTMLBodyElementOnstorage(ExecState* exec, JSObject* thisObject, JSValue value)
585 {
586     UNUSED_PARAM(exec);
587     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
588     JSDOMGlobalObject* globalObject = castedThis->globalObject();
589     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
590     imp->setOnstorage(createJSAttributeEventListener(exec, value, globalObject));
591 }
592
593
594 void setJSHTMLBodyElementOnunload(ExecState* exec, JSObject* thisObject, JSValue value)
595 {
596     UNUSED_PARAM(exec);
597     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
598     JSDOMGlobalObject* globalObject = castedThis->globalObject();
599     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
600     imp->setOnunload(createJSAttributeEventListener(exec, value, globalObject));
601 }
602
603
604 #if ENABLE(ORIENTATION_EVENTS)
605 void setJSHTMLBodyElementOnorientationchange(ExecState* exec, JSObject* thisObject, JSValue value)
606 {
607     UNUSED_PARAM(exec);
608     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
609     JSDOMGlobalObject* globalObject = castedThis->globalObject();
610     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
611     imp->setOnorientationchange(createJSAttributeEventListener(exec, value, globalObject));
612 }
613
614 #endif
615
616 void setJSHTMLBodyElementOnblur(ExecState* exec, JSObject* thisObject, JSValue value)
617 {
618     UNUSED_PARAM(exec);
619     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
620     JSDOMGlobalObject* globalObject = castedThis->globalObject();
621     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
622     imp->setOnblur(createJSAttributeEventListener(exec, value, globalObject));
623 }
624
625
626 void setJSHTMLBodyElementOnerror(ExecState* exec, JSObject* thisObject, JSValue value)
627 {
628     UNUSED_PARAM(exec);
629     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
630     JSDOMGlobalObject* globalObject = castedThis->globalObject();
631     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
632     imp->setOnerror(createJSAttributeEventListener(exec, value, globalObject));
633 }
634
635
636 void setJSHTMLBodyElementOnfocus(ExecState* exec, JSObject* thisObject, JSValue value)
637 {
638     UNUSED_PARAM(exec);
639     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
640     JSDOMGlobalObject* globalObject = castedThis->globalObject();
641     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
642     imp->setOnfocus(createJSAttributeEventListener(exec, value, globalObject));
643 }
644
645
646 void setJSHTMLBodyElementOnload(ExecState* exec, JSObject* thisObject, JSValue value)
647 {
648     UNUSED_PARAM(exec);
649     JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject);
650     JSDOMGlobalObject* globalObject = castedThis->globalObject();
651     HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl());
652     imp->setOnload(createJSAttributeEventListener(exec, value, globalObject));
653 }
654
655
656 JSValue JSHTMLBodyElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
657 {
658     return getDOMConstructor<JSHTMLBodyElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
659 }
660
661
662 }