|
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 |
|
45 static const HashTableValue JSHTMLBodyElementTableValues[21] = |
|
46 { |
|
47 { "aLink", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementALink), (intptr_t)setJSHTMLBodyElementALink THUNK_GENERATOR(0) }, |
|
48 { "background", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementBackground), (intptr_t)setJSHTMLBodyElementBackground THUNK_GENERATOR(0) }, |
|
49 { "bgColor", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementBgColor), (intptr_t)setJSHTMLBodyElementBgColor THUNK_GENERATOR(0) }, |
|
50 { "link", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementLink), (intptr_t)setJSHTMLBodyElementLink THUNK_GENERATOR(0) }, |
|
51 { "text", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementText), (intptr_t)setJSHTMLBodyElementText THUNK_GENERATOR(0) }, |
|
52 { "vLink", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementVLink), (intptr_t)setJSHTMLBodyElementVLink THUNK_GENERATOR(0) }, |
|
53 { "onbeforeunload", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnbeforeunload), (intptr_t)setJSHTMLBodyElementOnbeforeunload THUNK_GENERATOR(0) }, |
|
54 { "onhashchange", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnhashchange), (intptr_t)setJSHTMLBodyElementOnhashchange THUNK_GENERATOR(0) }, |
|
55 { "onmessage", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnmessage), (intptr_t)setJSHTMLBodyElementOnmessage THUNK_GENERATOR(0) }, |
|
56 { "onoffline", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnoffline), (intptr_t)setJSHTMLBodyElementOnoffline THUNK_GENERATOR(0) }, |
|
57 { "ononline", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnonline), (intptr_t)setJSHTMLBodyElementOnonline THUNK_GENERATOR(0) }, |
|
58 { "onpopstate", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnpopstate), (intptr_t)setJSHTMLBodyElementOnpopstate THUNK_GENERATOR(0) }, |
|
59 { "onresize", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnresize), (intptr_t)setJSHTMLBodyElementOnresize THUNK_GENERATOR(0) }, |
|
60 { "onstorage", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnstorage), (intptr_t)setJSHTMLBodyElementOnstorage THUNK_GENERATOR(0) }, |
|
61 { "onunload", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnunload), (intptr_t)setJSHTMLBodyElementOnunload THUNK_GENERATOR(0) }, |
|
62 { "onblur", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnblur), (intptr_t)setJSHTMLBodyElementOnblur THUNK_GENERATOR(0) }, |
|
63 { "onerror", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnerror), (intptr_t)setJSHTMLBodyElementOnerror THUNK_GENERATOR(0) }, |
|
64 { "onfocus", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnfocus), (intptr_t)setJSHTMLBodyElementOnfocus THUNK_GENERATOR(0) }, |
|
65 { "onload", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementOnload), (intptr_t)setJSHTMLBodyElementOnload THUNK_GENERATOR(0) }, |
|
66 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBodyElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
67 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
68 }; |
|
69 |
|
70 #undef THUNK_GENERATOR |
|
71 static JSC_CONST_HASHTABLE HashTable JSHTMLBodyElementTable = { 64, 63, JSHTMLBodyElementTableValues, 0 }; |
|
72 /* Hash table for constructor */ |
|
73 #if ENABLE(JIT) |
|
74 #define THUNK_GENERATOR(generator) , generator |
|
75 #else |
|
76 #define THUNK_GENERATOR(generator) |
|
77 #endif |
|
78 |
|
79 static const HashTableValue JSHTMLBodyElementConstructorTableValues[1] = |
|
80 { |
|
81 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
82 }; |
|
83 |
|
84 #undef THUNK_GENERATOR |
|
85 static JSC_CONST_HASHTABLE HashTable JSHTMLBodyElementConstructorTable = { 1, 0, JSHTMLBodyElementConstructorTableValues, 0 }; |
|
86 class JSHTMLBodyElementConstructor : public DOMConstructorObject { |
|
87 public: |
|
88 JSHTMLBodyElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
89 |
|
90 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
91 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
92 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
93 static const JSC::ClassInfo s_info; |
|
94 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
95 { |
|
96 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
97 } |
|
98 protected: |
|
99 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
100 }; |
|
101 |
|
102 const ClassInfo JSHTMLBodyElementConstructor::s_info = { "HTMLBodyElementConstructor", 0, &JSHTMLBodyElementConstructorTable, 0 }; |
|
103 |
|
104 JSHTMLBodyElementConstructor::JSHTMLBodyElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
105 : DOMConstructorObject(JSHTMLBodyElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
106 { |
|
107 putDirect(exec->propertyNames().prototype, JSHTMLBodyElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
108 } |
|
109 |
|
110 bool JSHTMLBodyElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
111 { |
|
112 return getStaticValueSlot<JSHTMLBodyElementConstructor, DOMObject>(exec, &JSHTMLBodyElementConstructorTable, this, propertyName, slot); |
|
113 } |
|
114 |
|
115 bool JSHTMLBodyElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
116 { |
|
117 return getStaticValueDescriptor<JSHTMLBodyElementConstructor, DOMObject>(exec, &JSHTMLBodyElementConstructorTable, this, propertyName, descriptor); |
|
118 } |
|
119 |
|
120 /* Hash table for prototype */ |
|
121 #if ENABLE(JIT) |
|
122 #define THUNK_GENERATOR(generator) , generator |
|
123 #else |
|
124 #define THUNK_GENERATOR(generator) |
|
125 #endif |
|
126 |
|
127 static const HashTableValue JSHTMLBodyElementPrototypeTableValues[1] = |
|
128 { |
|
129 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
130 }; |
|
131 |
|
132 #undef THUNK_GENERATOR |
|
133 static JSC_CONST_HASHTABLE HashTable JSHTMLBodyElementPrototypeTable = { 1, 0, JSHTMLBodyElementPrototypeTableValues, 0 }; |
|
134 const ClassInfo JSHTMLBodyElementPrototype::s_info = { "HTMLBodyElementPrototype", 0, &JSHTMLBodyElementPrototypeTable, 0 }; |
|
135 |
|
136 JSObject* JSHTMLBodyElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
137 { |
|
138 return getDOMPrototype<JSHTMLBodyElement>(exec, globalObject); |
|
139 } |
|
140 |
|
141 const ClassInfo JSHTMLBodyElement::s_info = { "HTMLBodyElement", &JSHTMLElement::s_info, &JSHTMLBodyElementTable, 0 }; |
|
142 |
|
143 JSHTMLBodyElement::JSHTMLBodyElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLBodyElement> impl) |
|
144 : JSHTMLElement(structure, globalObject, impl) |
|
145 { |
|
146 } |
|
147 |
|
148 JSObject* JSHTMLBodyElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
149 { |
|
150 return new (exec) JSHTMLBodyElementPrototype(globalObject, JSHTMLBodyElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject))); |
|
151 } |
|
152 |
|
153 bool JSHTMLBodyElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
154 { |
|
155 return getStaticValueSlot<JSHTMLBodyElement, Base>(exec, &JSHTMLBodyElementTable, this, propertyName, slot); |
|
156 } |
|
157 |
|
158 bool JSHTMLBodyElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
159 { |
|
160 return getStaticValueDescriptor<JSHTMLBodyElement, Base>(exec, &JSHTMLBodyElementTable, this, propertyName, descriptor); |
|
161 } |
|
162 |
|
163 JSValue jsHTMLBodyElementALink(ExecState* exec, JSValue slotBase, const Identifier&) |
|
164 { |
|
165 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
166 UNUSED_PARAM(exec); |
|
167 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
168 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alinkAttr)); |
|
169 return result; |
|
170 } |
|
171 |
|
172 JSValue jsHTMLBodyElementBackground(ExecState* exec, JSValue slotBase, const Identifier&) |
|
173 { |
|
174 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
175 UNUSED_PARAM(exec); |
|
176 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
177 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::backgroundAttr)); |
|
178 return result; |
|
179 } |
|
180 |
|
181 JSValue jsHTMLBodyElementBgColor(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::bgcolorAttr)); |
|
187 return result; |
|
188 } |
|
189 |
|
190 JSValue jsHTMLBodyElementLink(ExecState* exec, JSValue slotBase, const Identifier&) |
|
191 { |
|
192 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
193 UNUSED_PARAM(exec); |
|
194 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
195 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::linkAttr)); |
|
196 return result; |
|
197 } |
|
198 |
|
199 JSValue jsHTMLBodyElementText(ExecState* exec, JSValue slotBase, const Identifier&) |
|
200 { |
|
201 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
202 UNUSED_PARAM(exec); |
|
203 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
204 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::textAttr)); |
|
205 return result; |
|
206 } |
|
207 |
|
208 JSValue jsHTMLBodyElementVLink(ExecState* exec, JSValue slotBase, const Identifier&) |
|
209 { |
|
210 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
211 UNUSED_PARAM(exec); |
|
212 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
213 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::vlinkAttr)); |
|
214 return result; |
|
215 } |
|
216 |
|
217 JSValue jsHTMLBodyElementOnbeforeunload(ExecState* exec, JSValue slotBase, const Identifier&) |
|
218 { |
|
219 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
220 UNUSED_PARAM(exec); |
|
221 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
222 if (EventListener* listener = imp->onbeforeunload()) { |
|
223 if (const JSEventListener* jsListener = JSEventListener::cast(listener)) { |
|
224 if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext())) |
|
225 return jsFunction; |
|
226 } |
|
227 } |
|
228 return jsNull(); |
|
229 } |
|
230 |
|
231 JSValue jsHTMLBodyElementOnhashchange(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 if (EventListener* listener = imp->onhashchange()) { |
|
237 if (const JSEventListener* jsListener = JSEventListener::cast(listener)) { |
|
238 if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext())) |
|
239 return jsFunction; |
|
240 } |
|
241 } |
|
242 return jsNull(); |
|
243 } |
|
244 |
|
245 JSValue jsHTMLBodyElementOnmessage(ExecState* exec, JSValue slotBase, const Identifier&) |
|
246 { |
|
247 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
248 UNUSED_PARAM(exec); |
|
249 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
250 if (EventListener* listener = imp->onmessage()) { |
|
251 if (const JSEventListener* jsListener = JSEventListener::cast(listener)) { |
|
252 if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext())) |
|
253 return jsFunction; |
|
254 } |
|
255 } |
|
256 return jsNull(); |
|
257 } |
|
258 |
|
259 JSValue jsHTMLBodyElementOnoffline(ExecState* exec, JSValue slotBase, const Identifier&) |
|
260 { |
|
261 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
262 UNUSED_PARAM(exec); |
|
263 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
264 if (EventListener* listener = imp->onoffline()) { |
|
265 if (const JSEventListener* jsListener = JSEventListener::cast(listener)) { |
|
266 if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext())) |
|
267 return jsFunction; |
|
268 } |
|
269 } |
|
270 return jsNull(); |
|
271 } |
|
272 |
|
273 JSValue jsHTMLBodyElementOnonline(ExecState* exec, JSValue slotBase, const Identifier&) |
|
274 { |
|
275 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
276 UNUSED_PARAM(exec); |
|
277 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
278 if (EventListener* listener = imp->ononline()) { |
|
279 if (const JSEventListener* jsListener = JSEventListener::cast(listener)) { |
|
280 if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext())) |
|
281 return jsFunction; |
|
282 } |
|
283 } |
|
284 return jsNull(); |
|
285 } |
|
286 |
|
287 JSValue jsHTMLBodyElementOnpopstate(ExecState* exec, JSValue slotBase, const Identifier&) |
|
288 { |
|
289 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
290 UNUSED_PARAM(exec); |
|
291 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
292 if (EventListener* listener = imp->onpopstate()) { |
|
293 if (const JSEventListener* jsListener = JSEventListener::cast(listener)) { |
|
294 if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext())) |
|
295 return jsFunction; |
|
296 } |
|
297 } |
|
298 return jsNull(); |
|
299 } |
|
300 |
|
301 JSValue jsHTMLBodyElementOnresize(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->onresize()) { |
|
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 JSValue jsHTMLBodyElementOnstorage(ExecState* exec, JSValue slotBase, const Identifier&) |
|
316 { |
|
317 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
318 UNUSED_PARAM(exec); |
|
319 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
320 if (EventListener* listener = imp->onstorage()) { |
|
321 if (const JSEventListener* jsListener = JSEventListener::cast(listener)) { |
|
322 if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext())) |
|
323 return jsFunction; |
|
324 } |
|
325 } |
|
326 return jsNull(); |
|
327 } |
|
328 |
|
329 JSValue jsHTMLBodyElementOnunload(ExecState* exec, JSValue slotBase, const Identifier&) |
|
330 { |
|
331 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
332 UNUSED_PARAM(exec); |
|
333 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
334 if (EventListener* listener = imp->onunload()) { |
|
335 if (const JSEventListener* jsListener = JSEventListener::cast(listener)) { |
|
336 if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext())) |
|
337 return jsFunction; |
|
338 } |
|
339 } |
|
340 return jsNull(); |
|
341 } |
|
342 |
|
343 JSValue jsHTMLBodyElementOnblur(ExecState* exec, JSValue slotBase, const Identifier&) |
|
344 { |
|
345 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
346 UNUSED_PARAM(exec); |
|
347 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
348 if (EventListener* listener = imp->onblur()) { |
|
349 if (const JSEventListener* jsListener = JSEventListener::cast(listener)) { |
|
350 if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext())) |
|
351 return jsFunction; |
|
352 } |
|
353 } |
|
354 return jsNull(); |
|
355 } |
|
356 |
|
357 JSValue jsHTMLBodyElementOnerror(ExecState* exec, JSValue slotBase, const Identifier&) |
|
358 { |
|
359 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
360 UNUSED_PARAM(exec); |
|
361 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
362 if (EventListener* listener = imp->onerror()) { |
|
363 if (const JSEventListener* jsListener = JSEventListener::cast(listener)) { |
|
364 if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext())) |
|
365 return jsFunction; |
|
366 } |
|
367 } |
|
368 return jsNull(); |
|
369 } |
|
370 |
|
371 JSValue jsHTMLBodyElementOnfocus(ExecState* exec, JSValue slotBase, const Identifier&) |
|
372 { |
|
373 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
374 UNUSED_PARAM(exec); |
|
375 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
376 if (EventListener* listener = imp->onfocus()) { |
|
377 if (const JSEventListener* jsListener = JSEventListener::cast(listener)) { |
|
378 if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext())) |
|
379 return jsFunction; |
|
380 } |
|
381 } |
|
382 return jsNull(); |
|
383 } |
|
384 |
|
385 JSValue jsHTMLBodyElementOnload(ExecState* exec, JSValue slotBase, const Identifier&) |
|
386 { |
|
387 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
388 UNUSED_PARAM(exec); |
|
389 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
390 if (EventListener* listener = imp->onload()) { |
|
391 if (const JSEventListener* jsListener = JSEventListener::cast(listener)) { |
|
392 if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext())) |
|
393 return jsFunction; |
|
394 } |
|
395 } |
|
396 return jsNull(); |
|
397 } |
|
398 |
|
399 JSValue jsHTMLBodyElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
400 { |
|
401 JSHTMLBodyElement* domObject = static_cast<JSHTMLBodyElement*>(asObject(slotBase)); |
|
402 return JSHTMLBodyElement::getConstructor(exec, domObject->globalObject()); |
|
403 } |
|
404 void JSHTMLBodyElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) |
|
405 { |
|
406 lookupPut<JSHTMLBodyElement, Base>(exec, propertyName, value, &JSHTMLBodyElementTable, this, slot); |
|
407 } |
|
408 |
|
409 void setJSHTMLBodyElementALink(ExecState* exec, JSObject* thisObject, JSValue value) |
|
410 { |
|
411 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
412 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
413 imp->setAttribute(WebCore::HTMLNames::alinkAttr, valueToStringWithNullCheck(exec, value)); |
|
414 } |
|
415 |
|
416 void setJSHTMLBodyElementBackground(ExecState* exec, JSObject* thisObject, JSValue value) |
|
417 { |
|
418 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
419 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
420 imp->setAttribute(WebCore::HTMLNames::backgroundAttr, valueToStringWithNullCheck(exec, value)); |
|
421 } |
|
422 |
|
423 void setJSHTMLBodyElementBgColor(ExecState* exec, JSObject* thisObject, JSValue value) |
|
424 { |
|
425 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
426 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
427 imp->setAttribute(WebCore::HTMLNames::bgcolorAttr, valueToStringWithNullCheck(exec, value)); |
|
428 } |
|
429 |
|
430 void setJSHTMLBodyElementLink(ExecState* exec, JSObject* thisObject, JSValue value) |
|
431 { |
|
432 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
433 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
434 imp->setAttribute(WebCore::HTMLNames::linkAttr, valueToStringWithNullCheck(exec, value)); |
|
435 } |
|
436 |
|
437 void setJSHTMLBodyElementText(ExecState* exec, JSObject* thisObject, JSValue value) |
|
438 { |
|
439 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
440 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
441 imp->setAttribute(WebCore::HTMLNames::textAttr, valueToStringWithNullCheck(exec, value)); |
|
442 } |
|
443 |
|
444 void setJSHTMLBodyElementVLink(ExecState* exec, JSObject* thisObject, JSValue value) |
|
445 { |
|
446 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
447 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); |
|
448 imp->setAttribute(WebCore::HTMLNames::vlinkAttr, valueToStringWithNullCheck(exec, value)); |
|
449 } |
|
450 |
|
451 void setJSHTMLBodyElementOnbeforeunload(ExecState* exec, JSObject* thisObject, JSValue value) |
|
452 { |
|
453 UNUSED_PARAM(exec); |
|
454 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
455 JSDOMGlobalObject* globalObject = castedThis->globalObject(); |
|
456 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
457 imp->setOnbeforeunload(createJSAttributeEventListener(exec, value, globalObject)); |
|
458 } |
|
459 |
|
460 void setJSHTMLBodyElementOnhashchange(ExecState* exec, JSObject* thisObject, JSValue value) |
|
461 { |
|
462 UNUSED_PARAM(exec); |
|
463 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
464 JSDOMGlobalObject* globalObject = castedThis->globalObject(); |
|
465 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
466 imp->setOnhashchange(createJSAttributeEventListener(exec, value, globalObject)); |
|
467 } |
|
468 |
|
469 void setJSHTMLBodyElementOnmessage(ExecState* exec, JSObject* thisObject, JSValue value) |
|
470 { |
|
471 UNUSED_PARAM(exec); |
|
472 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
473 JSDOMGlobalObject* globalObject = castedThis->globalObject(); |
|
474 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
475 imp->setOnmessage(createJSAttributeEventListener(exec, value, globalObject)); |
|
476 } |
|
477 |
|
478 void setJSHTMLBodyElementOnoffline(ExecState* exec, JSObject* thisObject, JSValue value) |
|
479 { |
|
480 UNUSED_PARAM(exec); |
|
481 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
482 JSDOMGlobalObject* globalObject = castedThis->globalObject(); |
|
483 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
484 imp->setOnoffline(createJSAttributeEventListener(exec, value, globalObject)); |
|
485 } |
|
486 |
|
487 void setJSHTMLBodyElementOnonline(ExecState* exec, JSObject* thisObject, JSValue value) |
|
488 { |
|
489 UNUSED_PARAM(exec); |
|
490 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
491 JSDOMGlobalObject* globalObject = castedThis->globalObject(); |
|
492 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
493 imp->setOnonline(createJSAttributeEventListener(exec, value, globalObject)); |
|
494 } |
|
495 |
|
496 void setJSHTMLBodyElementOnpopstate(ExecState* exec, JSObject* thisObject, JSValue value) |
|
497 { |
|
498 UNUSED_PARAM(exec); |
|
499 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
500 JSDOMGlobalObject* globalObject = castedThis->globalObject(); |
|
501 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
502 imp->setOnpopstate(createJSAttributeEventListener(exec, value, globalObject)); |
|
503 } |
|
504 |
|
505 void setJSHTMLBodyElementOnresize(ExecState* exec, JSObject* thisObject, JSValue value) |
|
506 { |
|
507 UNUSED_PARAM(exec); |
|
508 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
509 JSDOMGlobalObject* globalObject = castedThis->globalObject(); |
|
510 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
511 imp->setOnresize(createJSAttributeEventListener(exec, value, globalObject)); |
|
512 } |
|
513 |
|
514 void setJSHTMLBodyElementOnstorage(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*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
520 imp->setOnstorage(createJSAttributeEventListener(exec, value, globalObject)); |
|
521 } |
|
522 |
|
523 void setJSHTMLBodyElementOnunload(ExecState* exec, JSObject* thisObject, JSValue value) |
|
524 { |
|
525 UNUSED_PARAM(exec); |
|
526 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
527 JSDOMGlobalObject* globalObject = castedThis->globalObject(); |
|
528 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
529 imp->setOnunload(createJSAttributeEventListener(exec, value, globalObject)); |
|
530 } |
|
531 |
|
532 void setJSHTMLBodyElementOnblur(ExecState* exec, JSObject* thisObject, JSValue value) |
|
533 { |
|
534 UNUSED_PARAM(exec); |
|
535 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
536 JSDOMGlobalObject* globalObject = castedThis->globalObject(); |
|
537 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
538 imp->setOnblur(createJSAttributeEventListener(exec, value, globalObject)); |
|
539 } |
|
540 |
|
541 void setJSHTMLBodyElementOnerror(ExecState* exec, JSObject* thisObject, JSValue value) |
|
542 { |
|
543 UNUSED_PARAM(exec); |
|
544 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
545 JSDOMGlobalObject* globalObject = castedThis->globalObject(); |
|
546 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
547 imp->setOnerror(createJSAttributeEventListener(exec, value, globalObject)); |
|
548 } |
|
549 |
|
550 void setJSHTMLBodyElementOnfocus(ExecState* exec, JSObject* thisObject, JSValue value) |
|
551 { |
|
552 UNUSED_PARAM(exec); |
|
553 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
554 JSDOMGlobalObject* globalObject = castedThis->globalObject(); |
|
555 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
556 imp->setOnfocus(createJSAttributeEventListener(exec, value, globalObject)); |
|
557 } |
|
558 |
|
559 void setJSHTMLBodyElementOnload(ExecState* exec, JSObject* thisObject, JSValue value) |
|
560 { |
|
561 UNUSED_PARAM(exec); |
|
562 JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(thisObject); |
|
563 JSDOMGlobalObject* globalObject = castedThis->globalObject(); |
|
564 HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); |
|
565 imp->setOnload(createJSAttributeEventListener(exec, value, globalObject)); |
|
566 } |
|
567 |
|
568 JSValue JSHTMLBodyElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
569 { |
|
570 return getDOMConstructor<JSHTMLBodyElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
571 } |
|
572 |
|
573 |
|
574 } |