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, 2013 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 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 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#include "JSSVGAElement.h"
34#include "JSSVGAltGlyphElement.h"
35#include "JSSVGAltGlyphDefElement.h"
36#include "JSSVGAltGlyphItemElement.h"
37#include "JSSVGAnimateElement.h"
38#include "JSSVGAnimateColorElement.h"
39#include "JSSVGAnimateMotionElement.h"
40#include "JSSVGAnimateTransformElement.h"
41#include "JSSVGCircleElement.h"
42#include "JSSVGClipPathElement.h"
43#include "JSSVGCursorElement.h"
44#include "JSSVGDefsElement.h"
45#include "JSSVGDescElement.h"
46#include "JSSVGEllipseElement.h"
47#include "JSSVGFEBlendElement.h"
48#include "JSSVGFEColorMatrixElement.h"
49#include "JSSVGFEComponentTransferElement.h"
50#include "JSSVGFECompositeElement.h"
51#include "JSSVGFEConvolveMatrixElement.h"
52#include "JSSVGFEDiffuseLightingElement.h"
53#include "JSSVGFEDisplacementMapElement.h"
54#include "JSSVGFEDistantLightElement.h"
55#include "JSSVGFEDropShadowElement.h"
56#include "JSSVGFEFloodElement.h"
57#include "JSSVGFEFuncAElement.h"
58#include "JSSVGFEFuncBElement.h"
59#include "JSSVGFEFuncGElement.h"
60#include "JSSVGFEFuncRElement.h"
61#include "JSSVGFEGaussianBlurElement.h"
62#include "JSSVGFEImageElement.h"
63#include "JSSVGFEMergeElement.h"
64#include "JSSVGFEMergeNodeElement.h"
65#include "JSSVGFEMorphologyElement.h"
66#include "JSSVGFEOffsetElement.h"
67#include "JSSVGFEPointLightElement.h"
68#include "JSSVGFESpecularLightingElement.h"
69#include "JSSVGFESpotLightElement.h"
70#include "JSSVGFETileElement.h"
71#include "JSSVGFETurbulenceElement.h"
72#include "JSSVGFilterElement.h"
73#include "JSSVGFontElement.h"
74#include "JSSVGFontFaceElement.h"
75#include "JSSVGFontFaceFormatElement.h"
76#include "JSSVGFontFaceNameElement.h"
77#include "JSSVGFontFaceSrcElement.h"
78#include "JSSVGFontFaceUriElement.h"
79#include "JSSVGForeignObjectElement.h"
80#include "JSSVGGElement.h"
81#include "JSSVGGlyphElement.h"
82#include "JSSVGGlyphRefElement.h"
83#include "JSSVGHKernElement.h"
84#include "JSSVGImageElement.h"
85#include "JSSVGLineElement.h"
86#include "JSSVGLinearGradientElement.h"
87#include "JSSVGMarkerElement.h"
88#include "JSSVGMaskElement.h"
89#include "JSSVGMetadataElement.h"
90#include "JSSVGMissingGlyphElement.h"
91#include "JSSVGMPathElement.h"
92#include "JSSVGPathElement.h"
93#include "JSSVGPatternElement.h"
94#include "JSSVGPolygonElement.h"
95#include "JSSVGPolylineElement.h"
96#include "JSSVGRadialGradientElement.h"
97#include "JSSVGRectElement.h"
98#include "JSSVGScriptElement.h"
99#include "JSSVGSetElement.h"
100#include "JSSVGStopElement.h"
101#include "JSSVGStyleElement.h"
102#include "JSSVGSVGElement.h"
103#include "JSSVGSwitchElement.h"
104#include "JSSVGSymbolElement.h"
105#include "JSSVGTextElement.h"
106#include "JSSVGTextPathElement.h"
107#include "JSSVGTitleElement.h"
108#include "JSSVGTRefElement.h"
109#include "JSSVGTSpanElement.h"
110#include "JSSVGUseElement.h"
111#include "JSSVGViewElement.h"
112#include "JSSVGVKernElement.h"
113#include "JSSVGElement.h"
114#include "SVGAElement.h"
115#include "SVGAltGlyphElement.h"
116#include "SVGAltGlyphDefElement.h"
117#include "SVGAltGlyphItemElement.h"
118#include "SVGAnimateElement.h"
119#include "SVGAnimateColorElement.h"
120#include "SVGAnimateMotionElement.h"
121#include "SVGAnimateTransformElement.h"
122#include "SVGCircleElement.h"
123#include "SVGClipPathElement.h"
124#include "SVGCursorElement.h"
125#include "SVGDefsElement.h"
126#include "SVGDescElement.h"
127#include "SVGEllipseElement.h"
128#include "SVGFEBlendElement.h"
129#include "SVGFEColorMatrixElement.h"
130#include "SVGFEComponentTransferElement.h"
131#include "SVGFECompositeElement.h"
132#include "SVGFEConvolveMatrixElement.h"
133#include "SVGFEDiffuseLightingElement.h"
134#include "SVGFEDisplacementMapElement.h"
135#include "SVGFEDistantLightElement.h"
136#include "SVGFEDropShadowElement.h"
137#include "SVGFEFloodElement.h"
138#include "SVGFEFuncAElement.h"
139#include "SVGFEFuncBElement.h"
140#include "SVGFEFuncGElement.h"
141#include "SVGFEFuncRElement.h"
142#include "SVGFEGaussianBlurElement.h"
143#include "SVGFEImageElement.h"
144#include "SVGFEMergeElement.h"
145#include "SVGFEMergeNodeElement.h"
146#include "SVGFEMorphologyElement.h"
147#include "SVGFEOffsetElement.h"
148#include "SVGFEPointLightElement.h"
149#include "SVGFESpecularLightingElement.h"
150#include "SVGFESpotLightElement.h"
151#include "SVGFETileElement.h"
152#include "SVGFETurbulenceElement.h"
153#include "SVGFilterElement.h"
154#include "SVGFontElement.h"
155#include "SVGFontFaceElement.h"
156#include "SVGFontFaceFormatElement.h"
157#include "SVGFontFaceNameElement.h"
158#include "SVGFontFaceSrcElement.h"
159#include "SVGFontFaceUriElement.h"
160#include "SVGForeignObjectElement.h"
161#include "SVGGElement.h"
162#include "SVGGlyphElement.h"
163#include "SVGGlyphRefElement.h"
164#include "SVGHKernElement.h"
165#include "SVGImageElement.h"
166#include "SVGLineElement.h"
167#include "SVGLinearGradientElement.h"
168#include "SVGMarkerElement.h"
169#include "SVGMaskElement.h"
170#include "SVGMetadataElement.h"
171#include "SVGMissingGlyphElement.h"
172#include "SVGMPathElement.h"
173#include "SVGPathElement.h"
174#include "SVGPatternElement.h"
175#include "SVGPolygonElement.h"
176#include "SVGPolylineElement.h"
177#include "SVGRadialGradientElement.h"
178#include "SVGRectElement.h"
179#include "SVGScriptElement.h"
180#include "SVGSetElement.h"
181#include "SVGStopElement.h"
182#include "SVGStyleElement.h"
183#include "SVGSVGElement.h"
184#include "SVGSwitchElement.h"
185#include "SVGSymbolElement.h"
186#include "SVGTextElement.h"
187#include "SVGTextPathElement.h"
188#include "SVGTitleElement.h"
189#include "SVGTRefElement.h"
190#include "SVGTSpanElement.h"
191#include "SVGUseElement.h"
192#include "SVGViewElement.h"
193#include "SVGVKernElement.h"
194#include "SVGUnknownElement.h"
195
196#include "SVGNames.h"
197
198#include "Document.h"
199#include "RuntimeEnabledFeatures.h"
200#include "Settings.h"
201#include <wtf/NeverDestroyed.h>
202#include <wtf/StdLibExtras.h>
203
204using namespace JSC;
205
206namespace WebCore {
207
208using namespace SVGNames;
209
210typedef JSDOMObject* (*CreateSVGElementWrapperFunction)(JSDOMGlobalObject*, Ref<SVGElement>&&);
211
212static JSDOMObject* createSVGAElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
213{
214 return createWrapper<SVGAElement>(globalObject, WTFMove(element));
215}
216
217static JSDOMObject* createSVGAltGlyphElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
218{
219 return createWrapper<SVGAltGlyphElement>(globalObject, WTFMove(element));
220}
221
222static JSDOMObject* createSVGAltGlyphDefElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
223{
224 return createWrapper<SVGAltGlyphDefElement>(globalObject, WTFMove(element));
225}
226
227static JSDOMObject* createSVGAltGlyphItemElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
228{
229 return createWrapper<SVGAltGlyphItemElement>(globalObject, WTFMove(element));
230}
231
232static JSDOMObject* createSVGAnimateElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
233{
234 return createWrapper<SVGAnimateElement>(globalObject, WTFMove(element));
235}
236
237static JSDOMObject* createSVGAnimateColorElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
238{
239 return createWrapper<SVGAnimateColorElement>(globalObject, WTFMove(element));
240}
241
242static JSDOMObject* createSVGAnimateMotionElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
243{
244 return createWrapper<SVGAnimateMotionElement>(globalObject, WTFMove(element));
245}
246
247static JSDOMObject* createSVGAnimateTransformElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
248{
249 return createWrapper<SVGAnimateTransformElement>(globalObject, WTFMove(element));
250}
251
252static JSDOMObject* createSVGCircleElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
253{
254 return createWrapper<SVGCircleElement>(globalObject, WTFMove(element));
255}
256
257static JSDOMObject* createSVGClipPathElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
258{
259 return createWrapper<SVGClipPathElement>(globalObject, WTFMove(element));
260}
261
262static JSDOMObject* createSVGCursorElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
263{
264 return createWrapper<SVGCursorElement>(globalObject, WTFMove(element));
265}
266
267static JSDOMObject* createSVGDefsElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
268{
269 return createWrapper<SVGDefsElement>(globalObject, WTFMove(element));
270}
271
272static JSDOMObject* createSVGDescElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
273{
274 return createWrapper<SVGDescElement>(globalObject, WTFMove(element));
275}
276
277static JSDOMObject* createSVGEllipseElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
278{
279 return createWrapper<SVGEllipseElement>(globalObject, WTFMove(element));
280}
281
282static JSDOMObject* createSVGFEBlendElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
283{
284 return createWrapper<SVGFEBlendElement>(globalObject, WTFMove(element));
285}
286
287static JSDOMObject* createSVGFEColorMatrixElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
288{
289 return createWrapper<SVGFEColorMatrixElement>(globalObject, WTFMove(element));
290}
291
292static JSDOMObject* createSVGFEComponentTransferElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
293{
294 return createWrapper<SVGFEComponentTransferElement>(globalObject, WTFMove(element));
295}
296
297static JSDOMObject* createSVGFECompositeElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
298{
299 return createWrapper<SVGFECompositeElement>(globalObject, WTFMove(element));
300}
301
302static JSDOMObject* createSVGFEConvolveMatrixElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
303{
304 return createWrapper<SVGFEConvolveMatrixElement>(globalObject, WTFMove(element));
305}
306
307static JSDOMObject* createSVGFEDiffuseLightingElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
308{
309 return createWrapper<SVGFEDiffuseLightingElement>(globalObject, WTFMove(element));
310}
311
312static JSDOMObject* createSVGFEDisplacementMapElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
313{
314 return createWrapper<SVGFEDisplacementMapElement>(globalObject, WTFMove(element));
315}
316
317static JSDOMObject* createSVGFEDistantLightElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
318{
319 return createWrapper<SVGFEDistantLightElement>(globalObject, WTFMove(element));
320}
321
322static JSDOMObject* createSVGFEDropShadowElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
323{
324 return createWrapper<SVGFEDropShadowElement>(globalObject, WTFMove(element));
325}
326
327static JSDOMObject* createSVGFEFloodElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
328{
329 return createWrapper<SVGFEFloodElement>(globalObject, WTFMove(element));
330}
331
332static JSDOMObject* createSVGFEFuncAElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
333{
334 return createWrapper<SVGFEFuncAElement>(globalObject, WTFMove(element));
335}
336
337static JSDOMObject* createSVGFEFuncBElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
338{
339 return createWrapper<SVGFEFuncBElement>(globalObject, WTFMove(element));
340}
341
342static JSDOMObject* createSVGFEFuncGElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
343{
344 return createWrapper<SVGFEFuncGElement>(globalObject, WTFMove(element));
345}
346
347static JSDOMObject* createSVGFEFuncRElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
348{
349 return createWrapper<SVGFEFuncRElement>(globalObject, WTFMove(element));
350}
351
352static JSDOMObject* createSVGFEGaussianBlurElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
353{
354 return createWrapper<SVGFEGaussianBlurElement>(globalObject, WTFMove(element));
355}
356
357static JSDOMObject* createSVGFEImageElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
358{
359 return createWrapper<SVGFEImageElement>(globalObject, WTFMove(element));
360}
361
362static JSDOMObject* createSVGFEMergeElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
363{
364 return createWrapper<SVGFEMergeElement>(globalObject, WTFMove(element));
365}
366
367static JSDOMObject* createSVGFEMergeNodeElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
368{
369 return createWrapper<SVGFEMergeNodeElement>(globalObject, WTFMove(element));
370}
371
372static JSDOMObject* createSVGFEMorphologyElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
373{
374 return createWrapper<SVGFEMorphologyElement>(globalObject, WTFMove(element));
375}
376
377static JSDOMObject* createSVGFEOffsetElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
378{
379 return createWrapper<SVGFEOffsetElement>(globalObject, WTFMove(element));
380}
381
382static JSDOMObject* createSVGFEPointLightElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
383{
384 return createWrapper<SVGFEPointLightElement>(globalObject, WTFMove(element));
385}
386
387static JSDOMObject* createSVGFESpecularLightingElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
388{
389 return createWrapper<SVGFESpecularLightingElement>(globalObject, WTFMove(element));
390}
391
392static JSDOMObject* createSVGFESpotLightElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
393{
394 return createWrapper<SVGFESpotLightElement>(globalObject, WTFMove(element));
395}
396
397static JSDOMObject* createSVGFETileElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
398{
399 return createWrapper<SVGFETileElement>(globalObject, WTFMove(element));
400}
401
402static JSDOMObject* createSVGFETurbulenceElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
403{
404 return createWrapper<SVGFETurbulenceElement>(globalObject, WTFMove(element));
405}
406
407static JSDOMObject* createSVGFilterElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
408{
409 return createWrapper<SVGFilterElement>(globalObject, WTFMove(element));
410}
411
412static JSDOMObject* createSVGFontElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
413{
414 return createWrapper<SVGFontElement>(globalObject, WTFMove(element));
415}
416
417static JSDOMObject* createSVGFontFaceElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
418{
419 return createWrapper<SVGFontFaceElement>(globalObject, WTFMove(element));
420}
421
422static JSDOMObject* createSVGFontFaceFormatElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
423{
424 return createWrapper<SVGFontFaceFormatElement>(globalObject, WTFMove(element));
425}
426
427static JSDOMObject* createSVGFontFaceNameElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
428{
429 return createWrapper<SVGFontFaceNameElement>(globalObject, WTFMove(element));
430}
431
432static JSDOMObject* createSVGFontFaceSrcElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
433{
434 return createWrapper<SVGFontFaceSrcElement>(globalObject, WTFMove(element));
435}
436
437static JSDOMObject* createSVGFontFaceUriElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
438{
439 return createWrapper<SVGFontFaceUriElement>(globalObject, WTFMove(element));
440}
441
442static JSDOMObject* createSVGForeignObjectElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
443{
444 return createWrapper<SVGForeignObjectElement>(globalObject, WTFMove(element));
445}
446
447static JSDOMObject* createSVGGElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
448{
449 return createWrapper<SVGGElement>(globalObject, WTFMove(element));
450}
451
452static JSDOMObject* createSVGGlyphElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
453{
454 return createWrapper<SVGGlyphElement>(globalObject, WTFMove(element));
455}
456
457static JSDOMObject* createSVGGlyphRefElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
458{
459 return createWrapper<SVGGlyphRefElement>(globalObject, WTFMove(element));
460}
461
462static JSDOMObject* createSVGHKernElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
463{
464 return createWrapper<SVGHKernElement>(globalObject, WTFMove(element));
465}
466
467static JSDOMObject* createSVGImageElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
468{
469 return createWrapper<SVGImageElement>(globalObject, WTFMove(element));
470}
471
472static JSDOMObject* createSVGLineElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
473{
474 return createWrapper<SVGLineElement>(globalObject, WTFMove(element));
475}
476
477static JSDOMObject* createSVGLinearGradientElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
478{
479 return createWrapper<SVGLinearGradientElement>(globalObject, WTFMove(element));
480}
481
482static JSDOMObject* createSVGMarkerElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
483{
484 return createWrapper<SVGMarkerElement>(globalObject, WTFMove(element));
485}
486
487static JSDOMObject* createSVGMaskElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
488{
489 return createWrapper<SVGMaskElement>(globalObject, WTFMove(element));
490}
491
492static JSDOMObject* createSVGMetadataElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
493{
494 return createWrapper<SVGMetadataElement>(globalObject, WTFMove(element));
495}
496
497static JSDOMObject* createSVGMissingGlyphElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
498{
499 return createWrapper<SVGMissingGlyphElement>(globalObject, WTFMove(element));
500}
501
502static JSDOMObject* createSVGMPathElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
503{
504 return createWrapper<SVGMPathElement>(globalObject, WTFMove(element));
505}
506
507static JSDOMObject* createSVGPathElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
508{
509 return createWrapper<SVGPathElement>(globalObject, WTFMove(element));
510}
511
512static JSDOMObject* createSVGPatternElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
513{
514 return createWrapper<SVGPatternElement>(globalObject, WTFMove(element));
515}
516
517static JSDOMObject* createSVGPolygonElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
518{
519 return createWrapper<SVGPolygonElement>(globalObject, WTFMove(element));
520}
521
522static JSDOMObject* createSVGPolylineElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
523{
524 return createWrapper<SVGPolylineElement>(globalObject, WTFMove(element));
525}
526
527static JSDOMObject* createSVGRadialGradientElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
528{
529 return createWrapper<SVGRadialGradientElement>(globalObject, WTFMove(element));
530}
531
532static JSDOMObject* createSVGRectElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
533{
534 return createWrapper<SVGRectElement>(globalObject, WTFMove(element));
535}
536
537static JSDOMObject* createSVGScriptElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
538{
539 return createWrapper<SVGScriptElement>(globalObject, WTFMove(element));
540}
541
542static JSDOMObject* createSVGSetElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
543{
544 return createWrapper<SVGSetElement>(globalObject, WTFMove(element));
545}
546
547static JSDOMObject* createSVGStopElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
548{
549 return createWrapper<SVGStopElement>(globalObject, WTFMove(element));
550}
551
552static JSDOMObject* createSVGStyleElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
553{
554 return createWrapper<SVGStyleElement>(globalObject, WTFMove(element));
555}
556
557static JSDOMObject* createSVGSVGElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
558{
559 return createWrapper<SVGSVGElement>(globalObject, WTFMove(element));
560}
561
562static JSDOMObject* createSVGSwitchElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
563{
564 return createWrapper<SVGSwitchElement>(globalObject, WTFMove(element));
565}
566
567static JSDOMObject* createSVGSymbolElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
568{
569 return createWrapper<SVGSymbolElement>(globalObject, WTFMove(element));
570}
571
572static JSDOMObject* createSVGTextElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
573{
574 return createWrapper<SVGTextElement>(globalObject, WTFMove(element));
575}
576
577static JSDOMObject* createSVGTextPathElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
578{
579 return createWrapper<SVGTextPathElement>(globalObject, WTFMove(element));
580}
581
582static JSDOMObject* createSVGTitleElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
583{
584 return createWrapper<SVGTitleElement>(globalObject, WTFMove(element));
585}
586
587static JSDOMObject* createSVGTRefElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
588{
589 return createWrapper<SVGTRefElement>(globalObject, WTFMove(element));
590}
591
592static JSDOMObject* createSVGTSpanElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
593{
594 return createWrapper<SVGTSpanElement>(globalObject, WTFMove(element));
595}
596
597static JSDOMObject* createSVGUseElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
598{
599 return createWrapper<SVGUseElement>(globalObject, WTFMove(element));
600}
601
602static JSDOMObject* createSVGViewElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
603{
604 return createWrapper<SVGViewElement>(globalObject, WTFMove(element));
605}
606
607static JSDOMObject* createSVGVKernElementWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
608{
609 return createWrapper<SVGVKernElement>(globalObject, WTFMove(element));
610}
611
612
613static NEVER_INLINE HashMap<AtomicStringImpl*, CreateSVGElementWrapperFunction> createSVGWrapperMap()
614{
615 struct TableEntry {
616 const QualifiedName& name;
617 CreateSVGElementWrapperFunction function;
618 };
619
620 static const TableEntry table[] = {
621 { aTag, createSVGAElementWrapper },
622 { altGlyphTag, createSVGAltGlyphElementWrapper },
623 { altGlyphDefTag, createSVGAltGlyphDefElementWrapper },
624 { altGlyphItemTag, createSVGAltGlyphItemElementWrapper },
625 { animateTag, createSVGAnimateElementWrapper },
626 { animateColorTag, createSVGAnimateColorElementWrapper },
627 { animateMotionTag, createSVGAnimateMotionElementWrapper },
628 { animateTransformTag, createSVGAnimateTransformElementWrapper },
629 { circleTag, createSVGCircleElementWrapper },
630 { clipPathTag, createSVGClipPathElementWrapper },
631 { cursorTag, createSVGCursorElementWrapper },
632 { defsTag, createSVGDefsElementWrapper },
633 { descTag, createSVGDescElementWrapper },
634 { ellipseTag, createSVGEllipseElementWrapper },
635 { feBlendTag, createSVGFEBlendElementWrapper },
636 { feColorMatrixTag, createSVGFEColorMatrixElementWrapper },
637 { feComponentTransferTag, createSVGFEComponentTransferElementWrapper },
638 { feCompositeTag, createSVGFECompositeElementWrapper },
639 { feConvolveMatrixTag, createSVGFEConvolveMatrixElementWrapper },
640 { feDiffuseLightingTag, createSVGFEDiffuseLightingElementWrapper },
641 { feDisplacementMapTag, createSVGFEDisplacementMapElementWrapper },
642 { feDistantLightTag, createSVGFEDistantLightElementWrapper },
643 { feDropShadowTag, createSVGFEDropShadowElementWrapper },
644 { feFloodTag, createSVGFEFloodElementWrapper },
645 { feFuncATag, createSVGFEFuncAElementWrapper },
646 { feFuncBTag, createSVGFEFuncBElementWrapper },
647 { feFuncGTag, createSVGFEFuncGElementWrapper },
648 { feFuncRTag, createSVGFEFuncRElementWrapper },
649 { feGaussianBlurTag, createSVGFEGaussianBlurElementWrapper },
650 { feImageTag, createSVGFEImageElementWrapper },
651 { feMergeTag, createSVGFEMergeElementWrapper },
652 { feMergeNodeTag, createSVGFEMergeNodeElementWrapper },
653 { feMorphologyTag, createSVGFEMorphologyElementWrapper },
654 { feOffsetTag, createSVGFEOffsetElementWrapper },
655 { fePointLightTag, createSVGFEPointLightElementWrapper },
656 { feSpecularLightingTag, createSVGFESpecularLightingElementWrapper },
657 { feSpotLightTag, createSVGFESpotLightElementWrapper },
658 { feTileTag, createSVGFETileElementWrapper },
659 { feTurbulenceTag, createSVGFETurbulenceElementWrapper },
660 { filterTag, createSVGFilterElementWrapper },
661 { fontTag, createSVGFontElementWrapper },
662 { font_faceTag, createSVGFontFaceElementWrapper },
663 { font_face_formatTag, createSVGFontFaceFormatElementWrapper },
664 { font_face_nameTag, createSVGFontFaceNameElementWrapper },
665 { font_face_srcTag, createSVGFontFaceSrcElementWrapper },
666 { font_face_uriTag, createSVGFontFaceUriElementWrapper },
667 { foreignObjectTag, createSVGForeignObjectElementWrapper },
668 { gTag, createSVGGElementWrapper },
669 { glyphTag, createSVGGlyphElementWrapper },
670 { glyphRefTag, createSVGGlyphRefElementWrapper },
671 { hkernTag, createSVGHKernElementWrapper },
672 { imageTag, createSVGImageElementWrapper },
673 { lineTag, createSVGLineElementWrapper },
674 { linearGradientTag, createSVGLinearGradientElementWrapper },
675 { markerTag, createSVGMarkerElementWrapper },
676 { maskTag, createSVGMaskElementWrapper },
677 { metadataTag, createSVGMetadataElementWrapper },
678 { missing_glyphTag, createSVGMissingGlyphElementWrapper },
679 { mpathTag, createSVGMPathElementWrapper },
680 { pathTag, createSVGPathElementWrapper },
681 { patternTag, createSVGPatternElementWrapper },
682 { polygonTag, createSVGPolygonElementWrapper },
683 { polylineTag, createSVGPolylineElementWrapper },
684 { radialGradientTag, createSVGRadialGradientElementWrapper },
685 { rectTag, createSVGRectElementWrapper },
686 { scriptTag, createSVGScriptElementWrapper },
687 { setTag, createSVGSetElementWrapper },
688 { stopTag, createSVGStopElementWrapper },
689 { styleTag, createSVGStyleElementWrapper },
690 { svgTag, createSVGSVGElementWrapper },
691 { switchTag, createSVGSwitchElementWrapper },
692 { symbolTag, createSVGSymbolElementWrapper },
693 { textTag, createSVGTextElementWrapper },
694 { textPathTag, createSVGTextPathElementWrapper },
695 { titleTag, createSVGTitleElementWrapper },
696 { trefTag, createSVGTRefElementWrapper },
697 { tspanTag, createSVGTSpanElementWrapper },
698 { useTag, createSVGUseElementWrapper },
699 { viewTag, createSVGViewElementWrapper },
700 { vkernTag, createSVGVKernElementWrapper },
701 };
702
703 HashMap<AtomicStringImpl*, CreateSVGElementWrapperFunction> map;
704 for (auto& entry : table)
705 map.add(entry.name.localName().impl(), entry.function);
706 return map;
707}
708
709JSDOMObject* createJSSVGWrapper(JSDOMGlobalObject* globalObject, Ref<SVGElement>&& element)
710{
711 static const auto functions = makeNeverDestroyed(createSVGWrapperMap());
712 if (auto function = functions.get().get(element->localName().impl()))
713 return function(globalObject, WTFMove(element));
714 return createWrapper<SVGElement>(globalObject, WTFMove(element));
715}
716
717}
718