|
1 /* |
|
2 * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT. |
|
3 * |
|
4 * This file was generated by the dom/make_names.pl script. |
|
5 * |
|
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
|
7 * |
|
8 * Redistribution and use in source and binary forms, with or without |
|
9 * modification, are permitted provided that the following conditions |
|
10 * are met: |
|
11 * 1. Redistributions of source code must retain the above copyright |
|
12 * notice, this list of conditions and the following disclaimer. |
|
13 * 2. Redistributions in binary form must reproduce the above copyright |
|
14 * notice, this list of conditions and the following disclaimer in the |
|
15 * documentation and/or other materials provided with the distribution. |
|
16 * |
|
17 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
|
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
|
20 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
|
21 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
|
22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
|
23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
|
24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
|
25 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
28 */ |
|
29 |
|
30 #include "config.h" |
|
31 #include "JSSVGElementWrapperFactory.h" |
|
32 |
|
33 #if ENABLE(SVG) |
|
34 |
|
35 #include "JSSVGAElement.h" |
|
36 #include "JSSVGAltGlyphElement.h" |
|
37 #include "JSSVGAnimateElement.h" |
|
38 #include "JSSVGAnimateColorElement.h" |
|
39 #include "JSSVGAnimateTransformElement.h" |
|
40 #include "JSSVGCircleElement.h" |
|
41 #include "JSSVGClipPathElement.h" |
|
42 #include "JSSVGCursorElement.h" |
|
43 #include "JSSVGDefsElement.h" |
|
44 #include "JSSVGDescElement.h" |
|
45 #include "JSSVGEllipseElement.h" |
|
46 #include "JSSVGFEBlendElement.h" |
|
47 #include "JSSVGFEColorMatrixElement.h" |
|
48 #include "JSSVGFEComponentTransferElement.h" |
|
49 #include "JSSVGFECompositeElement.h" |
|
50 #include "JSSVGFEConvolveMatrixElement.h" |
|
51 #include "JSSVGFEDiffuseLightingElement.h" |
|
52 #include "JSSVGFEDisplacementMapElement.h" |
|
53 #include "JSSVGFEDistantLightElement.h" |
|
54 #include "JSSVGFEFloodElement.h" |
|
55 #include "JSSVGFEFuncAElement.h" |
|
56 #include "JSSVGFEFuncBElement.h" |
|
57 #include "JSSVGFEFuncGElement.h" |
|
58 #include "JSSVGFEFuncRElement.h" |
|
59 #include "JSSVGFEGaussianBlurElement.h" |
|
60 #include "JSSVGFEImageElement.h" |
|
61 #include "JSSVGFEMergeElement.h" |
|
62 #include "JSSVGFEMergeNodeElement.h" |
|
63 #include "JSSVGFEMorphologyElement.h" |
|
64 #include "JSSVGFEOffsetElement.h" |
|
65 #include "JSSVGFEPointLightElement.h" |
|
66 #include "JSSVGFESpecularLightingElement.h" |
|
67 #include "JSSVGFESpotLightElement.h" |
|
68 #include "JSSVGFETileElement.h" |
|
69 #include "JSSVGFETurbulenceElement.h" |
|
70 #include "JSSVGFilterElement.h" |
|
71 #include "JSSVGFontElement.h" |
|
72 #include "JSSVGFontFaceElement.h" |
|
73 #include "JSSVGFontFaceFormatElement.h" |
|
74 #include "JSSVGFontFaceNameElement.h" |
|
75 #include "JSSVGFontFaceSrcElement.h" |
|
76 #include "JSSVGFontFaceUriElement.h" |
|
77 #include "JSSVGForeignObjectElement.h" |
|
78 #include "JSSVGGElement.h" |
|
79 #include "JSSVGGlyphElement.h" |
|
80 #include "JSSVGImageElement.h" |
|
81 #include "JSSVGLineElement.h" |
|
82 #include "JSSVGLinearGradientElement.h" |
|
83 #include "JSSVGMarkerElement.h" |
|
84 #include "JSSVGMaskElement.h" |
|
85 #include "JSSVGMetadataElement.h" |
|
86 #include "JSSVGMissingGlyphElement.h" |
|
87 #include "JSSVGPathElement.h" |
|
88 #include "JSSVGPatternElement.h" |
|
89 #include "JSSVGPolygonElement.h" |
|
90 #include "JSSVGPolylineElement.h" |
|
91 #include "JSSVGRadialGradientElement.h" |
|
92 #include "JSSVGRectElement.h" |
|
93 #include "JSSVGScriptElement.h" |
|
94 #include "JSSVGSetElement.h" |
|
95 #include "JSSVGStopElement.h" |
|
96 #include "JSSVGStyleElement.h" |
|
97 #include "JSSVGSVGElement.h" |
|
98 #include "JSSVGSwitchElement.h" |
|
99 #include "JSSVGSymbolElement.h" |
|
100 #include "JSSVGTextElement.h" |
|
101 #include "JSSVGTextPathElement.h" |
|
102 #include "JSSVGTitleElement.h" |
|
103 #include "JSSVGTRefElement.h" |
|
104 #include "JSSVGTSpanElement.h" |
|
105 #include "JSSVGUseElement.h" |
|
106 #include "JSSVGViewElement.h" |
|
107 #include "JSSVGVKernElement.h" |
|
108 |
|
109 #include "SVGNames.h" |
|
110 |
|
111 #include "SVGAElement.h" |
|
112 #include "SVGAltGlyphElement.h" |
|
113 #include "SVGAnimateElement.h" |
|
114 #include "SVGAnimateColorElement.h" |
|
115 #include "SVGAnimateMotionElement.h" |
|
116 #include "SVGAnimateTransformElement.h" |
|
117 #include "SVGCircleElement.h" |
|
118 #include "SVGClipPathElement.h" |
|
119 #include "SVGCursorElement.h" |
|
120 #include "SVGDefsElement.h" |
|
121 #include "SVGDescElement.h" |
|
122 #include "SVGEllipseElement.h" |
|
123 #include "SVGFEBlendElement.h" |
|
124 #include "SVGFEColorMatrixElement.h" |
|
125 #include "SVGFEComponentTransferElement.h" |
|
126 #include "SVGFECompositeElement.h" |
|
127 #include "SVGFEConvolveMatrixElement.h" |
|
128 #include "SVGFEDiffuseLightingElement.h" |
|
129 #include "SVGFEDisplacementMapElement.h" |
|
130 #include "SVGFEDistantLightElement.h" |
|
131 #include "SVGFEFloodElement.h" |
|
132 #include "SVGFEFuncAElement.h" |
|
133 #include "SVGFEFuncBElement.h" |
|
134 #include "SVGFEFuncGElement.h" |
|
135 #include "SVGFEFuncRElement.h" |
|
136 #include "SVGFEGaussianBlurElement.h" |
|
137 #include "SVGFEImageElement.h" |
|
138 #include "SVGFEMergeElement.h" |
|
139 #include "SVGFEMergeNodeElement.h" |
|
140 #include "SVGFEMorphologyElement.h" |
|
141 #include "SVGFEOffsetElement.h" |
|
142 #include "SVGFEPointLightElement.h" |
|
143 #include "SVGFESpecularLightingElement.h" |
|
144 #include "SVGFESpotLightElement.h" |
|
145 #include "SVGFETileElement.h" |
|
146 #include "SVGFETurbulenceElement.h" |
|
147 #include "SVGFilterElement.h" |
|
148 #include "SVGFontElement.h" |
|
149 #include "SVGFontFaceElement.h" |
|
150 #include "SVGFontFaceFormatElement.h" |
|
151 #include "SVGFontFaceNameElement.h" |
|
152 #include "SVGFontFaceSrcElement.h" |
|
153 #include "SVGFontFaceUriElement.h" |
|
154 #include "SVGForeignObjectElement.h" |
|
155 #include "SVGGElement.h" |
|
156 #include "SVGGlyphElement.h" |
|
157 #include "SVGHKernElement.h" |
|
158 #include "SVGImageElement.h" |
|
159 #include "SVGLineElement.h" |
|
160 #include "SVGLinearGradientElement.h" |
|
161 #include "SVGMarkerElement.h" |
|
162 #include "SVGMaskElement.h" |
|
163 #include "SVGMetadataElement.h" |
|
164 #include "SVGMissingGlyphElement.h" |
|
165 #include "SVGMPathElement.h" |
|
166 #include "SVGPathElement.h" |
|
167 #include "SVGPatternElement.h" |
|
168 #include "SVGPolygonElement.h" |
|
169 #include "SVGPolylineElement.h" |
|
170 #include "SVGRadialGradientElement.h" |
|
171 #include "SVGRectElement.h" |
|
172 #include "SVGScriptElement.h" |
|
173 #include "SVGSetElement.h" |
|
174 #include "SVGStopElement.h" |
|
175 #include "SVGStyleElement.h" |
|
176 #include "SVGSVGElement.h" |
|
177 #include "SVGSwitchElement.h" |
|
178 #include "SVGSymbolElement.h" |
|
179 #include "SVGTextElement.h" |
|
180 #include "SVGTextPathElement.h" |
|
181 #include "SVGTitleElement.h" |
|
182 #include "SVGTRefElement.h" |
|
183 #include "SVGTSpanElement.h" |
|
184 #include "SVGUseElement.h" |
|
185 #include "SVGViewElement.h" |
|
186 #include "SVGVKernElement.h" |
|
187 #include <wtf/StdLibExtras.h> |
|
188 |
|
189 #if ENABLE(VIDEO) |
|
190 #include "Document.h" |
|
191 #include "Settings.h" |
|
192 #endif |
|
193 |
|
194 using namespace JSC; |
|
195 |
|
196 namespace WebCore { |
|
197 |
|
198 using namespace SVGNames; |
|
199 |
|
200 typedef JSNode* (*CreateSVGElementWrapperFunction)(ExecState*, JSDOMGlobalObject*, PassRefPtr<SVGElement>); |
|
201 |
|
202 static JSNode* createSVGAElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
203 { |
|
204 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGAElement, element.get()); |
|
205 } |
|
206 |
|
207 static JSNode* createSVGAltGlyphElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
208 { |
|
209 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGAltGlyphElement, element.get()); |
|
210 } |
|
211 |
|
212 static JSNode* createSVGAnimateElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
213 { |
|
214 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGAnimateElement, element.get()); |
|
215 } |
|
216 |
|
217 static JSNode* createSVGAnimateColorElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
218 { |
|
219 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGAnimateColorElement, element.get()); |
|
220 } |
|
221 |
|
222 static JSNode* createSVGAnimateTransformElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
223 { |
|
224 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGAnimateTransformElement, element.get()); |
|
225 } |
|
226 |
|
227 static JSNode* createSVGCircleElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
228 { |
|
229 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGCircleElement, element.get()); |
|
230 } |
|
231 |
|
232 static JSNode* createSVGClipPathElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
233 { |
|
234 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGClipPathElement, element.get()); |
|
235 } |
|
236 |
|
237 static JSNode* createSVGCursorElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
238 { |
|
239 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGCursorElement, element.get()); |
|
240 } |
|
241 |
|
242 static JSNode* createSVGDefsElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
243 { |
|
244 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGDefsElement, element.get()); |
|
245 } |
|
246 |
|
247 static JSNode* createSVGDescElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
248 { |
|
249 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGDescElement, element.get()); |
|
250 } |
|
251 |
|
252 static JSNode* createSVGEllipseElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
253 { |
|
254 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGEllipseElement, element.get()); |
|
255 } |
|
256 |
|
257 static JSNode* createSVGFEBlendElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
258 { |
|
259 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEBlendElement, element.get()); |
|
260 } |
|
261 |
|
262 static JSNode* createSVGFEColorMatrixElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
263 { |
|
264 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEColorMatrixElement, element.get()); |
|
265 } |
|
266 |
|
267 static JSNode* createSVGFEComponentTransferElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
268 { |
|
269 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEComponentTransferElement, element.get()); |
|
270 } |
|
271 |
|
272 static JSNode* createSVGFECompositeElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
273 { |
|
274 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFECompositeElement, element.get()); |
|
275 } |
|
276 |
|
277 static JSNode* createSVGFEConvolveMatrixElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
278 { |
|
279 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEConvolveMatrixElement, element.get()); |
|
280 } |
|
281 |
|
282 static JSNode* createSVGFEDiffuseLightingElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
283 { |
|
284 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEDiffuseLightingElement, element.get()); |
|
285 } |
|
286 |
|
287 static JSNode* createSVGFEDisplacementMapElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
288 { |
|
289 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEDisplacementMapElement, element.get()); |
|
290 } |
|
291 |
|
292 static JSNode* createSVGFEDistantLightElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
293 { |
|
294 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEDistantLightElement, element.get()); |
|
295 } |
|
296 |
|
297 static JSNode* createSVGFEFloodElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
298 { |
|
299 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEFloodElement, element.get()); |
|
300 } |
|
301 |
|
302 static JSNode* createSVGFEFuncAElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
303 { |
|
304 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEFuncAElement, element.get()); |
|
305 } |
|
306 |
|
307 static JSNode* createSVGFEFuncBElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
308 { |
|
309 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEFuncBElement, element.get()); |
|
310 } |
|
311 |
|
312 static JSNode* createSVGFEFuncGElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
313 { |
|
314 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEFuncGElement, element.get()); |
|
315 } |
|
316 |
|
317 static JSNode* createSVGFEFuncRElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
318 { |
|
319 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEFuncRElement, element.get()); |
|
320 } |
|
321 |
|
322 static JSNode* createSVGFEGaussianBlurElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
323 { |
|
324 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEGaussianBlurElement, element.get()); |
|
325 } |
|
326 |
|
327 static JSNode* createSVGFEImageElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
328 { |
|
329 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEImageElement, element.get()); |
|
330 } |
|
331 |
|
332 static JSNode* createSVGFEMergeElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
333 { |
|
334 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEMergeElement, element.get()); |
|
335 } |
|
336 |
|
337 static JSNode* createSVGFEMergeNodeElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
338 { |
|
339 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEMergeNodeElement, element.get()); |
|
340 } |
|
341 |
|
342 static JSNode* createSVGFEMorphologyElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
343 { |
|
344 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEMorphologyElement, element.get()); |
|
345 } |
|
346 |
|
347 static JSNode* createSVGFEOffsetElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
348 { |
|
349 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEOffsetElement, element.get()); |
|
350 } |
|
351 |
|
352 static JSNode* createSVGFEPointLightElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
353 { |
|
354 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFEPointLightElement, element.get()); |
|
355 } |
|
356 |
|
357 static JSNode* createSVGFESpecularLightingElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
358 { |
|
359 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFESpecularLightingElement, element.get()); |
|
360 } |
|
361 |
|
362 static JSNode* createSVGFESpotLightElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
363 { |
|
364 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFESpotLightElement, element.get()); |
|
365 } |
|
366 |
|
367 static JSNode* createSVGFETileElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
368 { |
|
369 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFETileElement, element.get()); |
|
370 } |
|
371 |
|
372 static JSNode* createSVGFETurbulenceElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
373 { |
|
374 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFETurbulenceElement, element.get()); |
|
375 } |
|
376 |
|
377 static JSNode* createSVGFilterElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
378 { |
|
379 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFilterElement, element.get()); |
|
380 } |
|
381 |
|
382 static JSNode* createSVGFontElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
383 { |
|
384 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFontElement, element.get()); |
|
385 } |
|
386 |
|
387 static JSNode* createSVGFontFaceElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
388 { |
|
389 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFontFaceElement, element.get()); |
|
390 } |
|
391 |
|
392 static JSNode* createSVGFontFaceFormatElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
393 { |
|
394 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFontFaceFormatElement, element.get()); |
|
395 } |
|
396 |
|
397 static JSNode* createSVGFontFaceNameElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
398 { |
|
399 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFontFaceNameElement, element.get()); |
|
400 } |
|
401 |
|
402 static JSNode* createSVGFontFaceSrcElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
403 { |
|
404 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFontFaceSrcElement, element.get()); |
|
405 } |
|
406 |
|
407 static JSNode* createSVGFontFaceUriElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
408 { |
|
409 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFontFaceUriElement, element.get()); |
|
410 } |
|
411 |
|
412 static JSNode* createSVGForeignObjectElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
413 { |
|
414 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGForeignObjectElement, element.get()); |
|
415 } |
|
416 |
|
417 static JSNode* createSVGGElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
418 { |
|
419 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGGElement, element.get()); |
|
420 } |
|
421 |
|
422 static JSNode* createSVGGlyphElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
423 { |
|
424 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGGlyphElement, element.get()); |
|
425 } |
|
426 |
|
427 static JSNode* createSVGImageElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
428 { |
|
429 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGImageElement, element.get()); |
|
430 } |
|
431 |
|
432 static JSNode* createSVGLineElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
433 { |
|
434 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGLineElement, element.get()); |
|
435 } |
|
436 |
|
437 static JSNode* createSVGLinearGradientElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
438 { |
|
439 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGLinearGradientElement, element.get()); |
|
440 } |
|
441 |
|
442 static JSNode* createSVGMarkerElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
443 { |
|
444 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGMarkerElement, element.get()); |
|
445 } |
|
446 |
|
447 static JSNode* createSVGMaskElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
448 { |
|
449 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGMaskElement, element.get()); |
|
450 } |
|
451 |
|
452 static JSNode* createSVGMetadataElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
453 { |
|
454 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGMetadataElement, element.get()); |
|
455 } |
|
456 |
|
457 static JSNode* createSVGMissingGlyphElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
458 { |
|
459 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGMissingGlyphElement, element.get()); |
|
460 } |
|
461 |
|
462 static JSNode* createSVGPathElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
463 { |
|
464 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGPathElement, element.get()); |
|
465 } |
|
466 |
|
467 static JSNode* createSVGPatternElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
468 { |
|
469 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGPatternElement, element.get()); |
|
470 } |
|
471 |
|
472 static JSNode* createSVGPolygonElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
473 { |
|
474 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGPolygonElement, element.get()); |
|
475 } |
|
476 |
|
477 static JSNode* createSVGPolylineElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
478 { |
|
479 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGPolylineElement, element.get()); |
|
480 } |
|
481 |
|
482 static JSNode* createSVGRadialGradientElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
483 { |
|
484 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGRadialGradientElement, element.get()); |
|
485 } |
|
486 |
|
487 static JSNode* createSVGRectElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
488 { |
|
489 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGRectElement, element.get()); |
|
490 } |
|
491 |
|
492 static JSNode* createSVGScriptElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
493 { |
|
494 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGScriptElement, element.get()); |
|
495 } |
|
496 |
|
497 static JSNode* createSVGSetElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
498 { |
|
499 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGSetElement, element.get()); |
|
500 } |
|
501 |
|
502 static JSNode* createSVGStopElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
503 { |
|
504 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGStopElement, element.get()); |
|
505 } |
|
506 |
|
507 static JSNode* createSVGStyleElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
508 { |
|
509 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGStyleElement, element.get()); |
|
510 } |
|
511 |
|
512 static JSNode* createSVGSVGElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
513 { |
|
514 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGSVGElement, element.get()); |
|
515 } |
|
516 |
|
517 static JSNode* createSVGSwitchElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
518 { |
|
519 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGSwitchElement, element.get()); |
|
520 } |
|
521 |
|
522 static JSNode* createSVGSymbolElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
523 { |
|
524 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGSymbolElement, element.get()); |
|
525 } |
|
526 |
|
527 static JSNode* createSVGTextElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
528 { |
|
529 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGTextElement, element.get()); |
|
530 } |
|
531 |
|
532 static JSNode* createSVGTextPathElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
533 { |
|
534 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGTextPathElement, element.get()); |
|
535 } |
|
536 |
|
537 static JSNode* createSVGTitleElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
538 { |
|
539 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGTitleElement, element.get()); |
|
540 } |
|
541 |
|
542 static JSNode* createSVGTRefElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
543 { |
|
544 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGTRefElement, element.get()); |
|
545 } |
|
546 |
|
547 static JSNode* createSVGTSpanElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
548 { |
|
549 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGTSpanElement, element.get()); |
|
550 } |
|
551 |
|
552 static JSNode* createSVGUseElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
553 { |
|
554 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGUseElement, element.get()); |
|
555 } |
|
556 |
|
557 static JSNode* createSVGViewElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
558 { |
|
559 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGViewElement, element.get()); |
|
560 } |
|
561 |
|
562 static JSNode* createSVGVKernElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
563 { |
|
564 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGVKernElement, element.get()); |
|
565 } |
|
566 |
|
567 JSNode* createJSSVGWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) |
|
568 { |
|
569 typedef HashMap<WebCore::AtomicStringImpl*, CreateSVGElementWrapperFunction> FunctionMap; |
|
570 DEFINE_STATIC_LOCAL(FunctionMap, map, ()); |
|
571 if (map.isEmpty()) { |
|
572 map.set(aTag.localName().impl(), createSVGAElementWrapper); |
|
573 map.set(altGlyphTag.localName().impl(), createSVGAltGlyphElementWrapper); |
|
574 map.set(animateTag.localName().impl(), createSVGAnimateElementWrapper); |
|
575 map.set(animateColorTag.localName().impl(), createSVGAnimateColorElementWrapper); |
|
576 map.set(animateTransformTag.localName().impl(), createSVGAnimateTransformElementWrapper); |
|
577 map.set(circleTag.localName().impl(), createSVGCircleElementWrapper); |
|
578 map.set(clipPathTag.localName().impl(), createSVGClipPathElementWrapper); |
|
579 map.set(cursorTag.localName().impl(), createSVGCursorElementWrapper); |
|
580 map.set(defsTag.localName().impl(), createSVGDefsElementWrapper); |
|
581 map.set(descTag.localName().impl(), createSVGDescElementWrapper); |
|
582 map.set(ellipseTag.localName().impl(), createSVGEllipseElementWrapper); |
|
583 map.set(feBlendTag.localName().impl(), createSVGFEBlendElementWrapper); |
|
584 map.set(feColorMatrixTag.localName().impl(), createSVGFEColorMatrixElementWrapper); |
|
585 map.set(feComponentTransferTag.localName().impl(), createSVGFEComponentTransferElementWrapper); |
|
586 map.set(feCompositeTag.localName().impl(), createSVGFECompositeElementWrapper); |
|
587 map.set(feConvolveMatrixTag.localName().impl(), createSVGFEConvolveMatrixElementWrapper); |
|
588 map.set(feDiffuseLightingTag.localName().impl(), createSVGFEDiffuseLightingElementWrapper); |
|
589 map.set(feDisplacementMapTag.localName().impl(), createSVGFEDisplacementMapElementWrapper); |
|
590 map.set(feDistantLightTag.localName().impl(), createSVGFEDistantLightElementWrapper); |
|
591 map.set(feFloodTag.localName().impl(), createSVGFEFloodElementWrapper); |
|
592 map.set(feFuncATag.localName().impl(), createSVGFEFuncAElementWrapper); |
|
593 map.set(feFuncBTag.localName().impl(), createSVGFEFuncBElementWrapper); |
|
594 map.set(feFuncGTag.localName().impl(), createSVGFEFuncGElementWrapper); |
|
595 map.set(feFuncRTag.localName().impl(), createSVGFEFuncRElementWrapper); |
|
596 map.set(feGaussianBlurTag.localName().impl(), createSVGFEGaussianBlurElementWrapper); |
|
597 map.set(feImageTag.localName().impl(), createSVGFEImageElementWrapper); |
|
598 map.set(feMergeTag.localName().impl(), createSVGFEMergeElementWrapper); |
|
599 map.set(feMergeNodeTag.localName().impl(), createSVGFEMergeNodeElementWrapper); |
|
600 map.set(feMorphologyTag.localName().impl(), createSVGFEMorphologyElementWrapper); |
|
601 map.set(feOffsetTag.localName().impl(), createSVGFEOffsetElementWrapper); |
|
602 map.set(fePointLightTag.localName().impl(), createSVGFEPointLightElementWrapper); |
|
603 map.set(feSpecularLightingTag.localName().impl(), createSVGFESpecularLightingElementWrapper); |
|
604 map.set(feSpotLightTag.localName().impl(), createSVGFESpotLightElementWrapper); |
|
605 map.set(feTileTag.localName().impl(), createSVGFETileElementWrapper); |
|
606 map.set(feTurbulenceTag.localName().impl(), createSVGFETurbulenceElementWrapper); |
|
607 map.set(filterTag.localName().impl(), createSVGFilterElementWrapper); |
|
608 map.set(fontTag.localName().impl(), createSVGFontElementWrapper); |
|
609 map.set(font_faceTag.localName().impl(), createSVGFontFaceElementWrapper); |
|
610 map.set(font_face_formatTag.localName().impl(), createSVGFontFaceFormatElementWrapper); |
|
611 map.set(font_face_nameTag.localName().impl(), createSVGFontFaceNameElementWrapper); |
|
612 map.set(font_face_srcTag.localName().impl(), createSVGFontFaceSrcElementWrapper); |
|
613 map.set(font_face_uriTag.localName().impl(), createSVGFontFaceUriElementWrapper); |
|
614 map.set(foreignObjectTag.localName().impl(), createSVGForeignObjectElementWrapper); |
|
615 map.set(gTag.localName().impl(), createSVGGElementWrapper); |
|
616 map.set(glyphTag.localName().impl(), createSVGGlyphElementWrapper); |
|
617 map.set(imageTag.localName().impl(), createSVGImageElementWrapper); |
|
618 map.set(lineTag.localName().impl(), createSVGLineElementWrapper); |
|
619 map.set(linearGradientTag.localName().impl(), createSVGLinearGradientElementWrapper); |
|
620 map.set(markerTag.localName().impl(), createSVGMarkerElementWrapper); |
|
621 map.set(maskTag.localName().impl(), createSVGMaskElementWrapper); |
|
622 map.set(metadataTag.localName().impl(), createSVGMetadataElementWrapper); |
|
623 map.set(missing_glyphTag.localName().impl(), createSVGMissingGlyphElementWrapper); |
|
624 map.set(pathTag.localName().impl(), createSVGPathElementWrapper); |
|
625 map.set(patternTag.localName().impl(), createSVGPatternElementWrapper); |
|
626 map.set(polygonTag.localName().impl(), createSVGPolygonElementWrapper); |
|
627 map.set(polylineTag.localName().impl(), createSVGPolylineElementWrapper); |
|
628 map.set(radialGradientTag.localName().impl(), createSVGRadialGradientElementWrapper); |
|
629 map.set(rectTag.localName().impl(), createSVGRectElementWrapper); |
|
630 map.set(scriptTag.localName().impl(), createSVGScriptElementWrapper); |
|
631 map.set(setTag.localName().impl(), createSVGSetElementWrapper); |
|
632 map.set(stopTag.localName().impl(), createSVGStopElementWrapper); |
|
633 map.set(styleTag.localName().impl(), createSVGStyleElementWrapper); |
|
634 map.set(svgTag.localName().impl(), createSVGSVGElementWrapper); |
|
635 map.set(switchTag.localName().impl(), createSVGSwitchElementWrapper); |
|
636 map.set(symbolTag.localName().impl(), createSVGSymbolElementWrapper); |
|
637 map.set(textTag.localName().impl(), createSVGTextElementWrapper); |
|
638 map.set(textPathTag.localName().impl(), createSVGTextPathElementWrapper); |
|
639 map.set(titleTag.localName().impl(), createSVGTitleElementWrapper); |
|
640 map.set(trefTag.localName().impl(), createSVGTRefElementWrapper); |
|
641 map.set(tspanTag.localName().impl(), createSVGTSpanElementWrapper); |
|
642 map.set(useTag.localName().impl(), createSVGUseElementWrapper); |
|
643 map.set(viewTag.localName().impl(), createSVGViewElementWrapper); |
|
644 map.set(vkernTag.localName().impl(), createSVGVKernElementWrapper); |
|
645 } |
|
646 CreateSVGElementWrapperFunction createWrapperFunction = map.get(element->localName().impl()); |
|
647 if (createWrapperFunction) |
|
648 return createWrapperFunction(exec, globalObject, element); |
|
649 return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGElement, element.get()); |
|
650 } |
|
651 |
|
652 } |
|
653 |
|
654 #endif |