tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / HTMLElementFactory.cpp
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 "HTMLElementFactory.h"
32 #include "HTMLNames.h"
33 #include "HTMLAnchorElement.h"
34 #include "HTMLElement.h"
35 #include "HTMLAppletElement.h"
36 #include "HTMLAreaElement.h"
37 #include "HTMLBaseElement.h"
38 #include "HTMLBaseFontElement.h"
39 #include "HTMLQuoteElement.h"
40 #include "HTMLBodyElement.h"
41 #include "HTMLBRElement.h"
42 #include "HTMLButtonElement.h"
43 #include "HTMLCanvasElement.h"
44 #include "HTMLTableCaptionElement.h"
45 #include "HTMLTableColElement.h"
46 #include "HTMLModElement.h"
47 #include "HTMLDirectoryElement.h"
48 #include "HTMLDivElement.h"
49 #include "HTMLDListElement.h"
50 #include "HTMLEmbedElement.h"
51 #include "HTMLFieldSetElement.h"
52 #include "HTMLFontElement.h"
53 #include "HTMLFormElement.h"
54 #include "HTMLFrameElement.h"
55 #include "HTMLFrameSetElement.h"
56 #include "HTMLHeadingElement.h"
57 #include "HTMLHeadElement.h"
58 #include "HTMLHRElement.h"
59 #include "HTMLHtmlElement.h"
60 #include "HTMLIFrameElement.h"
61 #include "HTMLImageElement.h"
62 #include "HTMLInputElement.h"
63 #include "HTMLIsIndexElement.h"
64 #include "HTMLKeygenElement.h"
65 #include "HTMLLabelElement.h"
66 #include "HTMLLegendElement.h"
67 #include "HTMLLIElement.h"
68 #include "HTMLLinkElement.h"
69 #include "HTMLPreElement.h"
70 #include "HTMLMapElement.h"
71 #include "HTMLMarqueeElement.h"
72 #include "HTMLMenuElement.h"
73 #include "HTMLMetaElement.h"
74 #include "HTMLObjectElement.h"
75 #include "HTMLOListElement.h"
76 #include "HTMLOptGroupElement.h"
77 #include "HTMLOptionElement.h"
78 #include "HTMLOutputElement.h"
79 #include "HTMLParagraphElement.h"
80 #include "HTMLParamElement.h"
81 #include "HTMLScriptElement.h"
82 #include "HTMLSelectElement.h"
83 #include "HTMLSpanElement.h"
84 #include "HTMLStyleElement.h"
85 #include "HTMLTableElement.h"
86 #include "HTMLTableSectionElement.h"
87 #include "HTMLTableCellElement.h"
88 #include "HTMLTextAreaElement.h"
89 #include "HTMLTitleElement.h"
90 #include "HTMLTableRowElement.h"
91 #include "HTMLUListElement.h"
92 #include "HTMLUnknownElement.h"
93
94 #include <wtf/HashMap.h>
95
96 #if ENABLE(DATALIST)
97 #include "HTMLDataListElement.h"
98 #endif
99
100 #if ENABLE(DETAILS)
101 #include "HTMLDetailsElement.h"
102 #include "HTMLSummaryElement.h"
103 #endif
104
105 #if ENABLE(METER_TAG)
106 #include "HTMLMeterElement.h"
107 #endif
108
109 #if ENABLE(PROGRESS_TAG)
110 #include "HTMLProgressElement.h"
111 #endif
112
113 #if ENABLE(VIDEO)
114 #include "HTMLAudioElement.h"
115 #include "HTMLSourceElement.h"
116 #include "HTMLVideoElement.h"
117 #endif
118
119 #if ENABLE(VIDEO_TRACK)
120 #include "HTMLTrackElement.h"
121 #endif
122
123 #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(VIDEO)
124 #include "Document.h"
125 #include "Settings.h"
126 #endif
127
128 namespace WebCore {
129
130 using namespace HTMLNames;
131
132 typedef PassRefPtr<HTMLElement> (*ConstructorFunction)(const QualifiedName&, Document*, HTMLFormElement*, bool createdByParser);
133 typedef HashMap<AtomicStringImpl*, ConstructorFunction> FunctionMap;
134
135 static FunctionMap* gFunctionMap = 0;
136
137 static PassRefPtr<HTMLElement> anchorConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
138 {
139     return HTMLAnchorElement::create(tagName, document);
140 }
141
142 static PassRefPtr<HTMLElement> Constructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
143 {
144     return HTMLElement::create(tagName, document);
145 }
146
147 static PassRefPtr<HTMLElement> appletConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
148 {
149     return HTMLAppletElement::create(tagName, document);
150 }
151
152 static PassRefPtr<HTMLElement> areaConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
153 {
154     return HTMLAreaElement::create(tagName, document);
155 }
156
157 #if ENABLE(VIDEO)
158
159 static PassRefPtr<HTMLElement> audioConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
160 {
161     Settings* settings = document->settings();
162     if (!MediaPlayer::isAvailable() || (settings && !settings->isMediaEnabled()))
163         return HTMLElement::create(tagName, document);
164     
165     return HTMLAudioElement::create(tagName, document);
166 }
167
168 #endif
169 static PassRefPtr<HTMLElement> baseConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
170 {
171     return HTMLBaseElement::create(tagName, document);
172 }
173
174 static PassRefPtr<HTMLElement> basefontConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
175 {
176     return HTMLBaseFontElement::create(tagName, document);
177 }
178
179 static PassRefPtr<HTMLElement> quoteConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
180 {
181     return HTMLQuoteElement::create(tagName, document);
182 }
183
184 static PassRefPtr<HTMLElement> bodyConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
185 {
186     return HTMLBodyElement::create(tagName, document);
187 }
188
189 static PassRefPtr<HTMLElement> brConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
190 {
191     return HTMLBRElement::create(tagName, document);
192 }
193
194 static PassRefPtr<HTMLElement> buttonConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
195 {
196     return HTMLButtonElement::create(tagName, document, formElement);
197 }
198
199 static PassRefPtr<HTMLElement> canvasConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
200 {
201     return HTMLCanvasElement::create(tagName, document);
202 }
203
204 static PassRefPtr<HTMLElement> tablecaptionConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
205 {
206     return HTMLTableCaptionElement::create(tagName, document);
207 }
208
209 static PassRefPtr<HTMLElement> tablecolConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
210 {
211     return HTMLTableColElement::create(tagName, document);
212 }
213
214 #if ENABLE(DATALIST)
215
216 static PassRefPtr<HTMLElement> datalistConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
217 {
218     return HTMLDataListElement::create(tagName, document);
219 }
220
221 #endif
222 static PassRefPtr<HTMLElement> modConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
223 {
224     return HTMLModElement::create(tagName, document);
225 }
226
227 #if ENABLE(DETAILS)
228
229 static PassRefPtr<HTMLElement> detailsConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
230 {
231     return HTMLDetailsElement::create(tagName, document);
232 }
233
234 #endif
235 static PassRefPtr<HTMLElement> directoryConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
236 {
237     return HTMLDirectoryElement::create(tagName, document);
238 }
239
240 static PassRefPtr<HTMLElement> divConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
241 {
242     return HTMLDivElement::create(tagName, document);
243 }
244
245 static PassRefPtr<HTMLElement> dlistConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
246 {
247     return HTMLDListElement::create(tagName, document);
248 }
249
250 static PassRefPtr<HTMLElement> embedConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool createdByParser)
251 {
252     return HTMLEmbedElement::create(tagName, document, createdByParser);
253 }
254
255 static PassRefPtr<HTMLElement> fieldsetConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
256 {
257     return HTMLFieldSetElement::create(tagName, document, formElement);
258 }
259
260 static PassRefPtr<HTMLElement> fontConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
261 {
262     return HTMLFontElement::create(tagName, document);
263 }
264
265 static PassRefPtr<HTMLElement> formConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
266 {
267     return HTMLFormElement::create(tagName, document);
268 }
269
270 static PassRefPtr<HTMLElement> frameConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
271 {
272     return HTMLFrameElement::create(tagName, document);
273 }
274
275 static PassRefPtr<HTMLElement> framesetConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
276 {
277     return HTMLFrameSetElement::create(tagName, document);
278 }
279
280 static PassRefPtr<HTMLElement> headingConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
281 {
282     return HTMLHeadingElement::create(tagName, document);
283 }
284
285 static PassRefPtr<HTMLElement> headConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
286 {
287     return HTMLHeadElement::create(tagName, document);
288 }
289
290 static PassRefPtr<HTMLElement> hrConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
291 {
292     return HTMLHRElement::create(tagName, document);
293 }
294
295 static PassRefPtr<HTMLElement> htmlConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
296 {
297     return HTMLHtmlElement::create(tagName, document);
298 }
299
300 static PassRefPtr<HTMLElement> iframeConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
301 {
302     return HTMLIFrameElement::create(tagName, document);
303 }
304
305 static PassRefPtr<HTMLElement> imageConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
306 {
307     return HTMLImageElement::create(tagName, document, formElement);
308 }
309
310 static PassRefPtr<HTMLElement> inputConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool createdByParser)
311 {
312     return HTMLInputElement::create(tagName, document, formElement, createdByParser);
313 }
314
315 static PassRefPtr<HTMLElement> isindexConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
316 {
317     return HTMLIsIndexElement::create(tagName, document, formElement);
318 }
319
320 static PassRefPtr<HTMLElement> keygenConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
321 {
322     return HTMLKeygenElement::create(tagName, document, formElement);
323 }
324
325 static PassRefPtr<HTMLElement> labelConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
326 {
327     return HTMLLabelElement::create(tagName, document);
328 }
329
330 static PassRefPtr<HTMLElement> legendConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
331 {
332     return HTMLLegendElement::create(tagName, document, formElement);
333 }
334
335 static PassRefPtr<HTMLElement> liConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
336 {
337     return HTMLLIElement::create(tagName, document);
338 }
339
340 static PassRefPtr<HTMLElement> linkConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool createdByParser)
341 {
342     return HTMLLinkElement::create(tagName, document, createdByParser);
343 }
344
345 static PassRefPtr<HTMLElement> preConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
346 {
347     return HTMLPreElement::create(tagName, document);
348 }
349
350 static PassRefPtr<HTMLElement> mapConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
351 {
352     return HTMLMapElement::create(tagName, document);
353 }
354
355 static PassRefPtr<HTMLElement> marqueeConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
356 {
357     return HTMLMarqueeElement::create(tagName, document);
358 }
359
360 static PassRefPtr<HTMLElement> menuConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
361 {
362     return HTMLMenuElement::create(tagName, document);
363 }
364
365 static PassRefPtr<HTMLElement> metaConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
366 {
367     return HTMLMetaElement::create(tagName, document);
368 }
369
370 #if ENABLE(METER_TAG)
371
372 static PassRefPtr<HTMLElement> meterConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
373 {
374     return HTMLMeterElement::create(tagName, document, formElement);
375 }
376
377 #endif
378 static PassRefPtr<HTMLElement> objectConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool createdByParser)
379 {
380     return HTMLObjectElement::create(tagName, document, formElement, createdByParser);
381 }
382
383 static PassRefPtr<HTMLElement> olistConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
384 {
385     return HTMLOListElement::create(tagName, document);
386 }
387
388 static PassRefPtr<HTMLElement> optgroupConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
389 {
390     return HTMLOptGroupElement::create(tagName, document, formElement);
391 }
392
393 static PassRefPtr<HTMLElement> optionConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
394 {
395     return HTMLOptionElement::create(tagName, document, formElement);
396 }
397
398 static PassRefPtr<HTMLElement> outputConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
399 {
400     return HTMLOutputElement::create(tagName, document, formElement);
401 }
402
403 static PassRefPtr<HTMLElement> paragraphConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
404 {
405     return HTMLParagraphElement::create(tagName, document);
406 }
407
408 static PassRefPtr<HTMLElement> paramConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
409 {
410     return HTMLParamElement::create(tagName, document);
411 }
412
413 #if ENABLE(PROGRESS_TAG)
414
415 static PassRefPtr<HTMLElement> progressConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
416 {
417     return HTMLProgressElement::create(tagName, document, formElement);
418 }
419
420 #endif
421 static PassRefPtr<HTMLElement> scriptConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool createdByParser)
422 {
423     return HTMLScriptElement::create(tagName, document, createdByParser);
424 }
425
426 static PassRefPtr<HTMLElement> selectConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
427 {
428     return HTMLSelectElement::create(tagName, document, formElement);
429 }
430
431 #if ENABLE(VIDEO)
432
433 static PassRefPtr<HTMLElement> sourceConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
434 {
435     Settings* settings = document->settings();
436     if (!MediaPlayer::isAvailable() || (settings && !settings->isMediaEnabled()))
437         return HTMLElement::create(tagName, document);
438     
439     return HTMLSourceElement::create(tagName, document);
440 }
441
442 #endif
443 static PassRefPtr<HTMLElement> spanConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
444 {
445     return HTMLSpanElement::create(tagName, document);
446 }
447
448 static PassRefPtr<HTMLElement> styleConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool createdByParser)
449 {
450     return HTMLStyleElement::create(tagName, document, createdByParser);
451 }
452
453 #if ENABLE(DETAILS)
454
455 static PassRefPtr<HTMLElement> summaryConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
456 {
457     return HTMLSummaryElement::create(tagName, document);
458 }
459
460 #endif
461 static PassRefPtr<HTMLElement> tableConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
462 {
463     return HTMLTableElement::create(tagName, document);
464 }
465
466 static PassRefPtr<HTMLElement> tablesectionConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
467 {
468     return HTMLTableSectionElement::create(tagName, document);
469 }
470
471 static PassRefPtr<HTMLElement> tablecellConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
472 {
473     return HTMLTableCellElement::create(tagName, document);
474 }
475
476 static PassRefPtr<HTMLElement> textareaConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
477 {
478     return HTMLTextAreaElement::create(tagName, document, formElement);
479 }
480
481 static PassRefPtr<HTMLElement> titleConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
482 {
483     return HTMLTitleElement::create(tagName, document);
484 }
485
486 static PassRefPtr<HTMLElement> tablerowConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
487 {
488     return HTMLTableRowElement::create(tagName, document);
489 }
490
491 #if ENABLE(VIDEO_TRACK)
492
493 static PassRefPtr<HTMLElement> trackConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
494 {
495     Settings* settings = document->settings();
496     if (!MediaPlayer::isAvailable() || (settings && !settings->isMediaEnabled()))
497         return HTMLElement::create(tagName, document);
498     
499     return HTMLTrackElement::create(tagName, document);
500 }
501
502 #endif
503 static PassRefPtr<HTMLElement> ulistConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
504 {
505     return HTMLUListElement::create(tagName, document);
506 }
507
508 #if ENABLE(VIDEO)
509
510 static PassRefPtr<HTMLElement> videoConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement*, bool)
511 {
512     Settings* settings = document->settings();
513     if (!MediaPlayer::isAvailable() || (settings && !settings->isMediaEnabled()))
514         return HTMLElement::create(tagName, document);
515     
516     return HTMLVideoElement::create(tagName, document);
517 }
518
519 #endif
520 static PassRefPtr<HTMLElement> imgToimageConstructor(const QualifiedName& tagName, Document* document, HTMLFormElement* formElement, bool)
521 {
522     return HTMLImageElement::create(QualifiedName(tagName.prefix(), imgTag.localName(), tagName.namespaceURI()), document, formElement);
523 }
524
525 static void addTag(const QualifiedName& tag, ConstructorFunction func)
526 {
527     gFunctionMap->set(tag.localName().impl(), func);
528 }
529
530 static void createFunctionMap()
531 {
532     ASSERT(!gFunctionMap);
533
534     // Create the table.
535     gFunctionMap = new FunctionMap;
536     
537     // Populate it with constructor functions.
538     addTag(aTag, anchorConstructor);
539     addTag(abbrTag, Constructor);
540     addTag(acronymTag, Constructor);
541     addTag(addressTag, Constructor);
542     addTag(appletTag, appletConstructor);
543     addTag(areaTag, areaConstructor);
544     addTag(articleTag, Constructor);
545     addTag(asideTag, Constructor);
546 #if ENABLE(VIDEO)
547     addTag(audioTag, audioConstructor);
548 #endif
549
550     addTag(bTag, Constructor);
551     addTag(baseTag, baseConstructor);
552     addTag(basefontTag, basefontConstructor);
553     addTag(bdiTag, Constructor);
554     addTag(bdoTag, Constructor);
555     addTag(bgsoundTag, Constructor);
556     addTag(bigTag, Constructor);
557     addTag(blockquoteTag, quoteConstructor);
558     addTag(bodyTag, bodyConstructor);
559     addTag(brTag, brConstructor);
560     addTag(buttonTag, buttonConstructor);
561     addTag(canvasTag, canvasConstructor);
562     addTag(captionTag, tablecaptionConstructor);
563     addTag(centerTag, Constructor);
564     addTag(citeTag, Constructor);
565     addTag(codeTag, Constructor);
566     addTag(colTag, tablecolConstructor);
567     addTag(colgroupTag, tablecolConstructor);
568     addTag(commandTag, Constructor);
569 #if ENABLE(DATALIST)
570     addTag(datalistTag, datalistConstructor);
571 #endif
572
573     addTag(ddTag, Constructor);
574     addTag(delTag, modConstructor);
575 #if ENABLE(DETAILS)
576     addTag(detailsTag, detailsConstructor);
577 #endif
578
579     addTag(dfnTag, Constructor);
580     addTag(dirTag, directoryConstructor);
581     addTag(divTag, divConstructor);
582     addTag(dlTag, dlistConstructor);
583     addTag(dtTag, Constructor);
584     addTag(emTag, Constructor);
585     addTag(embedTag, embedConstructor);
586     addTag(fieldsetTag, fieldsetConstructor);
587     addTag(figcaptionTag, Constructor);
588     addTag(figureTag, Constructor);
589     addTag(fontTag, fontConstructor);
590     addTag(footerTag, Constructor);
591     addTag(formTag, formConstructor);
592     addTag(frameTag, frameConstructor);
593     addTag(framesetTag, framesetConstructor);
594     addTag(h1Tag, headingConstructor);
595     addTag(h2Tag, headingConstructor);
596     addTag(h3Tag, headingConstructor);
597     addTag(h4Tag, headingConstructor);
598     addTag(h5Tag, headingConstructor);
599     addTag(h6Tag, headingConstructor);
600     addTag(headTag, headConstructor);
601     addTag(headerTag, Constructor);
602     addTag(hgroupTag, Constructor);
603     addTag(hrTag, hrConstructor);
604     addTag(htmlTag, htmlConstructor);
605     addTag(iTag, Constructor);
606     addTag(iframeTag, iframeConstructor);
607     addTag(imageTag, imgToimageConstructor);
608     addTag(imgTag, imageConstructor);
609     addTag(inputTag, inputConstructor);
610     addTag(insTag, modConstructor);
611     addTag(isindexTag, isindexConstructor);
612     addTag(kbdTag, Constructor);
613     addTag(keygenTag, keygenConstructor);
614     addTag(labelTag, labelConstructor);
615     addTag(layerTag, Constructor);
616     addTag(legendTag, legendConstructor);
617     addTag(liTag, liConstructor);
618     addTag(linkTag, linkConstructor);
619     addTag(listingTag, preConstructor);
620     addTag(mapTag, mapConstructor);
621     addTag(markTag, Constructor);
622     addTag(marqueeTag, marqueeConstructor);
623     addTag(menuTag, menuConstructor);
624     addTag(metaTag, metaConstructor);
625 #if ENABLE(METER_TAG)
626     addTag(meterTag, meterConstructor);
627 #endif
628
629     addTag(navTag, Constructor);
630     addTag(nobrTag, Constructor);
631     addTag(noembedTag, Constructor);
632     addTag(noframesTag, Constructor);
633     addTag(nolayerTag, Constructor);
634     addTag(noscriptTag, Constructor);
635     addTag(objectTag, objectConstructor);
636     addTag(olTag, olistConstructor);
637     addTag(optgroupTag, optgroupConstructor);
638     addTag(optionTag, optionConstructor);
639     addTag(outputTag, outputConstructor);
640     addTag(pTag, paragraphConstructor);
641     addTag(paramTag, paramConstructor);
642     addTag(plaintextTag, Constructor);
643     addTag(preTag, preConstructor);
644 #if ENABLE(PROGRESS_TAG)
645     addTag(progressTag, progressConstructor);
646 #endif
647
648     addTag(qTag, quoteConstructor);
649     addTag(rpTag, Constructor);
650     addTag(rtTag, Constructor);
651     addTag(rubyTag, Constructor);
652     addTag(sTag, Constructor);
653     addTag(sampTag, Constructor);
654     addTag(scriptTag, scriptConstructor);
655     addTag(sectionTag, Constructor);
656     addTag(selectTag, selectConstructor);
657     addTag(smallTag, Constructor);
658 #if ENABLE(VIDEO)
659     addTag(sourceTag, sourceConstructor);
660 #endif
661
662     addTag(spanTag, spanConstructor);
663     addTag(strikeTag, Constructor);
664     addTag(strongTag, Constructor);
665     addTag(styleTag, styleConstructor);
666     addTag(subTag, Constructor);
667 #if ENABLE(DETAILS)
668     addTag(summaryTag, summaryConstructor);
669 #endif
670
671     addTag(supTag, Constructor);
672     addTag(tableTag, tableConstructor);
673     addTag(tbodyTag, tablesectionConstructor);
674     addTag(tdTag, tablecellConstructor);
675     addTag(textareaTag, textareaConstructor);
676     addTag(tfootTag, tablesectionConstructor);
677     addTag(thTag, tablecellConstructor);
678     addTag(theadTag, tablesectionConstructor);
679     addTag(titleTag, titleConstructor);
680     addTag(trTag, tablerowConstructor);
681 #if ENABLE(VIDEO_TRACK)
682     addTag(trackTag, trackConstructor);
683 #endif
684
685     addTag(ttTag, Constructor);
686     addTag(uTag, Constructor);
687     addTag(ulTag, ulistConstructor);
688     addTag(varTag, Constructor);
689 #if ENABLE(VIDEO)
690     addTag(videoTag, videoConstructor);
691 #endif
692
693     addTag(wbrTag, Constructor);
694     addTag(xmpTag, preConstructor);
695 }
696
697 PassRefPtr<HTMLElement> HTMLElementFactory::createHTMLElement(const QualifiedName& qName, Document* document, HTMLFormElement* formElement, bool createdByParser)
698 {
699     if (!document)
700         return 0;
701
702 #if ENABLE(TIZEN_ELEMENT_CREATED_BY_PARSER_INFO_STORE)
703     RefPtr<HTMLElement> htmlElement;
704 #endif
705     if (!gFunctionMap)
706         createFunctionMap();
707     if (ConstructorFunction function = gFunctionMap->get(qName.localName().impl()))
708 #if ENABLE(TIZEN_ELEMENT_CREATED_BY_PARSER_INFO_STORE)
709         htmlElement = function(qName, document, formElement, createdByParser);
710     else
711         htmlElement = HTMLUnknownElement::create(qName, document);
712     if (htmlElement)
713         htmlElement->setCreatedByParser(createdByParser);
714     return htmlElement.release();
715 #else
716         return function(qName, document, formElement, createdByParser);
717     return HTMLUnknownElement::create(qName, document);
718 #endif
719 }
720
721 } // namespace WebCore
722