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