tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSSVGElementInstance.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 "JSSVGElementInstance.h"
23
24 #include "Event.h"
25 #include "EventListener.h"
26 #include "ExceptionCode.h"
27 #include "JSDOMBinding.h"
28 #include "JSEvent.h"
29 #include "JSEventListener.h"
30 #include "JSSVGElement.h"
31 #include "JSSVGElementInstance.h"
32 #include "JSSVGElementInstanceList.h"
33 #include "JSSVGUseElement.h"
34 #include "SVGElement.h"
35 #include "SVGElementInstance.h"
36 #include "SVGElementInstanceList.h"
37 #include "SVGUseElement.h"
38 #include <runtime/Error.h>
39 #include <wtf/GetPtr.h>
40
41 using namespace JSC;
42
43 namespace WebCore {
44
45 ASSERT_CLASS_FITS_IN_CELL(JSSVGElementInstance);
46
47 /* Hash table */
48 #if ENABLE(JIT)
49 #define THUNK_GENERATOR(generator) , generator
50 #else
51 #define THUNK_GENERATOR(generator)
52 #endif
53 #if ENABLE(DFG_JIT)
54 #define INTRINSIC(intrinsic) , intrinsic
55 #else
56 #define INTRINSIC(intrinsic)
57 #endif
58
59 static const HashTableValue JSSVGElementInstanceTableValues[] =
60 {
61     { "correspondingElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceCorrespondingElement), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
62     { "correspondingUseElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceCorrespondingUseElement), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
63     { "parentNode", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceParentNode), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
64     { "childNodes", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceChildNodes), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
65     { "firstChild", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceFirstChild), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
66     { "lastChild", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceLastChild), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
67     { "previousSibling", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstancePreviousSibling), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
68     { "nextSibling", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceNextSibling), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
69     { "onabort", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnabort), (intptr_t)setJSSVGElementInstanceOnabort THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
70     { "onblur", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnblur), (intptr_t)setJSSVGElementInstanceOnblur THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
71     { "onchange", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnchange), (intptr_t)setJSSVGElementInstanceOnchange THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
72     { "onclick", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnclick), (intptr_t)setJSSVGElementInstanceOnclick THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
73     { "oncontextmenu", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOncontextmenu), (intptr_t)setJSSVGElementInstanceOncontextmenu THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
74     { "ondblclick", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOndblclick), (intptr_t)setJSSVGElementInstanceOndblclick THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
75     { "onerror", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnerror), (intptr_t)setJSSVGElementInstanceOnerror THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
76     { "onfocus", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnfocus), (intptr_t)setJSSVGElementInstanceOnfocus THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
77     { "oninput", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOninput), (intptr_t)setJSSVGElementInstanceOninput THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
78     { "onkeydown", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnkeydown), (intptr_t)setJSSVGElementInstanceOnkeydown THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
79     { "onkeypress", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnkeypress), (intptr_t)setJSSVGElementInstanceOnkeypress THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
80     { "onkeyup", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnkeyup), (intptr_t)setJSSVGElementInstanceOnkeyup THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
81     { "onload", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnload), (intptr_t)setJSSVGElementInstanceOnload THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
82     { "onmousedown", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnmousedown), (intptr_t)setJSSVGElementInstanceOnmousedown THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
83     { "onmousemove", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnmousemove), (intptr_t)setJSSVGElementInstanceOnmousemove THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
84     { "onmouseout", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnmouseout), (intptr_t)setJSSVGElementInstanceOnmouseout THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
85     { "onmouseover", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnmouseover), (intptr_t)setJSSVGElementInstanceOnmouseover THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
86     { "onmouseup", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnmouseup), (intptr_t)setJSSVGElementInstanceOnmouseup THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
87     { "onmousewheel", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnmousewheel), (intptr_t)setJSSVGElementInstanceOnmousewheel THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
88     { "onbeforecut", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnbeforecut), (intptr_t)setJSSVGElementInstanceOnbeforecut THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
89     { "oncut", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOncut), (intptr_t)setJSSVGElementInstanceOncut THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
90     { "onbeforecopy", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnbeforecopy), (intptr_t)setJSSVGElementInstanceOnbeforecopy THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
91     { "oncopy", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOncopy), (intptr_t)setJSSVGElementInstanceOncopy THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
92     { "onbeforepaste", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnbeforepaste), (intptr_t)setJSSVGElementInstanceOnbeforepaste THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
93     { "onpaste", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnpaste), (intptr_t)setJSSVGElementInstanceOnpaste THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
94     { "ondragenter", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOndragenter), (intptr_t)setJSSVGElementInstanceOndragenter THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
95     { "ondragover", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOndragover), (intptr_t)setJSSVGElementInstanceOndragover THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
96     { "ondragleave", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOndragleave), (intptr_t)setJSSVGElementInstanceOndragleave THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
97     { "ondrop", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOndrop), (intptr_t)setJSSVGElementInstanceOndrop THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
98     { "ondragstart", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOndragstart), (intptr_t)setJSSVGElementInstanceOndragstart THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
99     { "ondrag", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOndrag), (intptr_t)setJSSVGElementInstanceOndrag THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
100     { "ondragend", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOndragend), (intptr_t)setJSSVGElementInstanceOndragend THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
101     { "onreset", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnreset), (intptr_t)setJSSVGElementInstanceOnreset THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
102     { "onresize", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnresize), (intptr_t)setJSSVGElementInstanceOnresize THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
103     { "onscroll", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnscroll), (intptr_t)setJSSVGElementInstanceOnscroll THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
104     { "onsearch", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnsearch), (intptr_t)setJSSVGElementInstanceOnsearch THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
105     { "onselect", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnselect), (intptr_t)setJSSVGElementInstanceOnselect THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
106     { "onselectstart", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnselectstart), (intptr_t)setJSSVGElementInstanceOnselectstart THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
107     { "onsubmit", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnsubmit), (intptr_t)setJSSVGElementInstanceOnsubmit THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
108     { "onunload", DontDelete | DontEnum, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceOnunload), (intptr_t)setJSSVGElementInstanceOnunload THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
109     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGElementInstanceConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
110     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
111 };
112
113 #undef THUNK_GENERATOR
114 static const HashTable JSSVGElementInstanceTable = { 137, 127, JSSVGElementInstanceTableValues, 0 };
115 /* Hash table for constructor */
116 #if ENABLE(JIT)
117 #define THUNK_GENERATOR(generator) , generator
118 #else
119 #define THUNK_GENERATOR(generator)
120 #endif
121 #if ENABLE(DFG_JIT)
122 #define INTRINSIC(intrinsic) , intrinsic
123 #else
124 #define INTRINSIC(intrinsic)
125 #endif
126
127 static const HashTableValue JSSVGElementInstanceConstructorTableValues[] =
128 {
129     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
130 };
131
132 #undef THUNK_GENERATOR
133 static const HashTable JSSVGElementInstanceConstructorTable = { 1, 0, JSSVGElementInstanceConstructorTableValues, 0 };
134 const ClassInfo JSSVGElementInstanceConstructor::s_info = { "SVGElementInstanceConstructor", &DOMConstructorObject::s_info, &JSSVGElementInstanceConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGElementInstanceConstructor) };
135
136 JSSVGElementInstanceConstructor::JSSVGElementInstanceConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
137     : DOMConstructorObject(structure, globalObject)
138 {
139 }
140
141 void JSSVGElementInstanceConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
142 {
143     Base::finishCreation(exec->globalData());
144     ASSERT(inherits(&s_info));
145     putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGElementInstancePrototype::self(exec, globalObject), DontDelete | ReadOnly);
146 }
147
148 bool JSSVGElementInstanceConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
149 {
150     return getStaticValueSlot<JSSVGElementInstanceConstructor, JSDOMWrapper>(exec, &JSSVGElementInstanceConstructorTable, static_cast<JSSVGElementInstanceConstructor*>(cell), propertyName, slot);
151 }
152
153 bool JSSVGElementInstanceConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
154 {
155     return getStaticValueDescriptor<JSSVGElementInstanceConstructor, JSDOMWrapper>(exec, &JSSVGElementInstanceConstructorTable, static_cast<JSSVGElementInstanceConstructor*>(object), propertyName, descriptor);
156 }
157
158 /* Hash table for prototype */
159 #if ENABLE(JIT)
160 #define THUNK_GENERATOR(generator) , generator
161 #else
162 #define THUNK_GENERATOR(generator)
163 #endif
164 #if ENABLE(DFG_JIT)
165 #define INTRINSIC(intrinsic) , intrinsic
166 #else
167 #define INTRINSIC(intrinsic)
168 #endif
169
170 static const HashTableValue JSSVGElementInstancePrototypeTableValues[] =
171 {
172     { "addEventListener", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGElementInstancePrototypeFunctionAddEventListener), (intptr_t)3 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
173     { "removeEventListener", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGElementInstancePrototypeFunctionRemoveEventListener), (intptr_t)3 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
174     { "dispatchEvent", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGElementInstancePrototypeFunctionDispatchEvent), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
175     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
176 };
177
178 #undef THUNK_GENERATOR
179 static const HashTable JSSVGElementInstancePrototypeTable = { 8, 7, JSSVGElementInstancePrototypeTableValues, 0 };
180 const ClassInfo JSSVGElementInstancePrototype::s_info = { "SVGElementInstancePrototype", &JSC::JSNonFinalObject::s_info, &JSSVGElementInstancePrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGElementInstancePrototype) };
181
182 JSObject* JSSVGElementInstancePrototype::self(ExecState* exec, JSGlobalObject* globalObject)
183 {
184     return getDOMPrototype<JSSVGElementInstance>(exec, globalObject);
185 }
186
187 bool JSSVGElementInstancePrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
188 {
189     JSSVGElementInstancePrototype* thisObject = jsCast<JSSVGElementInstancePrototype*>(cell);
190     return getStaticFunctionSlot<JSObject>(exec, &JSSVGElementInstancePrototypeTable, thisObject, propertyName, slot);
191 }
192
193 bool JSSVGElementInstancePrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
194 {
195     JSSVGElementInstancePrototype* thisObject = jsCast<JSSVGElementInstancePrototype*>(object);
196     return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGElementInstancePrototypeTable, thisObject, propertyName, descriptor);
197 }
198
199 const ClassInfo JSSVGElementInstance::s_info = { "SVGElementInstance", &JSDOMWrapper::s_info, &JSSVGElementInstanceTable, 0 , CREATE_METHOD_TABLE(JSSVGElementInstance) };
200
201 JSSVGElementInstance::JSSVGElementInstance(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElementInstance> impl)
202     : JSDOMWrapper(structure, globalObject)
203     , m_impl(impl.leakRef())
204 {
205 }
206
207 void JSSVGElementInstance::finishCreation(JSGlobalData& globalData)
208 {
209     Base::finishCreation(globalData);
210     ASSERT(inherits(&s_info));
211 }
212
213 JSObject* JSSVGElementInstance::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
214 {
215     return JSSVGElementInstancePrototype::create(exec->globalData(), globalObject, JSSVGElementInstancePrototype::createStructure(globalObject->globalData(), globalObject, globalObject->objectPrototype()));
216 }
217
218 bool JSSVGElementInstance::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
219 {
220     JSSVGElementInstance* thisObject = jsCast<JSSVGElementInstance*>(cell);
221     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
222     return getStaticValueSlot<JSSVGElementInstance, Base>(exec, &JSSVGElementInstanceTable, thisObject, propertyName, slot);
223 }
224
225 bool JSSVGElementInstance::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
226 {
227     JSSVGElementInstance* thisObject = jsCast<JSSVGElementInstance*>(object);
228     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
229     return getStaticValueDescriptor<JSSVGElementInstance, Base>(exec, &JSSVGElementInstanceTable, thisObject, propertyName, descriptor);
230 }
231
232 JSValue jsSVGElementInstanceCorrespondingElement(ExecState* exec, JSValue slotBase, const Identifier&)
233 {
234     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
235     UNUSED_PARAM(exec);
236     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
237     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->correspondingElement()));
238     return result;
239 }
240
241
242 JSValue jsSVGElementInstanceCorrespondingUseElement(ExecState* exec, JSValue slotBase, const Identifier&)
243 {
244     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
245     UNUSED_PARAM(exec);
246     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
247     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->correspondingUseElement()));
248     return result;
249 }
250
251
252 JSValue jsSVGElementInstanceParentNode(ExecState* exec, JSValue slotBase, const Identifier&)
253 {
254     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
255     UNUSED_PARAM(exec);
256     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
257     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->parentNode()));
258     return result;
259 }
260
261
262 JSValue jsSVGElementInstanceChildNodes(ExecState* exec, JSValue slotBase, const Identifier&)
263 {
264     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
265     UNUSED_PARAM(exec);
266     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
267     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->childNodes()));
268     return result;
269 }
270
271
272 JSValue jsSVGElementInstanceFirstChild(ExecState* exec, JSValue slotBase, const Identifier&)
273 {
274     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
275     UNUSED_PARAM(exec);
276     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
277     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->firstChild()));
278     return result;
279 }
280
281
282 JSValue jsSVGElementInstanceLastChild(ExecState* exec, JSValue slotBase, const Identifier&)
283 {
284     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
285     UNUSED_PARAM(exec);
286     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
287     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->lastChild()));
288     return result;
289 }
290
291
292 JSValue jsSVGElementInstancePreviousSibling(ExecState* exec, JSValue slotBase, const Identifier&)
293 {
294     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
295     UNUSED_PARAM(exec);
296     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
297     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->previousSibling()));
298     return result;
299 }
300
301
302 JSValue jsSVGElementInstanceNextSibling(ExecState* exec, JSValue slotBase, const Identifier&)
303 {
304     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
305     UNUSED_PARAM(exec);
306     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
307     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nextSibling()));
308     return result;
309 }
310
311
312 JSValue jsSVGElementInstanceOnabort(ExecState* exec, JSValue slotBase, const Identifier&)
313 {
314     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
315     UNUSED_PARAM(exec);
316     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
317     if (EventListener* listener = imp->onabort()) {
318         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
319             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
320                 return jsFunction;
321         }
322     }
323     return jsNull();
324 }
325
326
327 JSValue jsSVGElementInstanceOnblur(ExecState* exec, JSValue slotBase, const Identifier&)
328 {
329     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
330     UNUSED_PARAM(exec);
331     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
332     if (EventListener* listener = imp->onblur()) {
333         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
334             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
335                 return jsFunction;
336         }
337     }
338     return jsNull();
339 }
340
341
342 JSValue jsSVGElementInstanceOnchange(ExecState* exec, JSValue slotBase, const Identifier&)
343 {
344     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
345     UNUSED_PARAM(exec);
346     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
347     if (EventListener* listener = imp->onchange()) {
348         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
349             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
350                 return jsFunction;
351         }
352     }
353     return jsNull();
354 }
355
356
357 JSValue jsSVGElementInstanceOnclick(ExecState* exec, JSValue slotBase, const Identifier&)
358 {
359     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
360     UNUSED_PARAM(exec);
361     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
362     if (EventListener* listener = imp->onclick()) {
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
372 JSValue jsSVGElementInstanceOncontextmenu(ExecState* exec, JSValue slotBase, const Identifier&)
373 {
374     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
375     UNUSED_PARAM(exec);
376     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
377     if (EventListener* listener = imp->oncontextmenu()) {
378         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
379             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
380                 return jsFunction;
381         }
382     }
383     return jsNull();
384 }
385
386
387 JSValue jsSVGElementInstanceOndblclick(ExecState* exec, JSValue slotBase, const Identifier&)
388 {
389     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
390     UNUSED_PARAM(exec);
391     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
392     if (EventListener* listener = imp->ondblclick()) {
393         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
394             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
395                 return jsFunction;
396         }
397     }
398     return jsNull();
399 }
400
401
402 JSValue jsSVGElementInstanceOnerror(ExecState* exec, JSValue slotBase, const Identifier&)
403 {
404     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
405     UNUSED_PARAM(exec);
406     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
407     if (EventListener* listener = imp->onerror()) {
408         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
409             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
410                 return jsFunction;
411         }
412     }
413     return jsNull();
414 }
415
416
417 JSValue jsSVGElementInstanceOnfocus(ExecState* exec, JSValue slotBase, const Identifier&)
418 {
419     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
420     UNUSED_PARAM(exec);
421     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
422     if (EventListener* listener = imp->onfocus()) {
423         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
424             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
425                 return jsFunction;
426         }
427     }
428     return jsNull();
429 }
430
431
432 JSValue jsSVGElementInstanceOninput(ExecState* exec, JSValue slotBase, const Identifier&)
433 {
434     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
435     UNUSED_PARAM(exec);
436     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
437     if (EventListener* listener = imp->oninput()) {
438         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
439             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
440                 return jsFunction;
441         }
442     }
443     return jsNull();
444 }
445
446
447 JSValue jsSVGElementInstanceOnkeydown(ExecState* exec, JSValue slotBase, const Identifier&)
448 {
449     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
450     UNUSED_PARAM(exec);
451     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
452     if (EventListener* listener = imp->onkeydown()) {
453         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
454             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
455                 return jsFunction;
456         }
457     }
458     return jsNull();
459 }
460
461
462 JSValue jsSVGElementInstanceOnkeypress(ExecState* exec, JSValue slotBase, const Identifier&)
463 {
464     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
465     UNUSED_PARAM(exec);
466     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
467     if (EventListener* listener = imp->onkeypress()) {
468         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
469             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
470                 return jsFunction;
471         }
472     }
473     return jsNull();
474 }
475
476
477 JSValue jsSVGElementInstanceOnkeyup(ExecState* exec, JSValue slotBase, const Identifier&)
478 {
479     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
480     UNUSED_PARAM(exec);
481     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
482     if (EventListener* listener = imp->onkeyup()) {
483         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
484             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
485                 return jsFunction;
486         }
487     }
488     return jsNull();
489 }
490
491
492 JSValue jsSVGElementInstanceOnload(ExecState* exec, JSValue slotBase, const Identifier&)
493 {
494     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
495     UNUSED_PARAM(exec);
496     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
497     if (EventListener* listener = imp->onload()) {
498         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
499             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
500                 return jsFunction;
501         }
502     }
503     return jsNull();
504 }
505
506
507 JSValue jsSVGElementInstanceOnmousedown(ExecState* exec, JSValue slotBase, const Identifier&)
508 {
509     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
510     UNUSED_PARAM(exec);
511     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
512     if (EventListener* listener = imp->onmousedown()) {
513         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
514             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
515                 return jsFunction;
516         }
517     }
518     return jsNull();
519 }
520
521
522 JSValue jsSVGElementInstanceOnmousemove(ExecState* exec, JSValue slotBase, const Identifier&)
523 {
524     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
525     UNUSED_PARAM(exec);
526     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
527     if (EventListener* listener = imp->onmousemove()) {
528         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
529             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
530                 return jsFunction;
531         }
532     }
533     return jsNull();
534 }
535
536
537 JSValue jsSVGElementInstanceOnmouseout(ExecState* exec, JSValue slotBase, const Identifier&)
538 {
539     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
540     UNUSED_PARAM(exec);
541     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
542     if (EventListener* listener = imp->onmouseout()) {
543         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
544             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
545                 return jsFunction;
546         }
547     }
548     return jsNull();
549 }
550
551
552 JSValue jsSVGElementInstanceOnmouseover(ExecState* exec, JSValue slotBase, const Identifier&)
553 {
554     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
555     UNUSED_PARAM(exec);
556     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
557     if (EventListener* listener = imp->onmouseover()) {
558         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
559             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
560                 return jsFunction;
561         }
562     }
563     return jsNull();
564 }
565
566
567 JSValue jsSVGElementInstanceOnmouseup(ExecState* exec, JSValue slotBase, const Identifier&)
568 {
569     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
570     UNUSED_PARAM(exec);
571     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
572     if (EventListener* listener = imp->onmouseup()) {
573         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
574             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
575                 return jsFunction;
576         }
577     }
578     return jsNull();
579 }
580
581
582 JSValue jsSVGElementInstanceOnmousewheel(ExecState* exec, JSValue slotBase, const Identifier&)
583 {
584     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
585     UNUSED_PARAM(exec);
586     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
587     if (EventListener* listener = imp->onmousewheel()) {
588         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
589             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
590                 return jsFunction;
591         }
592     }
593     return jsNull();
594 }
595
596
597 JSValue jsSVGElementInstanceOnbeforecut(ExecState* exec, JSValue slotBase, const Identifier&)
598 {
599     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
600     UNUSED_PARAM(exec);
601     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
602     if (EventListener* listener = imp->onbeforecut()) {
603         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
604             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
605                 return jsFunction;
606         }
607     }
608     return jsNull();
609 }
610
611
612 JSValue jsSVGElementInstanceOncut(ExecState* exec, JSValue slotBase, const Identifier&)
613 {
614     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
615     UNUSED_PARAM(exec);
616     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
617     if (EventListener* listener = imp->oncut()) {
618         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
619             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
620                 return jsFunction;
621         }
622     }
623     return jsNull();
624 }
625
626
627 JSValue jsSVGElementInstanceOnbeforecopy(ExecState* exec, JSValue slotBase, const Identifier&)
628 {
629     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
630     UNUSED_PARAM(exec);
631     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
632     if (EventListener* listener = imp->onbeforecopy()) {
633         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
634             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
635                 return jsFunction;
636         }
637     }
638     return jsNull();
639 }
640
641
642 JSValue jsSVGElementInstanceOncopy(ExecState* exec, JSValue slotBase, const Identifier&)
643 {
644     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
645     UNUSED_PARAM(exec);
646     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
647     if (EventListener* listener = imp->oncopy()) {
648         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
649             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
650                 return jsFunction;
651         }
652     }
653     return jsNull();
654 }
655
656
657 JSValue jsSVGElementInstanceOnbeforepaste(ExecState* exec, JSValue slotBase, const Identifier&)
658 {
659     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
660     UNUSED_PARAM(exec);
661     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
662     if (EventListener* listener = imp->onbeforepaste()) {
663         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
664             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
665                 return jsFunction;
666         }
667     }
668     return jsNull();
669 }
670
671
672 JSValue jsSVGElementInstanceOnpaste(ExecState* exec, JSValue slotBase, const Identifier&)
673 {
674     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
675     UNUSED_PARAM(exec);
676     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
677     if (EventListener* listener = imp->onpaste()) {
678         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
679             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
680                 return jsFunction;
681         }
682     }
683     return jsNull();
684 }
685
686
687 JSValue jsSVGElementInstanceOndragenter(ExecState* exec, JSValue slotBase, const Identifier&)
688 {
689     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
690     UNUSED_PARAM(exec);
691     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
692     if (EventListener* listener = imp->ondragenter()) {
693         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
694             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
695                 return jsFunction;
696         }
697     }
698     return jsNull();
699 }
700
701
702 JSValue jsSVGElementInstanceOndragover(ExecState* exec, JSValue slotBase, const Identifier&)
703 {
704     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
705     UNUSED_PARAM(exec);
706     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
707     if (EventListener* listener = imp->ondragover()) {
708         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
709             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
710                 return jsFunction;
711         }
712     }
713     return jsNull();
714 }
715
716
717 JSValue jsSVGElementInstanceOndragleave(ExecState* exec, JSValue slotBase, const Identifier&)
718 {
719     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
720     UNUSED_PARAM(exec);
721     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
722     if (EventListener* listener = imp->ondragleave()) {
723         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
724             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
725                 return jsFunction;
726         }
727     }
728     return jsNull();
729 }
730
731
732 JSValue jsSVGElementInstanceOndrop(ExecState* exec, JSValue slotBase, const Identifier&)
733 {
734     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
735     UNUSED_PARAM(exec);
736     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
737     if (EventListener* listener = imp->ondrop()) {
738         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
739             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
740                 return jsFunction;
741         }
742     }
743     return jsNull();
744 }
745
746
747 JSValue jsSVGElementInstanceOndragstart(ExecState* exec, JSValue slotBase, const Identifier&)
748 {
749     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
750     UNUSED_PARAM(exec);
751     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
752     if (EventListener* listener = imp->ondragstart()) {
753         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
754             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
755                 return jsFunction;
756         }
757     }
758     return jsNull();
759 }
760
761
762 JSValue jsSVGElementInstanceOndrag(ExecState* exec, JSValue slotBase, const Identifier&)
763 {
764     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
765     UNUSED_PARAM(exec);
766     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
767     if (EventListener* listener = imp->ondrag()) {
768         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
769             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
770                 return jsFunction;
771         }
772     }
773     return jsNull();
774 }
775
776
777 JSValue jsSVGElementInstanceOndragend(ExecState* exec, JSValue slotBase, const Identifier&)
778 {
779     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
780     UNUSED_PARAM(exec);
781     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
782     if (EventListener* listener = imp->ondragend()) {
783         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
784             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
785                 return jsFunction;
786         }
787     }
788     return jsNull();
789 }
790
791
792 JSValue jsSVGElementInstanceOnreset(ExecState* exec, JSValue slotBase, const Identifier&)
793 {
794     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
795     UNUSED_PARAM(exec);
796     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
797     if (EventListener* listener = imp->onreset()) {
798         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
799             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
800                 return jsFunction;
801         }
802     }
803     return jsNull();
804 }
805
806
807 JSValue jsSVGElementInstanceOnresize(ExecState* exec, JSValue slotBase, const Identifier&)
808 {
809     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
810     UNUSED_PARAM(exec);
811     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
812     if (EventListener* listener = imp->onresize()) {
813         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
814             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
815                 return jsFunction;
816         }
817     }
818     return jsNull();
819 }
820
821
822 JSValue jsSVGElementInstanceOnscroll(ExecState* exec, JSValue slotBase, const Identifier&)
823 {
824     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
825     UNUSED_PARAM(exec);
826     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
827     if (EventListener* listener = imp->onscroll()) {
828         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
829             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
830                 return jsFunction;
831         }
832     }
833     return jsNull();
834 }
835
836
837 JSValue jsSVGElementInstanceOnsearch(ExecState* exec, JSValue slotBase, const Identifier&)
838 {
839     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
840     UNUSED_PARAM(exec);
841     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
842     if (EventListener* listener = imp->onsearch()) {
843         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
844             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
845                 return jsFunction;
846         }
847     }
848     return jsNull();
849 }
850
851
852 JSValue jsSVGElementInstanceOnselect(ExecState* exec, JSValue slotBase, const Identifier&)
853 {
854     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
855     UNUSED_PARAM(exec);
856     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
857     if (EventListener* listener = imp->onselect()) {
858         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
859             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
860                 return jsFunction;
861         }
862     }
863     return jsNull();
864 }
865
866
867 JSValue jsSVGElementInstanceOnselectstart(ExecState* exec, JSValue slotBase, const Identifier&)
868 {
869     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
870     UNUSED_PARAM(exec);
871     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
872     if (EventListener* listener = imp->onselectstart()) {
873         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
874             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
875                 return jsFunction;
876         }
877     }
878     return jsNull();
879 }
880
881
882 JSValue jsSVGElementInstanceOnsubmit(ExecState* exec, JSValue slotBase, const Identifier&)
883 {
884     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
885     UNUSED_PARAM(exec);
886     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
887     if (EventListener* listener = imp->onsubmit()) {
888         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
889             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
890                 return jsFunction;
891         }
892     }
893     return jsNull();
894 }
895
896
897 JSValue jsSVGElementInstanceOnunload(ExecState* exec, JSValue slotBase, const Identifier&)
898 {
899     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
900     UNUSED_PARAM(exec);
901     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
902     if (EventListener* listener = imp->onunload()) {
903         if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {
904             if (JSObject* jsFunction = jsListener->jsFunction(imp->scriptExecutionContext()))
905                 return jsFunction;
906         }
907     }
908     return jsNull();
909 }
910
911
912 JSValue jsSVGElementInstanceConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
913 {
914     JSSVGElementInstance* domObject = static_cast<JSSVGElementInstance*>(asObject(slotBase));
915     return JSSVGElementInstance::getConstructor(exec, domObject->globalObject());
916 }
917
918 void JSSVGElementInstance::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
919 {
920     JSSVGElementInstance* thisObject = jsCast<JSSVGElementInstance*>(cell);
921     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
922     lookupPut<JSSVGElementInstance, Base>(exec, propertyName, value, &JSSVGElementInstanceTable, thisObject, slot);
923 }
924
925 void setJSSVGElementInstanceOnabort(ExecState* exec, JSObject* thisObject, JSValue value)
926 {
927     UNUSED_PARAM(exec);
928     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
929     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
930     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
931     if (correspondingElementWrapper.isObject())
932         imp->setOnabort(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
933 }
934
935
936 void setJSSVGElementInstanceOnblur(ExecState* exec, JSObject* thisObject, JSValue value)
937 {
938     UNUSED_PARAM(exec);
939     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
940     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
941     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
942     if (correspondingElementWrapper.isObject())
943         imp->setOnblur(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
944 }
945
946
947 void setJSSVGElementInstanceOnchange(ExecState* exec, JSObject* thisObject, JSValue value)
948 {
949     UNUSED_PARAM(exec);
950     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
951     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
952     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
953     if (correspondingElementWrapper.isObject())
954         imp->setOnchange(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
955 }
956
957
958 void setJSSVGElementInstanceOnclick(ExecState* exec, JSObject* thisObject, JSValue value)
959 {
960     UNUSED_PARAM(exec);
961     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
962     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
963     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
964     if (correspondingElementWrapper.isObject())
965         imp->setOnclick(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
966 }
967
968
969 void setJSSVGElementInstanceOncontextmenu(ExecState* exec, JSObject* thisObject, JSValue value)
970 {
971     UNUSED_PARAM(exec);
972     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
973     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
974     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
975     if (correspondingElementWrapper.isObject())
976         imp->setOncontextmenu(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
977 }
978
979
980 void setJSSVGElementInstanceOndblclick(ExecState* exec, JSObject* thisObject, JSValue value)
981 {
982     UNUSED_PARAM(exec);
983     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
984     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
985     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
986     if (correspondingElementWrapper.isObject())
987         imp->setOndblclick(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
988 }
989
990
991 void setJSSVGElementInstanceOnerror(ExecState* exec, JSObject* thisObject, JSValue value)
992 {
993     UNUSED_PARAM(exec);
994     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
995     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
996     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
997     if (correspondingElementWrapper.isObject())
998         imp->setOnerror(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
999 }
1000
1001
1002 void setJSSVGElementInstanceOnfocus(ExecState* exec, JSObject* thisObject, JSValue value)
1003 {
1004     UNUSED_PARAM(exec);
1005     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1006     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1007     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1008     if (correspondingElementWrapper.isObject())
1009         imp->setOnfocus(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1010 }
1011
1012
1013 void setJSSVGElementInstanceOninput(ExecState* exec, JSObject* thisObject, JSValue value)
1014 {
1015     UNUSED_PARAM(exec);
1016     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1017     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1018     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1019     if (correspondingElementWrapper.isObject())
1020         imp->setOninput(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1021 }
1022
1023
1024 void setJSSVGElementInstanceOnkeydown(ExecState* exec, JSObject* thisObject, JSValue value)
1025 {
1026     UNUSED_PARAM(exec);
1027     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1028     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1029     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1030     if (correspondingElementWrapper.isObject())
1031         imp->setOnkeydown(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1032 }
1033
1034
1035 void setJSSVGElementInstanceOnkeypress(ExecState* exec, JSObject* thisObject, JSValue value)
1036 {
1037     UNUSED_PARAM(exec);
1038     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1039     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1040     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1041     if (correspondingElementWrapper.isObject())
1042         imp->setOnkeypress(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1043 }
1044
1045
1046 void setJSSVGElementInstanceOnkeyup(ExecState* exec, JSObject* thisObject, JSValue value)
1047 {
1048     UNUSED_PARAM(exec);
1049     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1050     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1051     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1052     if (correspondingElementWrapper.isObject())
1053         imp->setOnkeyup(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1054 }
1055
1056
1057 void setJSSVGElementInstanceOnload(ExecState* exec, JSObject* thisObject, JSValue value)
1058 {
1059     UNUSED_PARAM(exec);
1060     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1061     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1062     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1063     if (correspondingElementWrapper.isObject())
1064         imp->setOnload(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1065 }
1066
1067
1068 void setJSSVGElementInstanceOnmousedown(ExecState* exec, JSObject* thisObject, JSValue value)
1069 {
1070     UNUSED_PARAM(exec);
1071     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1072     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1073     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1074     if (correspondingElementWrapper.isObject())
1075         imp->setOnmousedown(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1076 }
1077
1078
1079 void setJSSVGElementInstanceOnmousemove(ExecState* exec, JSObject* thisObject, JSValue value)
1080 {
1081     UNUSED_PARAM(exec);
1082     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1083     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1084     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1085     if (correspondingElementWrapper.isObject())
1086         imp->setOnmousemove(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1087 }
1088
1089
1090 void setJSSVGElementInstanceOnmouseout(ExecState* exec, JSObject* thisObject, JSValue value)
1091 {
1092     UNUSED_PARAM(exec);
1093     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1094     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1095     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1096     if (correspondingElementWrapper.isObject())
1097         imp->setOnmouseout(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1098 }
1099
1100
1101 void setJSSVGElementInstanceOnmouseover(ExecState* exec, JSObject* thisObject, JSValue value)
1102 {
1103     UNUSED_PARAM(exec);
1104     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1105     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1106     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1107     if (correspondingElementWrapper.isObject())
1108         imp->setOnmouseover(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1109 }
1110
1111
1112 void setJSSVGElementInstanceOnmouseup(ExecState* exec, JSObject* thisObject, JSValue value)
1113 {
1114     UNUSED_PARAM(exec);
1115     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1116     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1117     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1118     if (correspondingElementWrapper.isObject())
1119         imp->setOnmouseup(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1120 }
1121
1122
1123 void setJSSVGElementInstanceOnmousewheel(ExecState* exec, JSObject* thisObject, JSValue value)
1124 {
1125     UNUSED_PARAM(exec);
1126     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1127     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1128     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1129     if (correspondingElementWrapper.isObject())
1130         imp->setOnmousewheel(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1131 }
1132
1133
1134 void setJSSVGElementInstanceOnbeforecut(ExecState* exec, JSObject* thisObject, JSValue value)
1135 {
1136     UNUSED_PARAM(exec);
1137     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1138     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1139     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1140     if (correspondingElementWrapper.isObject())
1141         imp->setOnbeforecut(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1142 }
1143
1144
1145 void setJSSVGElementInstanceOncut(ExecState* exec, JSObject* thisObject, JSValue value)
1146 {
1147     UNUSED_PARAM(exec);
1148     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1149     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1150     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1151     if (correspondingElementWrapper.isObject())
1152         imp->setOncut(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1153 }
1154
1155
1156 void setJSSVGElementInstanceOnbeforecopy(ExecState* exec, JSObject* thisObject, JSValue value)
1157 {
1158     UNUSED_PARAM(exec);
1159     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1160     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1161     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1162     if (correspondingElementWrapper.isObject())
1163         imp->setOnbeforecopy(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1164 }
1165
1166
1167 void setJSSVGElementInstanceOncopy(ExecState* exec, JSObject* thisObject, JSValue value)
1168 {
1169     UNUSED_PARAM(exec);
1170     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1171     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1172     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1173     if (correspondingElementWrapper.isObject())
1174         imp->setOncopy(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1175 }
1176
1177
1178 void setJSSVGElementInstanceOnbeforepaste(ExecState* exec, JSObject* thisObject, JSValue value)
1179 {
1180     UNUSED_PARAM(exec);
1181     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1182     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1183     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1184     if (correspondingElementWrapper.isObject())
1185         imp->setOnbeforepaste(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1186 }
1187
1188
1189 void setJSSVGElementInstanceOnpaste(ExecState* exec, JSObject* thisObject, JSValue value)
1190 {
1191     UNUSED_PARAM(exec);
1192     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1193     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1194     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1195     if (correspondingElementWrapper.isObject())
1196         imp->setOnpaste(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1197 }
1198
1199
1200 void setJSSVGElementInstanceOndragenter(ExecState* exec, JSObject* thisObject, JSValue value)
1201 {
1202     UNUSED_PARAM(exec);
1203     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1204     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1205     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1206     if (correspondingElementWrapper.isObject())
1207         imp->setOndragenter(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1208 }
1209
1210
1211 void setJSSVGElementInstanceOndragover(ExecState* exec, JSObject* thisObject, JSValue value)
1212 {
1213     UNUSED_PARAM(exec);
1214     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1215     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1216     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1217     if (correspondingElementWrapper.isObject())
1218         imp->setOndragover(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1219 }
1220
1221
1222 void setJSSVGElementInstanceOndragleave(ExecState* exec, JSObject* thisObject, JSValue value)
1223 {
1224     UNUSED_PARAM(exec);
1225     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1226     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1227     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1228     if (correspondingElementWrapper.isObject())
1229         imp->setOndragleave(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1230 }
1231
1232
1233 void setJSSVGElementInstanceOndrop(ExecState* exec, JSObject* thisObject, JSValue value)
1234 {
1235     UNUSED_PARAM(exec);
1236     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1237     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1238     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1239     if (correspondingElementWrapper.isObject())
1240         imp->setOndrop(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1241 }
1242
1243
1244 void setJSSVGElementInstanceOndragstart(ExecState* exec, JSObject* thisObject, JSValue value)
1245 {
1246     UNUSED_PARAM(exec);
1247     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1248     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1249     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1250     if (correspondingElementWrapper.isObject())
1251         imp->setOndragstart(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1252 }
1253
1254
1255 void setJSSVGElementInstanceOndrag(ExecState* exec, JSObject* thisObject, JSValue value)
1256 {
1257     UNUSED_PARAM(exec);
1258     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1259     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1260     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1261     if (correspondingElementWrapper.isObject())
1262         imp->setOndrag(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1263 }
1264
1265
1266 void setJSSVGElementInstanceOndragend(ExecState* exec, JSObject* thisObject, JSValue value)
1267 {
1268     UNUSED_PARAM(exec);
1269     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1270     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1271     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1272     if (correspondingElementWrapper.isObject())
1273         imp->setOndragend(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1274 }
1275
1276
1277 void setJSSVGElementInstanceOnreset(ExecState* exec, JSObject* thisObject, JSValue value)
1278 {
1279     UNUSED_PARAM(exec);
1280     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1281     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1282     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1283     if (correspondingElementWrapper.isObject())
1284         imp->setOnreset(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1285 }
1286
1287
1288 void setJSSVGElementInstanceOnresize(ExecState* exec, JSObject* thisObject, JSValue value)
1289 {
1290     UNUSED_PARAM(exec);
1291     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1292     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1293     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1294     if (correspondingElementWrapper.isObject())
1295         imp->setOnresize(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1296 }
1297
1298
1299 void setJSSVGElementInstanceOnscroll(ExecState* exec, JSObject* thisObject, JSValue value)
1300 {
1301     UNUSED_PARAM(exec);
1302     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1303     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1304     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1305     if (correspondingElementWrapper.isObject())
1306         imp->setOnscroll(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1307 }
1308
1309
1310 void setJSSVGElementInstanceOnsearch(ExecState* exec, JSObject* thisObject, JSValue value)
1311 {
1312     UNUSED_PARAM(exec);
1313     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1314     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1315     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1316     if (correspondingElementWrapper.isObject())
1317         imp->setOnsearch(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1318 }
1319
1320
1321 void setJSSVGElementInstanceOnselect(ExecState* exec, JSObject* thisObject, JSValue value)
1322 {
1323     UNUSED_PARAM(exec);
1324     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1325     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1326     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1327     if (correspondingElementWrapper.isObject())
1328         imp->setOnselect(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1329 }
1330
1331
1332 void setJSSVGElementInstanceOnselectstart(ExecState* exec, JSObject* thisObject, JSValue value)
1333 {
1334     UNUSED_PARAM(exec);
1335     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1336     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1337     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1338     if (correspondingElementWrapper.isObject())
1339         imp->setOnselectstart(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1340 }
1341
1342
1343 void setJSSVGElementInstanceOnsubmit(ExecState* exec, JSObject* thisObject, JSValue value)
1344 {
1345     UNUSED_PARAM(exec);
1346     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1347     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1348     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1349     if (correspondingElementWrapper.isObject())
1350         imp->setOnsubmit(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1351 }
1352
1353
1354 void setJSSVGElementInstanceOnunload(ExecState* exec, JSObject* thisObject, JSValue value)
1355 {
1356     UNUSED_PARAM(exec);
1357     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(thisObject);
1358     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1359     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1360     if (correspondingElementWrapper.isObject())
1361         imp->setOnunload(createJSAttributeEventListener(exec, value, asObject(correspondingElementWrapper)));
1362 }
1363
1364
1365 JSValue JSSVGElementInstance::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
1366 {
1367     return getDOMConstructor<JSSVGElementInstanceConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
1368 }
1369
1370 EncodedJSValue JSC_HOST_CALL jsSVGElementInstancePrototypeFunctionAddEventListener(ExecState* exec)
1371 {
1372     JSValue thisValue = exec->hostThisValue();
1373     if (!thisValue.inherits(&JSSVGElementInstance::s_info))
1374         return throwVMTypeError(exec);
1375     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(thisValue));
1376     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGElementInstance::s_info);
1377     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1378     if (exec->argumentCount() < 2)
1379         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1380     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1381     if (!correspondingElementWrapper.isObject())
1382         return JSValue::encode(jsUndefined());
1383     JSValue listener = exec->argument(1);
1384     if (!listener.isObject())
1385         return JSValue::encode(jsUndefined());
1386     imp->addEventListener(ustringToAtomicString(exec->argument(0).toString(exec)), JSEventListener::create(asObject(listener), asObject(correspondingElementWrapper), false, currentWorld(exec)), exec->argument(2).toBoolean(exec));
1387     return JSValue::encode(jsUndefined());
1388 }
1389
1390 EncodedJSValue JSC_HOST_CALL jsSVGElementInstancePrototypeFunctionRemoveEventListener(ExecState* exec)
1391 {
1392     JSValue thisValue = exec->hostThisValue();
1393     if (!thisValue.inherits(&JSSVGElementInstance::s_info))
1394         return throwVMTypeError(exec);
1395     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(thisValue));
1396     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGElementInstance::s_info);
1397     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1398     if (exec->argumentCount() < 2)
1399         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1400     JSValue correspondingElementWrapper = toJS(exec, castedThis->globalObject(), imp->correspondingElement());
1401     if (!correspondingElementWrapper.isObject())
1402         return JSValue::encode(jsUndefined());
1403     JSValue listener = exec->argument(1);
1404     if (!listener.isObject())
1405         return JSValue::encode(jsUndefined());
1406     imp->removeEventListener(ustringToAtomicString(exec->argument(0).toString(exec)), JSEventListener::create(asObject(listener), asObject(correspondingElementWrapper), false, currentWorld(exec)).get(), exec->argument(2).toBoolean(exec));
1407     return JSValue::encode(jsUndefined());
1408 }
1409
1410 EncodedJSValue JSC_HOST_CALL jsSVGElementInstancePrototypeFunctionDispatchEvent(ExecState* exec)
1411 {
1412     JSValue thisValue = exec->hostThisValue();
1413     if (!thisValue.inherits(&JSSVGElementInstance::s_info))
1414         return throwVMTypeError(exec);
1415     JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(thisValue));
1416     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGElementInstance::s_info);
1417     SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
1418     if (exec->argumentCount() < 1)
1419         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1420     ExceptionCode ec = 0;
1421     Event* event(toEvent(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
1422     if (exec->hadException())
1423         return JSValue::encode(jsUndefined());
1424
1425     JSC::JSValue result = jsBoolean(imp->dispatchEvent(event, ec));
1426     setDOMException(exec, ec);
1427     return JSValue::encode(result);
1428 }
1429
1430 static inline bool isObservable(JSSVGElementInstance* jsSVGElementInstance)
1431 {
1432     if (jsSVGElementInstance->hasCustomProperties())
1433         return true;
1434     return false;
1435 }
1436
1437 bool JSSVGElementInstanceOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
1438 {
1439     JSSVGElementInstance* jsSVGElementInstance = static_cast<JSSVGElementInstance*>(handle.get().asCell());
1440     if (!isObservable(jsSVGElementInstance))
1441         return false;
1442     UNUSED_PARAM(visitor);
1443     return false;
1444 }
1445
1446 void JSSVGElementInstanceOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
1447 {
1448     JSSVGElementInstance* jsSVGElementInstance = static_cast<JSSVGElementInstance*>(handle.get().asCell());
1449     DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
1450     uncacheWrapper(world, jsSVGElementInstance->impl(), jsSVGElementInstance);
1451     jsSVGElementInstance->releaseImpl();
1452 }
1453
1454 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGElementInstance* impl)
1455 {
1456     return wrap<JSSVGElementInstance>(exec, globalObject, impl);
1457 }
1458
1459 SVGElementInstance* toSVGElementInstance(JSC::JSValue value)
1460 {
1461     return value.inherits(&JSSVGElementInstance::s_info) ? static_cast<JSSVGElementInstance*>(asObject(value))->impl() : 0;
1462 }
1463
1464 }