summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLElementFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/HTMLElementFactory.cpp')
-rw-r--r--WebCore/html/HTMLElementFactory.cpp270
1 files changed, 130 insertions, 140 deletions
diff --git a/WebCore/html/HTMLElementFactory.cpp b/WebCore/html/HTMLElementFactory.cpp
index 1b9b0cc..16c2b99 100644
--- a/WebCore/html/HTMLElementFactory.cpp
+++ b/WebCore/html/HTMLElementFactory.cpp
@@ -89,326 +89,316 @@ namespace WebCore {
using namespace HTMLNames;
-typedef PassRefPtr<HTMLElement> (*ConstructorFunc)(const AtomicString& tagName, Document*, HTMLFormElement*, bool createdByParser);
+typedef PassRefPtr<HTMLElement> (*ConstructorFunc)(const QualifiedName& tagName, Document*, HTMLFormElement*, bool createdByParser);
typedef HashMap<AtomicStringImpl*, ConstructorFunc> FunctionMap;
static FunctionMap* gFunctionMap;
-static PassRefPtr<HTMLElement> htmlConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> htmlConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLHtmlElement(doc);
+ return new HTMLHtmlElement(htmlTag, doc);
}
-static PassRefPtr<HTMLElement> headConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> headConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLHeadElement(doc);
+ return new HTMLHeadElement(headTag, doc);
}
-static PassRefPtr<HTMLElement> bodyConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> bodyConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLBodyElement(doc);
+ return new HTMLBodyElement(bodyTag, doc);
}
-static PassRefPtr<HTMLElement> baseConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> baseConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLBaseElement(doc);
+ return new HTMLBaseElement(baseTag, doc);
}
-static PassRefPtr<HTMLElement> linkConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool createdByParser)
+static PassRefPtr<HTMLElement> linkConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool createdByParser)
{
- RefPtr<HTMLLinkElement> link = new HTMLLinkElement(doc);
- link->setCreatedByParser(createdByParser);
- return link.release();
+ return new HTMLLinkElement(linkTag, doc, createdByParser);
}
-static PassRefPtr<HTMLElement> metaConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> metaConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLMetaElement(doc);
+ return new HTMLMetaElement(metaTag, doc);
}
-static PassRefPtr<HTMLElement> styleConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool createdByParser)
+static PassRefPtr<HTMLElement> styleConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool createdByParser)
{
- RefPtr<HTMLStyleElement> style = new HTMLStyleElement(doc);
- style->setCreatedByParser(createdByParser);
- return style.release();
+ return new HTMLStyleElement(styleTag, doc, createdByParser);
}
-static PassRefPtr<HTMLElement> titleConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> titleConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLTitleElement(doc);
+ return new HTMLTitleElement(titleTag, doc);
}
-static PassRefPtr<HTMLElement> frameConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool createdByParser)
+static PassRefPtr<HTMLElement> frameConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool createdByParser)
{
- RefPtr<HTMLFrameElement> frame = new HTMLFrameElement(doc);
- frame->setCreatedByParser(createdByParser);
- return frame.release();
+ return new HTMLFrameElement(frameTag, doc, createdByParser);
}
-static PassRefPtr<HTMLElement> framesetConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> framesetConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLFrameSetElement(doc);
+ return new HTMLFrameSetElement(framesetTag, doc);
}
-static PassRefPtr<HTMLElement> iframeConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool createdByParser)
+static PassRefPtr<HTMLElement> iframeConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool createdByParser)
{
- RefPtr<HTMLIFrameElement> iFrame = new HTMLIFrameElement(doc);
- iFrame->setCreatedByParser(createdByParser);
- return iFrame.release();
+ return new HTMLIFrameElement(iframeTag, doc, createdByParser);
}
-static PassRefPtr<HTMLElement> formConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> formConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLFormElement(doc);
+ return new HTMLFormElement(formTag, doc);
}
-static PassRefPtr<HTMLElement> buttonConstructor(const AtomicString&, Document* doc, HTMLFormElement* form, bool)
+static PassRefPtr<HTMLElement> buttonConstructor(const QualifiedName&, Document* doc, HTMLFormElement* form, bool)
{
- return new HTMLButtonElement(doc, form);
+ return new HTMLButtonElement(buttonTag, doc, form);
}
-static PassRefPtr<HTMLElement> inputConstructor(const AtomicString&, Document* doc, HTMLFormElement* form, bool)
+static PassRefPtr<HTMLElement> inputConstructor(const QualifiedName&, Document* doc, HTMLFormElement* form, bool)
{
- return new HTMLInputElement(doc, form);
+ return new HTMLInputElement(inputTag, doc, form);
}
-static PassRefPtr<HTMLElement> isindexConstructor(const AtomicString&, Document* doc, HTMLFormElement* form, bool)
+static PassRefPtr<HTMLElement> isindexConstructor(const QualifiedName&, Document* doc, HTMLFormElement* form, bool)
{
- return new HTMLIsIndexElement(doc, form);
+ return new HTMLIsIndexElement(isindexTag, doc, form);
}
-static PassRefPtr<HTMLElement> fieldsetConstructor(const AtomicString&, Document* doc, HTMLFormElement* form, bool)
+static PassRefPtr<HTMLElement> fieldsetConstructor(const QualifiedName&, Document* doc, HTMLFormElement* form, bool)
{
- return new HTMLFieldSetElement(doc, form);
+ return new HTMLFieldSetElement(fieldsetTag, doc, form);
}
-static PassRefPtr<HTMLElement> keygenConstructor(const AtomicString&, Document* doc, HTMLFormElement* form, bool)
+static PassRefPtr<HTMLElement> keygenConstructor(const QualifiedName&, Document* doc, HTMLFormElement* form, bool)
{
- return new HTMLKeygenElement(doc, form);
+ return new HTMLKeygenElement(keygenTag, doc, form);
}
-static PassRefPtr<HTMLElement> labelConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> labelConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLLabelElement(doc);
+ return new HTMLLabelElement(labelTag, doc);
}
-static PassRefPtr<HTMLElement> legendConstructor(const AtomicString&, Document* doc, HTMLFormElement* form, bool)
+static PassRefPtr<HTMLElement> legendConstructor(const QualifiedName&, Document* doc, HTMLFormElement* form, bool)
{
- return new HTMLLegendElement(doc, form);
+ return new HTMLLegendElement(legendTag, doc, form);
}
-static PassRefPtr<HTMLElement> optgroupConstructor(const AtomicString&, Document* doc, HTMLFormElement* form, bool)
+static PassRefPtr<HTMLElement> optgroupConstructor(const QualifiedName&, Document* doc, HTMLFormElement* form, bool)
{
- return new HTMLOptGroupElement(doc, form);
+ return new HTMLOptGroupElement(optgroupTag, doc, form);
}
-static PassRefPtr<HTMLElement> optionConstructor(const AtomicString&, Document* doc, HTMLFormElement* form, bool)
+static PassRefPtr<HTMLElement> optionConstructor(const QualifiedName&, Document* doc, HTMLFormElement* form, bool)
{
- return new HTMLOptionElement(doc, form);
+ return new HTMLOptionElement(optionTag, doc, form);
}
-static PassRefPtr<HTMLElement> selectConstructor(const AtomicString&, Document* doc, HTMLFormElement* form, bool)
+static PassRefPtr<HTMLElement> selectConstructor(const QualifiedName&, Document* doc, HTMLFormElement* form, bool)
{
- return new HTMLSelectElement(doc, form);
+ return new HTMLSelectElement(selectTag, doc, form);
}
-static PassRefPtr<HTMLElement> textareaConstructor(const AtomicString&, Document* doc, HTMLFormElement* form, bool)
+static PassRefPtr<HTMLElement> textareaConstructor(const QualifiedName&, Document* doc, HTMLFormElement* form, bool)
{
- return new HTMLTextAreaElement(doc, form);
+ return new HTMLTextAreaElement(textareaTag, doc, form);
}
-static PassRefPtr<HTMLElement> dlConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> dlConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLDListElement(doc);
+ return new HTMLDListElement(dlTag, doc);
}
-static PassRefPtr<HTMLElement> ulConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> ulConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLUListElement(doc);
+ return new HTMLUListElement(ulTag, doc);
}
-static PassRefPtr<HTMLElement> olConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> olConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLOListElement(doc);
+ return new HTMLOListElement(olTag, doc);
}
-static PassRefPtr<HTMLElement> dirConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> dirConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLDirectoryElement(doc);
+ return new HTMLDirectoryElement(dirTag, doc);
}
-static PassRefPtr<HTMLElement> menuConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> menuConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLMenuElement(doc);
+ return new HTMLMenuElement(menuTag, doc);
}
-static PassRefPtr<HTMLElement> liConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> liConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLLIElement(doc);
+ return new HTMLLIElement(liTag, doc);
}
-static PassRefPtr<HTMLElement> blockquoteConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> blockquoteConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLBlockquoteElement(doc);
+ return new HTMLBlockquoteElement(blockquoteTag, doc);
}
-static PassRefPtr<HTMLElement> divConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> divConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLDivElement(doc);
+ return new HTMLDivElement(divTag, doc);
}
-static PassRefPtr<HTMLElement> headingConstructor(const AtomicString& tagName, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> headingConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLHeadingElement(QualifiedName(nullAtom, tagName, xhtmlNamespaceURI), doc);
+ return new HTMLHeadingElement(tagName, doc);
}
-static PassRefPtr<HTMLElement> hrConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> hrConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLHRElement(doc);
+ return new HTMLHRElement(hrTag, doc);
}
-static PassRefPtr<HTMLElement> paragraphConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> paragraphConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLParagraphElement(doc);
+ return new HTMLParagraphElement(pTag, doc);
}
-static PassRefPtr<HTMLElement> preConstructor(const AtomicString& tagName, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> preConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLPreElement(QualifiedName(nullAtom, tagName, xhtmlNamespaceURI), doc);
+ return new HTMLPreElement(tagName, doc);
}
-static PassRefPtr<HTMLElement> basefontConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> basefontConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLBaseFontElement(doc);
+ return new HTMLBaseFontElement(basefontTag, doc);
}
-static PassRefPtr<HTMLElement> fontConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> fontConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLFontElement(doc);
+ return new HTMLFontElement(fontTag, doc);
}
-static PassRefPtr<HTMLElement> modConstructor(const AtomicString& tagName, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> modConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLModElement(QualifiedName(nullAtom, tagName, xhtmlNamespaceURI), doc);
+ return new HTMLModElement(tagName, doc);
}
-static PassRefPtr<HTMLElement> anchorConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> anchorConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLAnchorElement(doc);
+ return new HTMLAnchorElement(aTag, doc);
}
-static PassRefPtr<HTMLElement> imageConstructor(const AtomicString&, Document* doc, HTMLFormElement* form, bool)
+static PassRefPtr<HTMLElement> imageConstructor(const QualifiedName&, Document* doc, HTMLFormElement* form, bool)
{
- return new HTMLImageElement(doc, form);
+ return new HTMLImageElement(imgTag, doc, form);
}
-static PassRefPtr<HTMLElement> mapConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> mapConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLMapElement(doc);
+ return new HTMLMapElement(mapTag, doc);
}
-static PassRefPtr<HTMLElement> areaConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> areaConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLAreaElement(doc);
+ return new HTMLAreaElement(areaTag, doc);
}
-static PassRefPtr<HTMLElement> canvasConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> canvasConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLCanvasElement(doc);
+ return new HTMLCanvasElement(canvasTag, doc);
}
-static PassRefPtr<HTMLElement> appletConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> appletConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLAppletElement(doc);
+ return new HTMLAppletElement(appletTag, doc);
}
-static PassRefPtr<HTMLElement> embedConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> embedConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLEmbedElement(doc);
+ return new HTMLEmbedElement(embedTag, doc);
}
-static PassRefPtr<HTMLElement> objectConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool createdByParser)
+static PassRefPtr<HTMLElement> objectConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool createdByParser)
{
- RefPtr<HTMLObjectElement> object = new HTMLObjectElement(doc, createdByParser);
- return object.release();
+ return new HTMLObjectElement(objectTag, doc, createdByParser);
}
-static PassRefPtr<HTMLElement> paramConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> paramConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLParamElement(doc);
+ return new HTMLParamElement(paramTag, doc);
}
-static PassRefPtr<HTMLElement> scriptConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool createdByParser)
+static PassRefPtr<HTMLElement> scriptConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool createdByParser)
{
- RefPtr<HTMLScriptElement> script = new HTMLScriptElement(doc);
- script->setCreatedByParser(createdByParser);
- return script.release();
+ return new HTMLScriptElement(scriptTag, doc, createdByParser);
}
-static PassRefPtr<HTMLElement> tableConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> tableConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLTableElement(doc);
+ return new HTMLTableElement(tableTag, doc);
}
-static PassRefPtr<HTMLElement> tableCaptionConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> tableCaptionConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLTableCaptionElement(doc);
+ return new HTMLTableCaptionElement(captionTag, doc);
}
-static PassRefPtr<HTMLElement> tableColConstructor(const AtomicString& tagName, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> tableColConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLTableColElement(QualifiedName(nullAtom, tagName, xhtmlNamespaceURI), doc);
+ return new HTMLTableColElement(tagName, doc);
}
-static PassRefPtr<HTMLElement> tableRowConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> tableRowConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLTableRowElement(doc);
+ return new HTMLTableRowElement(trTag, doc);
}
-static PassRefPtr<HTMLElement> tableCellConstructor(const AtomicString& tagName, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> tableCellConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLTableCellElement(QualifiedName(nullAtom, tagName, xhtmlNamespaceURI), doc);
+ return new HTMLTableCellElement(tagName, doc);
}
-static PassRefPtr<HTMLElement> tableSectionConstructor(const AtomicString& tagName, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> tableSectionConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLTableSectionElement(QualifiedName(nullAtom, tagName, xhtmlNamespaceURI), doc);
+ return new HTMLTableSectionElement(tagName, doc);
}
-static PassRefPtr<HTMLElement> brConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> brConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLBRElement(doc);
+ return new HTMLBRElement(brTag, doc);
}
-static PassRefPtr<HTMLElement> quoteConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> quoteConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLQuoteElement(doc);
+ doc->setUsesBeforeAfterRules(true);
+ return new HTMLQuoteElement(qTag, doc);
}
-static PassRefPtr<HTMLElement> marqueeConstructor(const AtomicString&, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> marqueeConstructor(const QualifiedName&, Document* doc, HTMLFormElement*, bool)
{
- return new HTMLMarqueeElement(doc);
+ return new HTMLMarqueeElement(marqueeTag, doc);
}
#if ENABLE(VIDEO)
-static PassRefPtr<HTMLElement> audioConstructor(const AtomicString& tagName, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> audioConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
if (!MediaPlayer::isAvailable())
- return new HTMLElement(QualifiedName(nullAtom, tagName, xhtmlNamespaceURI), doc);
- return new HTMLAudioElement(doc);
+ return new HTMLElement(tagName, doc);
+ return new HTMLAudioElement(audioTag, doc);
}
-static PassRefPtr<HTMLElement> videoConstructor(const AtomicString& tagName, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> videoConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
if (!MediaPlayer::isAvailable())
- return new HTMLElement(QualifiedName(nullAtom, tagName, xhtmlNamespaceURI), doc);
- return new HTMLVideoElement(doc);
+ return new HTMLElement(tagName, doc);
+ return new HTMLVideoElement(videoTag, doc);
}
-static PassRefPtr<HTMLElement> sourceConstructor(const AtomicString& tagName, Document* doc, HTMLFormElement*, bool)
+static PassRefPtr<HTMLElement> sourceConstructor(const QualifiedName& tagName, Document* doc, HTMLFormElement*, bool)
{
if (!MediaPlayer::isAvailable())
- return new HTMLElement(QualifiedName(nullAtom, tagName, xhtmlNamespaceURI), doc);
- return new HTMLSourceElement(doc);
+ return new HTMLElement(tagName, doc);
+ return new HTMLSourceElement(sourceTag, doc);
}
#endif
@@ -500,20 +490,20 @@ static void createFunctionMap()
#endif
}
-PassRefPtr<HTMLElement> HTMLElementFactory::createHTMLElement(const AtomicString& tagName, Document* doc, HTMLFormElement* form, bool createdByParser)
+PassRefPtr<HTMLElement> HTMLElementFactory::createHTMLElement(const QualifiedName& tagName, Document* doc, HTMLFormElement* form, bool createdByParser)
{
if (!doc)
return 0; // Don't allow elements to ever be made without having a doc.
if (!gFunctionMap)
createFunctionMap();
-
- ConstructorFunc func = gFunctionMap->get(tagName.impl());
+
+ ConstructorFunc func = gFunctionMap->get(tagName.localName().impl());
if (func)
return func(tagName, doc, form, createdByParser);
-
+
// elements with no special representation in the DOM
- return new HTMLElement(QualifiedName(nullAtom, tagName, xhtmlNamespaceURI), doc);
+ return new HTMLElement(tagName, doc);
}
}