2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
22 #include "JSSVGElementInstance.h"
25 #include "EventListener.h"
26 #include "ExceptionCode.h"
27 #include "JSDOMBinding.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>
45 ASSERT_CLASS_FITS_IN_CELL(JSSVGElementInstance);
49 #define THUNK_GENERATOR(generator) , generator
51 #define THUNK_GENERATOR(generator)
54 #define INTRINSIC(intrinsic) , intrinsic
56 #define INTRINSIC(intrinsic)
59 static const HashTableValue JSSVGElementInstanceTableValues[] =
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) }
113 #undef THUNK_GENERATOR
114 static const HashTable JSSVGElementInstanceTable = { 137, 127, JSSVGElementInstanceTableValues, 0 };
115 /* Hash table for constructor */
117 #define THUNK_GENERATOR(generator) , generator
119 #define THUNK_GENERATOR(generator)
122 #define INTRINSIC(intrinsic) , intrinsic
124 #define INTRINSIC(intrinsic)
127 static const HashTableValue JSSVGElementInstanceConstructorTableValues[] =
129 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
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) };
136 JSSVGElementInstanceConstructor::JSSVGElementInstanceConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
137 : DOMConstructorObject(structure, globalObject)
141 void JSSVGElementInstanceConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
143 Base::finishCreation(exec->globalData());
144 ASSERT(inherits(&s_info));
145 putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGElementInstancePrototype::self(exec, globalObject), DontDelete | ReadOnly);
148 bool JSSVGElementInstanceConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
150 return getStaticValueSlot<JSSVGElementInstanceConstructor, JSDOMWrapper>(exec, &JSSVGElementInstanceConstructorTable, static_cast<JSSVGElementInstanceConstructor*>(cell), propertyName, slot);
153 bool JSSVGElementInstanceConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
155 return getStaticValueDescriptor<JSSVGElementInstanceConstructor, JSDOMWrapper>(exec, &JSSVGElementInstanceConstructorTable, static_cast<JSSVGElementInstanceConstructor*>(object), propertyName, descriptor);
158 /* Hash table for prototype */
160 #define THUNK_GENERATOR(generator) , generator
162 #define THUNK_GENERATOR(generator)
165 #define INTRINSIC(intrinsic) , intrinsic
167 #define INTRINSIC(intrinsic)
170 static const HashTableValue JSSVGElementInstancePrototypeTableValues[] =
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) }
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) };
182 JSObject* JSSVGElementInstancePrototype::self(ExecState* exec, JSGlobalObject* globalObject)
184 return getDOMPrototype<JSSVGElementInstance>(exec, globalObject);
187 bool JSSVGElementInstancePrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
189 JSSVGElementInstancePrototype* thisObject = jsCast<JSSVGElementInstancePrototype*>(cell);
190 return getStaticFunctionSlot<JSObject>(exec, &JSSVGElementInstancePrototypeTable, thisObject, propertyName, slot);
193 bool JSSVGElementInstancePrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
195 JSSVGElementInstancePrototype* thisObject = jsCast<JSSVGElementInstancePrototype*>(object);
196 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGElementInstancePrototypeTable, thisObject, propertyName, descriptor);
199 const ClassInfo JSSVGElementInstance::s_info = { "SVGElementInstance", &JSDOMWrapper::s_info, &JSSVGElementInstanceTable, 0 , CREATE_METHOD_TABLE(JSSVGElementInstance) };
201 JSSVGElementInstance::JSSVGElementInstance(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElementInstance> impl)
202 : JSDOMWrapper(structure, globalObject)
203 , m_impl(impl.leakRef())
207 void JSSVGElementInstance::finishCreation(JSGlobalData& globalData)
209 Base::finishCreation(globalData);
210 ASSERT(inherits(&s_info));
213 JSObject* JSSVGElementInstance::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
215 return JSSVGElementInstancePrototype::create(exec->globalData(), globalObject, JSSVGElementInstancePrototype::createStructure(globalObject->globalData(), globalObject, globalObject->objectPrototype()));
218 bool JSSVGElementInstance::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
220 JSSVGElementInstance* thisObject = jsCast<JSSVGElementInstance*>(cell);
221 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
222 return getStaticValueSlot<JSSVGElementInstance, Base>(exec, &JSSVGElementInstanceTable, thisObject, propertyName, slot);
225 bool JSSVGElementInstance::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
227 JSSVGElementInstance* thisObject = jsCast<JSSVGElementInstance*>(object);
228 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
229 return getStaticValueDescriptor<JSSVGElementInstance, Base>(exec, &JSSVGElementInstanceTable, thisObject, propertyName, descriptor);
232 JSValue jsSVGElementInstanceCorrespondingElement(ExecState* exec, JSValue slotBase, const Identifier&)
234 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
236 SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
237 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->correspondingElement()));
242 JSValue jsSVGElementInstanceCorrespondingUseElement(ExecState* exec, JSValue slotBase, const Identifier&)
244 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
246 SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
247 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->correspondingUseElement()));
252 JSValue jsSVGElementInstanceParentNode(ExecState* exec, JSValue slotBase, const Identifier&)
254 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
256 SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
257 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->parentNode()));
262 JSValue jsSVGElementInstanceChildNodes(ExecState* exec, JSValue slotBase, const Identifier&)
264 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
266 SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
267 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->childNodes()));
272 JSValue jsSVGElementInstanceFirstChild(ExecState* exec, JSValue slotBase, const Identifier&)
274 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
276 SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
277 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->firstChild()));
282 JSValue jsSVGElementInstanceLastChild(ExecState* exec, JSValue slotBase, const Identifier&)
284 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
286 SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
287 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->lastChild()));
292 JSValue jsSVGElementInstancePreviousSibling(ExecState* exec, JSValue slotBase, const Identifier&)
294 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
296 SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
297 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->previousSibling()));
302 JSValue jsSVGElementInstanceNextSibling(ExecState* exec, JSValue slotBase, const Identifier&)
304 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
306 SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl());
307 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nextSibling()));
312 JSValue jsSVGElementInstanceOnabort(ExecState* exec, JSValue slotBase, const Identifier&)
314 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
327 JSValue jsSVGElementInstanceOnblur(ExecState* exec, JSValue slotBase, const Identifier&)
329 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
342 JSValue jsSVGElementInstanceOnchange(ExecState* exec, JSValue slotBase, const Identifier&)
344 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
357 JSValue jsSVGElementInstanceOnclick(ExecState* exec, JSValue slotBase, const Identifier&)
359 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
372 JSValue jsSVGElementInstanceOncontextmenu(ExecState* exec, JSValue slotBase, const Identifier&)
374 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
387 JSValue jsSVGElementInstanceOndblclick(ExecState* exec, JSValue slotBase, const Identifier&)
389 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
402 JSValue jsSVGElementInstanceOnerror(ExecState* exec, JSValue slotBase, const Identifier&)
404 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
417 JSValue jsSVGElementInstanceOnfocus(ExecState* exec, JSValue slotBase, const Identifier&)
419 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
432 JSValue jsSVGElementInstanceOninput(ExecState* exec, JSValue slotBase, const Identifier&)
434 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
447 JSValue jsSVGElementInstanceOnkeydown(ExecState* exec, JSValue slotBase, const Identifier&)
449 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
462 JSValue jsSVGElementInstanceOnkeypress(ExecState* exec, JSValue slotBase, const Identifier&)
464 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
477 JSValue jsSVGElementInstanceOnkeyup(ExecState* exec, JSValue slotBase, const Identifier&)
479 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
492 JSValue jsSVGElementInstanceOnload(ExecState* exec, JSValue slotBase, const Identifier&)
494 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
507 JSValue jsSVGElementInstanceOnmousedown(ExecState* exec, JSValue slotBase, const Identifier&)
509 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
522 JSValue jsSVGElementInstanceOnmousemove(ExecState* exec, JSValue slotBase, const Identifier&)
524 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
537 JSValue jsSVGElementInstanceOnmouseout(ExecState* exec, JSValue slotBase, const Identifier&)
539 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
552 JSValue jsSVGElementInstanceOnmouseover(ExecState* exec, JSValue slotBase, const Identifier&)
554 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
567 JSValue jsSVGElementInstanceOnmouseup(ExecState* exec, JSValue slotBase, const Identifier&)
569 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
582 JSValue jsSVGElementInstanceOnmousewheel(ExecState* exec, JSValue slotBase, const Identifier&)
584 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
597 JSValue jsSVGElementInstanceOnbeforecut(ExecState* exec, JSValue slotBase, const Identifier&)
599 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
612 JSValue jsSVGElementInstanceOncut(ExecState* exec, JSValue slotBase, const Identifier&)
614 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
627 JSValue jsSVGElementInstanceOnbeforecopy(ExecState* exec, JSValue slotBase, const Identifier&)
629 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
642 JSValue jsSVGElementInstanceOncopy(ExecState* exec, JSValue slotBase, const Identifier&)
644 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
657 JSValue jsSVGElementInstanceOnbeforepaste(ExecState* exec, JSValue slotBase, const Identifier&)
659 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
672 JSValue jsSVGElementInstanceOnpaste(ExecState* exec, JSValue slotBase, const Identifier&)
674 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
687 JSValue jsSVGElementInstanceOndragenter(ExecState* exec, JSValue slotBase, const Identifier&)
689 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
702 JSValue jsSVGElementInstanceOndragover(ExecState* exec, JSValue slotBase, const Identifier&)
704 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
717 JSValue jsSVGElementInstanceOndragleave(ExecState* exec, JSValue slotBase, const Identifier&)
719 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
732 JSValue jsSVGElementInstanceOndrop(ExecState* exec, JSValue slotBase, const Identifier&)
734 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
747 JSValue jsSVGElementInstanceOndragstart(ExecState* exec, JSValue slotBase, const Identifier&)
749 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
762 JSValue jsSVGElementInstanceOndrag(ExecState* exec, JSValue slotBase, const Identifier&)
764 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
777 JSValue jsSVGElementInstanceOndragend(ExecState* exec, JSValue slotBase, const Identifier&)
779 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
792 JSValue jsSVGElementInstanceOnreset(ExecState* exec, JSValue slotBase, const Identifier&)
794 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
807 JSValue jsSVGElementInstanceOnresize(ExecState* exec, JSValue slotBase, const Identifier&)
809 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
822 JSValue jsSVGElementInstanceOnscroll(ExecState* exec, JSValue slotBase, const Identifier&)
824 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
837 JSValue jsSVGElementInstanceOnsearch(ExecState* exec, JSValue slotBase, const Identifier&)
839 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
852 JSValue jsSVGElementInstanceOnselect(ExecState* exec, JSValue slotBase, const Identifier&)
854 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
867 JSValue jsSVGElementInstanceOnselectstart(ExecState* exec, JSValue slotBase, const Identifier&)
869 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
882 JSValue jsSVGElementInstanceOnsubmit(ExecState* exec, JSValue slotBase, const Identifier&)
884 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
897 JSValue jsSVGElementInstanceOnunload(ExecState* exec, JSValue slotBase, const Identifier&)
899 JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slotBase));
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()))
912 JSValue jsSVGElementInstanceConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
914 JSSVGElementInstance* domObject = static_cast<JSSVGElementInstance*>(asObject(slotBase));
915 return JSSVGElementInstance::getConstructor(exec, domObject->globalObject());
918 void JSSVGElementInstance::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
920 JSSVGElementInstance* thisObject = jsCast<JSSVGElementInstance*>(cell);
921 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
922 lookupPut<JSSVGElementInstance, Base>(exec, propertyName, value, &JSSVGElementInstanceTable, thisObject, slot);
925 void setJSSVGElementInstanceOnabort(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
936 void setJSSVGElementInstanceOnblur(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
947 void setJSSVGElementInstanceOnchange(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
958 void setJSSVGElementInstanceOnclick(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
969 void setJSSVGElementInstanceOncontextmenu(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
980 void setJSSVGElementInstanceOndblclick(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
991 void setJSSVGElementInstanceOnerror(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1002 void setJSSVGElementInstanceOnfocus(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1013 void setJSSVGElementInstanceOninput(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1024 void setJSSVGElementInstanceOnkeydown(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1035 void setJSSVGElementInstanceOnkeypress(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1046 void setJSSVGElementInstanceOnkeyup(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1057 void setJSSVGElementInstanceOnload(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1068 void setJSSVGElementInstanceOnmousedown(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1079 void setJSSVGElementInstanceOnmousemove(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1090 void setJSSVGElementInstanceOnmouseout(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1101 void setJSSVGElementInstanceOnmouseover(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1112 void setJSSVGElementInstanceOnmouseup(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1123 void setJSSVGElementInstanceOnmousewheel(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1134 void setJSSVGElementInstanceOnbeforecut(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1145 void setJSSVGElementInstanceOncut(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1156 void setJSSVGElementInstanceOnbeforecopy(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1167 void setJSSVGElementInstanceOncopy(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1178 void setJSSVGElementInstanceOnbeforepaste(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1189 void setJSSVGElementInstanceOnpaste(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1200 void setJSSVGElementInstanceOndragenter(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1211 void setJSSVGElementInstanceOndragover(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1222 void setJSSVGElementInstanceOndragleave(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1233 void setJSSVGElementInstanceOndrop(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1244 void setJSSVGElementInstanceOndragstart(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1255 void setJSSVGElementInstanceOndrag(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1266 void setJSSVGElementInstanceOndragend(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1277 void setJSSVGElementInstanceOnreset(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1288 void setJSSVGElementInstanceOnresize(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1299 void setJSSVGElementInstanceOnscroll(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1310 void setJSSVGElementInstanceOnsearch(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1321 void setJSSVGElementInstanceOnselect(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1332 void setJSSVGElementInstanceOnselectstart(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1343 void setJSSVGElementInstanceOnsubmit(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1354 void setJSSVGElementInstanceOnunload(ExecState* exec, JSObject* thisObject, JSValue value)
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)));
1365 JSValue JSSVGElementInstance::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
1367 return getDOMConstructor<JSSVGElementInstanceConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
1370 EncodedJSValue JSC_HOST_CALL jsSVGElementInstancePrototypeFunctionAddEventListener(ExecState* exec)
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());
1390 EncodedJSValue JSC_HOST_CALL jsSVGElementInstancePrototypeFunctionRemoveEventListener(ExecState* exec)
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());
1410 EncodedJSValue JSC_HOST_CALL jsSVGElementInstancePrototypeFunctionDispatchEvent(ExecState* exec)
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());
1425 JSC::JSValue result = jsBoolean(imp->dispatchEvent(event, ec));
1426 setDOMException(exec, ec);
1427 return JSValue::encode(result);
1430 static inline bool isObservable(JSSVGElementInstance* jsSVGElementInstance)
1432 if (jsSVGElementInstance->hasCustomProperties())
1437 bool JSSVGElementInstanceOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
1439 JSSVGElementInstance* jsSVGElementInstance = static_cast<JSSVGElementInstance*>(handle.get().asCell());
1440 if (!isObservable(jsSVGElementInstance))
1442 UNUSED_PARAM(visitor);
1446 void JSSVGElementInstanceOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
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();
1454 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGElementInstance* impl)
1456 return wrap<JSSVGElementInstance>(exec, globalObject, impl);
1459 SVGElementInstance* toSVGElementInstance(JSC::JSValue value)
1461 return value.inherits(&JSSVGElementInstance::s_info) ? static_cast<JSSVGElementInstance*>(asObject(value))->impl() : 0;