From e8a9e8aed51fc6a6b1c03d2b84f714ede5bcb341 Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 10 Oct 2020 02:48:05 +0100 Subject: LibWeb: Add namespace to Element --- Libraries/LibWeb/CMakeLists.txt | 1 + Libraries/LibWeb/DOM/Document.cpp | 4 +- Libraries/LibWeb/DOM/Element.cpp | 4 +- Libraries/LibWeb/DOM/Element.h | 14 +- Libraries/LibWeb/DOM/Element.idl | 3 +- Libraries/LibWeb/DOM/ElementFactory.cpp | 148 +++++++++++---------- Libraries/LibWeb/DOM/ElementFactory.h | 2 +- Libraries/LibWeb/HTML/HTMLAnchorElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLAnchorElement.h | 2 +- Libraries/LibWeb/HTML/HTMLAreaElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLAreaElement.h | 2 +- Libraries/LibWeb/HTML/HTMLAudioElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLAudioElement.h | 2 +- Libraries/LibWeb/HTML/HTMLBRElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLBRElement.h | 2 +- Libraries/LibWeb/HTML/HTMLBaseElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLBaseElement.h | 2 +- Libraries/LibWeb/HTML/HTMLBlinkElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLBlinkElement.h | 2 +- Libraries/LibWeb/HTML/HTMLBodyElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLBodyElement.h | 2 +- Libraries/LibWeb/HTML/HTMLButtonElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLButtonElement.h | 2 +- Libraries/LibWeb/HTML/HTMLCanvasElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLCanvasElement.h | 2 +- Libraries/LibWeb/HTML/HTMLDListElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLDListElement.h | 2 +- Libraries/LibWeb/HTML/HTMLDataElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLDataElement.h | 2 +- Libraries/LibWeb/HTML/HTMLDataListElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLDataListElement.h | 2 +- Libraries/LibWeb/HTML/HTMLDetailsElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLDetailsElement.h | 2 +- Libraries/LibWeb/HTML/HTMLDialogElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLDialogElement.h | 2 +- Libraries/LibWeb/HTML/HTMLDivElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLDivElement.h | 2 +- Libraries/LibWeb/HTML/HTMLElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLElement.h | 2 +- Libraries/LibWeb/HTML/HTMLEmbedElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLEmbedElement.h | 2 +- Libraries/LibWeb/HTML/HTMLFieldSetElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLFieldSetElement.h | 2 +- Libraries/LibWeb/HTML/HTMLFontElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLFontElement.h | 2 +- Libraries/LibWeb/HTML/HTMLFormElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLFormElement.h | 2 +- Libraries/LibWeb/HTML/HTMLFrameElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLFrameElement.h | 2 +- Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLFrameSetElement.h | 2 +- Libraries/LibWeb/HTML/HTMLHRElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLHRElement.h | 2 +- Libraries/LibWeb/HTML/HTMLHeadElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLHeadElement.h | 2 +- Libraries/LibWeb/HTML/HTMLHeadingElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLHeadingElement.h | 2 +- Libraries/LibWeb/HTML/HTMLHtmlElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLHtmlElement.h | 2 +- Libraries/LibWeb/HTML/HTMLIFrameElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLIFrameElement.h | 2 +- Libraries/LibWeb/HTML/HTMLImageElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLImageElement.h | 2 +- Libraries/LibWeb/HTML/HTMLInputElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLInputElement.h | 2 +- Libraries/LibWeb/HTML/HTMLLIElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLLIElement.h | 2 +- Libraries/LibWeb/HTML/HTMLLabelElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLLabelElement.h | 2 +- Libraries/LibWeb/HTML/HTMLLegendElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLLegendElement.h | 2 +- Libraries/LibWeb/HTML/HTMLLinkElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLLinkElement.h | 2 +- Libraries/LibWeb/HTML/HTMLMapElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLMapElement.h | 2 +- Libraries/LibWeb/HTML/HTMLMarqueeElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLMarqueeElement.h | 2 +- Libraries/LibWeb/HTML/HTMLMediaElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLMediaElement.h | 2 +- Libraries/LibWeb/HTML/HTMLMenuElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLMenuElement.h | 2 +- Libraries/LibWeb/HTML/HTMLMetaElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLMetaElement.h | 2 +- Libraries/LibWeb/HTML/HTMLMeterElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLMeterElement.h | 2 +- Libraries/LibWeb/HTML/HTMLModElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLModElement.h | 2 +- Libraries/LibWeb/HTML/HTMLOListElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLOListElement.h | 2 +- Libraries/LibWeb/HTML/HTMLObjectElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLObjectElement.h | 2 +- Libraries/LibWeb/HTML/HTMLOptGroupElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLOptGroupElement.h | 2 +- Libraries/LibWeb/HTML/HTMLOptionElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLOptionElement.h | 2 +- Libraries/LibWeb/HTML/HTMLOutputElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLOutputElement.h | 2 +- Libraries/LibWeb/HTML/HTMLParagraphElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLParagraphElement.h | 2 +- Libraries/LibWeb/HTML/HTMLParamElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLParamElement.h | 2 +- Libraries/LibWeb/HTML/HTMLPictureElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLPictureElement.h | 2 +- Libraries/LibWeb/HTML/HTMLPreElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLPreElement.h | 2 +- Libraries/LibWeb/HTML/HTMLProgressElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLProgressElement.h | 2 +- Libraries/LibWeb/HTML/HTMLQuoteElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLQuoteElement.h | 2 +- Libraries/LibWeb/HTML/HTMLScriptElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLScriptElement.h | 2 +- Libraries/LibWeb/HTML/HTMLSelectElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLSelectElement.h | 2 +- Libraries/LibWeb/HTML/HTMLSlotElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLSlotElement.h | 2 +- Libraries/LibWeb/HTML/HTMLSourceElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLSourceElement.h | 2 +- Libraries/LibWeb/HTML/HTMLSpanElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLSpanElement.h | 2 +- Libraries/LibWeb/HTML/HTMLStyleElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLStyleElement.h | 2 +- Libraries/LibWeb/HTML/HTMLTableCaptionElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLTableCaptionElement.h | 2 +- Libraries/LibWeb/HTML/HTMLTableCellElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLTableCellElement.h | 2 +- Libraries/LibWeb/HTML/HTMLTableColElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLTableColElement.h | 2 +- Libraries/LibWeb/HTML/HTMLTableElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLTableElement.h | 2 +- Libraries/LibWeb/HTML/HTMLTableRowElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLTableRowElement.h | 2 +- Libraries/LibWeb/HTML/HTMLTableSectionElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLTableSectionElement.h | 2 +- Libraries/LibWeb/HTML/HTMLTemplateElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLTemplateElement.h | 2 +- Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLTextAreaElement.h | 2 +- Libraries/LibWeb/HTML/HTMLTimeElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLTimeElement.h | 2 +- Libraries/LibWeb/HTML/HTMLTitleElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLTitleElement.h | 2 +- Libraries/LibWeb/HTML/HTMLTrackElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLTrackElement.h | 2 +- Libraries/LibWeb/HTML/HTMLUListElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLUListElement.h | 2 +- Libraries/LibWeb/HTML/HTMLUnknownElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLUnknownElement.h | 2 +- Libraries/LibWeb/HTML/HTMLVideoElement.cpp | 4 +- Libraries/LibWeb/HTML/HTMLVideoElement.h | 2 +- .../LibWeb/HTML/Parser/HTMLDocumentParser.cpp | 28 ++-- Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.h | 3 +- Libraries/LibWeb/Loader/FrameLoader.cpp | 13 +- Libraries/LibWeb/Namespace.cpp | 52 ++++++++ Libraries/LibWeb/Namespace.h | 45 +++++++ Libraries/LibWeb/QualifiedName.h | 52 ++++++++ Libraries/LibWeb/SVG/SVGElement.cpp | 4 +- Libraries/LibWeb/SVG/SVGElement.h | 2 +- Libraries/LibWeb/SVG/SVGGeometryElement.cpp | 4 +- Libraries/LibWeb/SVG/SVGGeometryElement.h | 2 +- Libraries/LibWeb/SVG/SVGGraphicsElement.cpp | 4 +- Libraries/LibWeb/SVG/SVGGraphicsElement.h | 2 +- Libraries/LibWeb/SVG/SVGPathElement.cpp | 4 +- Libraries/LibWeb/SVG/SVGPathElement.h | 2 +- Libraries/LibWeb/SVG/SVGSVGElement.cpp | 4 +- Libraries/LibWeb/SVG/SVGSVGElement.h | 2 +- 165 files changed, 495 insertions(+), 330 deletions(-) create mode 100644 Libraries/LibWeb/Namespace.cpp create mode 100644 Libraries/LibWeb/Namespace.h create mode 100644 Libraries/LibWeb/QualifiedName.h (limited to 'Libraries/LibWeb') diff --git a/Libraries/LibWeb/CMakeLists.txt b/Libraries/LibWeb/CMakeLists.txt index 309daabf70..2e7f4aa40a 100644 --- a/Libraries/LibWeb/CMakeLists.txt +++ b/Libraries/LibWeb/CMakeLists.txt @@ -166,6 +166,7 @@ set(SOURCES Loader/ImageResource.cpp Loader/Resource.cpp Loader/ResourceLoader.cpp + Namespace.cpp OutOfProcessWebView.cpp Page/EventHandler.cpp Page/Frame.cpp diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp index edcde7700e..afe8aa30b6 100644 --- a/Libraries/LibWeb/DOM/Document.cpp +++ b/Libraries/LibWeb/DOM/Document.cpp @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -460,7 +461,8 @@ JS::Value Document::run_javascript(const StringView& source) NonnullRefPtr Document::create_element(const String& tag_name) { - return DOM::create_element(*this, tag_name); + // FIXME: Let namespace be the HTML namespace, if this is an HTML document or this’s content type is "application/xhtml+xml", and null otherwise. + return DOM::create_element(*this, tag_name, Namespace::HTML); } NonnullRefPtr Document::create_document_fragment() diff --git a/Libraries/LibWeb/DOM/Element.cpp b/Libraries/LibWeb/DOM/Element.cpp index b5445ab593..11c6baa912 100644 --- a/Libraries/LibWeb/DOM/Element.cpp +++ b/Libraries/LibWeb/DOM/Element.cpp @@ -46,9 +46,9 @@ namespace Web::DOM { -Element::Element(Document& document, const FlyString& tag_name) +Element::Element(Document& document, const QualifiedName& qualified_name) : ParentNode(document, NodeType::ELEMENT_NODE) - , m_tag_name(tag_name) + , m_qualified_name(qualified_name) { } diff --git a/Libraries/LibWeb/DOM/Element.h b/Libraries/LibWeb/DOM/Element.h index 253f532aff..19dba993e5 100644 --- a/Libraries/LibWeb/DOM/Element.h +++ b/Libraries/LibWeb/DOM/Element.h @@ -34,6 +34,7 @@ #include #include #include +#include namespace Web::DOM { @@ -44,15 +45,20 @@ class Element public: using WrapperType = Bindings::ElementWrapper; - Element(Document&, const FlyString& local_name); + Element(Document&, const QualifiedName& qualified_name); virtual ~Element() override; - virtual FlyString node_name() const final { return m_tag_name; } - const FlyString& local_name() const { return m_tag_name; } + virtual FlyString node_name() const final { return m_qualified_name.local_name(); } + const FlyString& local_name() const { return m_qualified_name.local_name(); } // NOTE: This is for the JS bindings const FlyString& tag_name() const { return local_name(); } + const FlyString& namespace_() const { return m_qualified_name.namespace_(); } + + // NOTE: This is for the JS bindings + const FlyString& namespace_uri() const { return namespace_(); } + bool has_attribute(const FlyString& name) const { return !attribute(name).is_null(); } String attribute(const FlyString& name) const; String get_attribute(const FlyString& name) const { return attribute(name); } @@ -100,7 +106,7 @@ private: Attribute* find_attribute(const FlyString& name); const Attribute* find_attribute(const FlyString& name) const; - FlyString m_tag_name; + QualifiedName m_qualified_name; Vector m_attributes; RefPtr m_resolved_style; diff --git a/Libraries/LibWeb/DOM/Element.idl b/Libraries/LibWeb/DOM/Element.idl index 34baef070e..009972252c 100644 --- a/Libraries/LibWeb/DOM/Element.idl +++ b/Libraries/LibWeb/DOM/Element.idl @@ -1,5 +1,5 @@ interface Element : Node { - + readonly attribute DOMString? namespaceURI; readonly attribute DOMString tagName; DOMString? getAttribute(DOMString qualifiedName); @@ -16,4 +16,3 @@ interface Element : Node { readonly attribute Element? nextElementSibling; readonly attribute Element? previousElementSibling; } - diff --git a/Libraries/LibWeb/DOM/ElementFactory.cpp b/Libraries/LibWeb/DOM/ElementFactory.cpp index 12d0cfe696..b50cd0550b 100644 --- a/Libraries/LibWeb/DOM/ElementFactory.cpp +++ b/Libraries/LibWeb/DOM/ElementFactory.cpp @@ -101,159 +101,161 @@ namespace Web::DOM { -NonnullRefPtr create_element(Document& document, const FlyString& tag_name) +NonnullRefPtr create_element(Document& document, const FlyString& tag_name, const FlyString& namespace_) { auto lowercase_tag_name = tag_name.to_lowercase(); + // FIXME: Add prefix when we support it. + auto qualified_name = QualifiedName(tag_name, {}, namespace_); if (lowercase_tag_name == HTML::TagNames::a) - return adopt(*new HTML::HTMLAnchorElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLAnchorElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::area) - return adopt(*new HTML::HTMLAreaElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLAreaElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::audio) - return adopt(*new HTML::HTMLAudioElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLAudioElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::base) - return adopt(*new HTML::HTMLBaseElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLBaseElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::blink) - return adopt(*new HTML::HTMLBlinkElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLBlinkElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::body) - return adopt(*new HTML::HTMLBodyElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLBodyElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::br) - return adopt(*new HTML::HTMLBRElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLBRElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::button) - return adopt(*new HTML::HTMLButtonElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLButtonElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::canvas) - return adopt(*new HTML::HTMLCanvasElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLCanvasElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::data) - return adopt(*new HTML::HTMLDataElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLDataElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::datalist) - return adopt(*new HTML::HTMLDataListElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLDataListElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::details) - return adopt(*new HTML::HTMLDetailsElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLDetailsElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::dialog) - return adopt(*new HTML::HTMLDialogElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLDialogElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::div) - return adopt(*new HTML::HTMLDivElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLDivElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::dl) - return adopt(*new HTML::HTMLDListElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLDListElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::embed) - return adopt(*new HTML::HTMLEmbedElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLEmbedElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::fieldset) - return adopt(*new HTML::HTMLFieldSetElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLFieldSetElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::font) - return adopt(*new HTML::HTMLFontElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLFontElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::form) - return adopt(*new HTML::HTMLFormElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLFormElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::frame) - return adopt(*new HTML::HTMLFrameElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLFrameElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::frameset) - return adopt(*new HTML::HTMLFrameSetElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLFrameSetElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::head) - return adopt(*new HTML::HTMLHeadElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLHeadElement(document, qualified_name)); if (lowercase_tag_name.is_one_of(HTML::TagNames::h1, HTML::TagNames::h2, HTML::TagNames::h3, HTML::TagNames::h4, HTML::TagNames::h5, HTML::TagNames::h6)) - return adopt(*new HTML::HTMLHeadingElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLHeadingElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::hr) - return adopt(*new HTML::HTMLHRElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLHRElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::html) - return adopt(*new HTML::HTMLHtmlElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLHtmlElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::iframe) - return adopt(*new HTML::HTMLIFrameElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLIFrameElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::img) - return adopt(*new HTML::HTMLImageElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLImageElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::input) - return adopt(*new HTML::HTMLInputElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLInputElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::label) - return adopt(*new HTML::HTMLLabelElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLLabelElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::legend) - return adopt(*new HTML::HTMLLegendElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLLegendElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::li) - return adopt(*new HTML::HTMLLIElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLLIElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::link) - return adopt(*new HTML::HTMLLinkElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLLinkElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::map) - return adopt(*new HTML::HTMLMapElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLMapElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::marquee) - return adopt(*new HTML::HTMLMarqueeElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLMarqueeElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::menu) - return adopt(*new HTML::HTMLMenuElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLMenuElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::meta) - return adopt(*new HTML::HTMLMetaElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLMetaElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::meter) - return adopt(*new HTML::HTMLMeterElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLMeterElement(document, qualified_name)); if (lowercase_tag_name.is_one_of(HTML::TagNames::ins, HTML::TagNames::del)) - return adopt(*new HTML::HTMLModElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLModElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::object) - return adopt(*new HTML::HTMLObjectElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLObjectElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::ol) - return adopt(*new HTML::HTMLOListElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLOListElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::optgroup) - return adopt(*new HTML::HTMLOptGroupElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLOptGroupElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::option) - return adopt(*new HTML::HTMLOptionElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLOptionElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::output) - return adopt(*new HTML::HTMLOutputElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLOutputElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::p) - return adopt(*new HTML::HTMLParagraphElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLParagraphElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::param) - return adopt(*new HTML::HTMLParamElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLParamElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::picture) - return adopt(*new HTML::HTMLPictureElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLPictureElement(document, qualified_name)); // NOTE: The obsolete elements "listing" and "xmp" are explicitly mapped to HTMLPreElement in the specification. if (lowercase_tag_name.is_one_of(HTML::TagNames::pre, HTML::TagNames::listing, HTML::TagNames::xmp)) - return adopt(*new HTML::HTMLPreElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLPreElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::progress) - return adopt(*new HTML::HTMLProgressElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLProgressElement(document, qualified_name)); if (lowercase_tag_name.is_one_of(HTML::TagNames::blockquote, HTML::TagNames::q)) - return adopt(*new HTML::HTMLQuoteElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLQuoteElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::script) - return adopt(*new HTML::HTMLScriptElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLScriptElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::select) - return adopt(*new HTML::HTMLSelectElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLSelectElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::slot) - return adopt(*new HTML::HTMLSlotElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLSlotElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::source) - return adopt(*new HTML::HTMLSourceElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLSourceElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::span) - return adopt(*new HTML::HTMLSpanElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLSpanElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::style) - return adopt(*new HTML::HTMLStyleElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLStyleElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::caption) - return adopt(*new HTML::HTMLTableCaptionElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLTableCaptionElement(document, qualified_name)); if (lowercase_tag_name.is_one_of(Web::HTML::TagNames::td, Web::HTML::TagNames::th)) - return adopt(*new HTML::HTMLTableCellElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLTableCellElement(document, qualified_name)); if (lowercase_tag_name.is_one_of(HTML::TagNames::colgroup, HTML::TagNames::col)) - return adopt(*new HTML::HTMLTableColElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLTableColElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::table) - return adopt(*new HTML::HTMLTableElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLTableElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::tr) - return adopt(*new HTML::HTMLTableRowElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLTableRowElement(document, qualified_name)); if (lowercase_tag_name.is_one_of(HTML::TagNames::tbody, HTML::TagNames::thead, HTML::TagNames::tfoot)) - return adopt(*new HTML::HTMLTableSectionElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLTableSectionElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::template_) - return adopt(*new HTML::HTMLTemplateElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLTemplateElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::textarea) - return adopt(*new HTML::HTMLTextAreaElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLTextAreaElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::time) - return adopt(*new HTML::HTMLTimeElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLTimeElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::title) - return adopt(*new HTML::HTMLTitleElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLTitleElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::track) - return adopt(*new HTML::HTMLTrackElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLTrackElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::ul) - return adopt(*new HTML::HTMLUListElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLUListElement(document, qualified_name)); if (lowercase_tag_name == HTML::TagNames::video) - return adopt(*new HTML::HTMLVideoElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLVideoElement(document, qualified_name)); if (lowercase_tag_name.is_one_of( HTML::TagNames::article, HTML::TagNames::section, HTML::TagNames::nav, HTML::TagNames::aside, HTML::TagNames::hgroup, HTML::TagNames::header, HTML::TagNames::footer, HTML::TagNames::address, HTML::TagNames::dt, HTML::TagNames::dd, HTML::TagNames::figure, HTML::TagNames::figcaption, HTML::TagNames::main, HTML::TagNames::em, HTML::TagNames::strong, HTML::TagNames::small, HTML::TagNames::s, HTML::TagNames::cite, HTML::TagNames::dfn, HTML::TagNames::abbr, HTML::TagNames::ruby, HTML::TagNames::rt, HTML::TagNames::rp, HTML::TagNames::code, HTML::TagNames::var, HTML::TagNames::samp, HTML::TagNames::kbd, HTML::TagNames::sub, HTML::TagNames::sup, HTML::TagNames::i, HTML::TagNames::b, HTML::TagNames::u, HTML::TagNames::mark, HTML::TagNames::bdi, HTML::TagNames::bdo, HTML::TagNames::wbr, HTML::TagNames::summary, HTML::TagNames::noscript, // Obsolete HTML::TagNames::acronym, HTML::TagNames::basefont, HTML::TagNames::big, HTML::TagNames::center, HTML::TagNames::nobr, HTML::TagNames::noembed, HTML::TagNames::noframes, HTML::TagNames::plaintext, HTML::TagNames::rb, HTML::TagNames::rtc, HTML::TagNames::strike, HTML::TagNames::tt)) - return adopt(*new HTML::HTMLElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLElement(document, qualified_name)); if (lowercase_tag_name == SVG::TagNames::svg) - return adopt(*new SVG::SVGSVGElement(document, lowercase_tag_name)); + return adopt(*new SVG::SVGSVGElement(document, qualified_name)); if (lowercase_tag_name == SVG::TagNames::path) - return adopt(*new SVG::SVGPathElement(document, lowercase_tag_name)); + return adopt(*new SVG::SVGPathElement(document, qualified_name)); // FIXME: If name is a valid custom element name, then return HTMLElement. - return adopt(*new HTML::HTMLUnknownElement(document, lowercase_tag_name)); + return adopt(*new HTML::HTMLUnknownElement(document, qualified_name)); } } diff --git a/Libraries/LibWeb/DOM/ElementFactory.h b/Libraries/LibWeb/DOM/ElementFactory.h index 2dc5ac3308..c1c811a9a4 100644 --- a/Libraries/LibWeb/DOM/ElementFactory.h +++ b/Libraries/LibWeb/DOM/ElementFactory.h @@ -30,6 +30,6 @@ namespace Web::DOM { -NonnullRefPtr create_element(Document&, const FlyString& tag_name); +NonnullRefPtr create_element(Document&, const FlyString& tag_name, const FlyString& namespace_); } diff --git a/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp b/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp index 2377cb5b0c..f79debf4cc 100644 --- a/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLAnchorElement::HTMLAnchorElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLAnchorElement::HTMLAnchorElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLAnchorElement.h b/Libraries/LibWeb/HTML/HTMLAnchorElement.h index d2295d0163..810f0be493 100644 --- a/Libraries/LibWeb/HTML/HTMLAnchorElement.h +++ b/Libraries/LibWeb/HTML/HTMLAnchorElement.h @@ -34,7 +34,7 @@ class HTMLAnchorElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLAnchorElementWrapper; - HTMLAnchorElement(DOM::Document&, const FlyString& local_name); + HTMLAnchorElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLAnchorElement() override; String href() const { return attribute(HTML::AttributeNames::href); } diff --git a/Libraries/LibWeb/HTML/HTMLAreaElement.cpp b/Libraries/LibWeb/HTML/HTMLAreaElement.cpp index 84de5b8b27..fe9c9a2147 100644 --- a/Libraries/LibWeb/HTML/HTMLAreaElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLAreaElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLAreaElement::HTMLAreaElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLAreaElement::HTMLAreaElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLAreaElement.h b/Libraries/LibWeb/HTML/HTMLAreaElement.h index 8f14cd1e2b..005885ceac 100644 --- a/Libraries/LibWeb/HTML/HTMLAreaElement.h +++ b/Libraries/LibWeb/HTML/HTMLAreaElement.h @@ -34,7 +34,7 @@ class HTMLAreaElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLAreaElementWrapper; - HTMLAreaElement(DOM::Document&, const FlyString& local_name); + HTMLAreaElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLAreaElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLAudioElement.cpp b/Libraries/LibWeb/HTML/HTMLAudioElement.cpp index cc12c35e2c..2653ebf944 100644 --- a/Libraries/LibWeb/HTML/HTMLAudioElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLAudioElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLAudioElement::HTMLAudioElement(DOM::Document& document, const FlyString& tag_name) - : HTMLMediaElement(document, tag_name) +HTMLAudioElement::HTMLAudioElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLMediaElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLAudioElement.h b/Libraries/LibWeb/HTML/HTMLAudioElement.h index 24bcb9c137..87fed68889 100644 --- a/Libraries/LibWeb/HTML/HTMLAudioElement.h +++ b/Libraries/LibWeb/HTML/HTMLAudioElement.h @@ -34,7 +34,7 @@ class HTMLAudioElement final : public HTMLMediaElement { public: using WrapperType = Bindings::HTMLAudioElementWrapper; - HTMLAudioElement(DOM::Document&, const FlyString& local_name); + HTMLAudioElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLAudioElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLBRElement.cpp b/Libraries/LibWeb/HTML/HTMLBRElement.cpp index 672263e987..9774430ca5 100644 --- a/Libraries/LibWeb/HTML/HTMLBRElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLBRElement.cpp @@ -29,8 +29,8 @@ namespace Web::HTML { -HTMLBRElement::HTMLBRElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLBRElement::HTMLBRElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLBRElement.h b/Libraries/LibWeb/HTML/HTMLBRElement.h index c7147dc33d..1529e35634 100644 --- a/Libraries/LibWeb/HTML/HTMLBRElement.h +++ b/Libraries/LibWeb/HTML/HTMLBRElement.h @@ -34,7 +34,7 @@ class HTMLBRElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLBRElementWrapper; - HTMLBRElement(DOM::Document&, const FlyString& local_name); + HTMLBRElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLBRElement() override; virtual RefPtr create_layout_node(const CSS::StyleProperties* parent_style) override; diff --git a/Libraries/LibWeb/HTML/HTMLBaseElement.cpp b/Libraries/LibWeb/HTML/HTMLBaseElement.cpp index 23e913dd44..975d0bddda 100644 --- a/Libraries/LibWeb/HTML/HTMLBaseElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLBaseElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLBaseElement::HTMLBaseElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLBaseElement::HTMLBaseElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLBaseElement.h b/Libraries/LibWeb/HTML/HTMLBaseElement.h index 325399cd28..c191851303 100644 --- a/Libraries/LibWeb/HTML/HTMLBaseElement.h +++ b/Libraries/LibWeb/HTML/HTMLBaseElement.h @@ -34,7 +34,7 @@ class HTMLBaseElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLBaseElementWrapper; - HTMLBaseElement(DOM::Document&, const FlyString& local_name); + HTMLBaseElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLBaseElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLBlinkElement.cpp b/Libraries/LibWeb/HTML/HTMLBlinkElement.cpp index 1f8e7cb7d8..ab41c20f26 100644 --- a/Libraries/LibWeb/HTML/HTMLBlinkElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLBlinkElement.cpp @@ -32,8 +32,8 @@ namespace Web::HTML { -HTMLBlinkElement::HTMLBlinkElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLBlinkElement::HTMLBlinkElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) , m_timer(Core::Timer::construct()) { m_timer->set_interval(500); diff --git a/Libraries/LibWeb/HTML/HTMLBlinkElement.h b/Libraries/LibWeb/HTML/HTMLBlinkElement.h index 6ef9f6a1c9..8178b0a568 100644 --- a/Libraries/LibWeb/HTML/HTMLBlinkElement.h +++ b/Libraries/LibWeb/HTML/HTMLBlinkElement.h @@ -33,7 +33,7 @@ namespace Web::HTML { class HTMLBlinkElement final : public HTMLElement { public: - HTMLBlinkElement(DOM::Document&, const FlyString& local_name); + HTMLBlinkElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLBlinkElement() override; private: diff --git a/Libraries/LibWeb/HTML/HTMLBodyElement.cpp b/Libraries/LibWeb/HTML/HTMLBodyElement.cpp index df52de6514..e6b7272f8d 100644 --- a/Libraries/LibWeb/HTML/HTMLBodyElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLBodyElement.cpp @@ -31,8 +31,8 @@ namespace Web::HTML { -HTMLBodyElement::HTMLBodyElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLBodyElement::HTMLBodyElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLBodyElement.h b/Libraries/LibWeb/HTML/HTMLBodyElement.h index 175ee0c23d..7b06d5de45 100644 --- a/Libraries/LibWeb/HTML/HTMLBodyElement.h +++ b/Libraries/LibWeb/HTML/HTMLBodyElement.h @@ -34,7 +34,7 @@ class HTMLBodyElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLBodyElementWrapper; - HTMLBodyElement(DOM::Document&, const FlyString& local_name); + HTMLBodyElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLBodyElement() override; virtual void parse_attribute(const FlyString&, const String&) override; diff --git a/Libraries/LibWeb/HTML/HTMLButtonElement.cpp b/Libraries/LibWeb/HTML/HTMLButtonElement.cpp index 44871cc528..ec4925965b 100644 --- a/Libraries/LibWeb/HTML/HTMLButtonElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLButtonElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLButtonElement::HTMLButtonElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLButtonElement::HTMLButtonElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLButtonElement.h b/Libraries/LibWeb/HTML/HTMLButtonElement.h index 4ff3a3e2f9..0b54bd6c8f 100644 --- a/Libraries/LibWeb/HTML/HTMLButtonElement.h +++ b/Libraries/LibWeb/HTML/HTMLButtonElement.h @@ -34,7 +34,7 @@ class HTMLButtonElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLButtonElementWrapper; - HTMLButtonElement(DOM::Document&, const FlyString& local_name); + HTMLButtonElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLButtonElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp b/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp index 0e74dbf637..a30c9a3ed5 100644 --- a/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp @@ -36,8 +36,8 @@ namespace Web::HTML { static constexpr auto max_canvas_area = 16384 * 16384; -HTMLCanvasElement::HTMLCanvasElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLCanvasElement::HTMLCanvasElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLCanvasElement.h b/Libraries/LibWeb/HTML/HTMLCanvasElement.h index 590b8b205e..75f9b17008 100644 --- a/Libraries/LibWeb/HTML/HTMLCanvasElement.h +++ b/Libraries/LibWeb/HTML/HTMLCanvasElement.h @@ -38,7 +38,7 @@ class HTMLCanvasElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLCanvasElementWrapper; - HTMLCanvasElement(DOM::Document&, const FlyString& local_name); + HTMLCanvasElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLCanvasElement() override; const Gfx::Bitmap* bitmap() const { return m_bitmap; } diff --git a/Libraries/LibWeb/HTML/HTMLDListElement.cpp b/Libraries/LibWeb/HTML/HTMLDListElement.cpp index f614c5a70c..ce68845ca6 100644 --- a/Libraries/LibWeb/HTML/HTMLDListElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLDListElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLDListElement::HTMLDListElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLDListElement::HTMLDListElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLDListElement.h b/Libraries/LibWeb/HTML/HTMLDListElement.h index efd0e72586..5e86254ce6 100644 --- a/Libraries/LibWeb/HTML/HTMLDListElement.h +++ b/Libraries/LibWeb/HTML/HTMLDListElement.h @@ -34,7 +34,7 @@ class HTMLDListElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLDListElementWrapper; - HTMLDListElement(DOM::Document&, const FlyString& local_name); + HTMLDListElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLDListElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLDataElement.cpp b/Libraries/LibWeb/HTML/HTMLDataElement.cpp index 4f724a078f..1a23f48fd9 100644 --- a/Libraries/LibWeb/HTML/HTMLDataElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLDataElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLDataElement::HTMLDataElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLDataElement::HTMLDataElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLDataElement.h b/Libraries/LibWeb/HTML/HTMLDataElement.h index 4c4a21431a..5aa2143789 100644 --- a/Libraries/LibWeb/HTML/HTMLDataElement.h +++ b/Libraries/LibWeb/HTML/HTMLDataElement.h @@ -34,7 +34,7 @@ class HTMLDataElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLDataElementWrapper; - HTMLDataElement(DOM::Document&, const FlyString& local_name); + HTMLDataElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLDataElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLDataListElement.cpp b/Libraries/LibWeb/HTML/HTMLDataListElement.cpp index d5e3191d99..32bae03035 100644 --- a/Libraries/LibWeb/HTML/HTMLDataListElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLDataListElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLDataListElement::HTMLDataListElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLDataListElement::HTMLDataListElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLDataListElement.h b/Libraries/LibWeb/HTML/HTMLDataListElement.h index f483b8e8e8..72c5b2e423 100644 --- a/Libraries/LibWeb/HTML/HTMLDataListElement.h +++ b/Libraries/LibWeb/HTML/HTMLDataListElement.h @@ -34,7 +34,7 @@ class HTMLDataListElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLDataListElementWrapper; - HTMLDataListElement(DOM::Document&, const FlyString& local_name); + HTMLDataListElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLDataListElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLDetailsElement.cpp b/Libraries/LibWeb/HTML/HTMLDetailsElement.cpp index 2fcd0f6c77..abcdf0801a 100644 --- a/Libraries/LibWeb/HTML/HTMLDetailsElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLDetailsElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLDetailsElement::HTMLDetailsElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLDetailsElement::HTMLDetailsElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLDetailsElement.h b/Libraries/LibWeb/HTML/HTMLDetailsElement.h index bfb64f4c3a..81a0fc3142 100644 --- a/Libraries/LibWeb/HTML/HTMLDetailsElement.h +++ b/Libraries/LibWeb/HTML/HTMLDetailsElement.h @@ -34,7 +34,7 @@ class HTMLDetailsElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLDetailsElementWrapper; - HTMLDetailsElement(DOM::Document&, const FlyString& local_name); + HTMLDetailsElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLDetailsElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLDialogElement.cpp b/Libraries/LibWeb/HTML/HTMLDialogElement.cpp index 78c3774f1a..7437ca2261 100644 --- a/Libraries/LibWeb/HTML/HTMLDialogElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLDialogElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLDialogElement::HTMLDialogElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLDialogElement::HTMLDialogElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLDialogElement.h b/Libraries/LibWeb/HTML/HTMLDialogElement.h index 4ca64f217c..3c8f637128 100644 --- a/Libraries/LibWeb/HTML/HTMLDialogElement.h +++ b/Libraries/LibWeb/HTML/HTMLDialogElement.h @@ -34,7 +34,7 @@ class HTMLDialogElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLDialogElementWrapper; - HTMLDialogElement(DOM::Document&, const FlyString& local_name); + HTMLDialogElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLDialogElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLDivElement.cpp b/Libraries/LibWeb/HTML/HTMLDivElement.cpp index 84973150b5..7392f8ec80 100644 --- a/Libraries/LibWeb/HTML/HTMLDivElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLDivElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLDivElement::HTMLDivElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLDivElement::HTMLDivElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLDivElement.h b/Libraries/LibWeb/HTML/HTMLDivElement.h index a3e97aee52..9b5f12c851 100644 --- a/Libraries/LibWeb/HTML/HTMLDivElement.h +++ b/Libraries/LibWeb/HTML/HTMLDivElement.h @@ -34,7 +34,7 @@ class HTMLDivElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLDivElementWrapper; - HTMLDivElement(DOM::Document&, const FlyString& local_name); + HTMLDivElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLDivElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLElement.cpp b/Libraries/LibWeb/HTML/HTMLElement.cpp index ca7e0c7129..ae3c6c8d13 100644 --- a/Libraries/LibWeb/HTML/HTMLElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLElement::HTMLElement(DOM::Document& document, const FlyString& tag_name) - : Element(document, tag_name) +HTMLElement::HTMLElement(DOM::Document& document, const QualifiedName& qualified_name) + : Element(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLElement.h b/Libraries/LibWeb/HTML/HTMLElement.h index cd1da7bca3..1009c0d39e 100644 --- a/Libraries/LibWeb/HTML/HTMLElement.h +++ b/Libraries/LibWeb/HTML/HTMLElement.h @@ -34,7 +34,7 @@ class HTMLElement : public DOM::Element { public: using WrapperType = Bindings::HTMLElementWrapper; - HTMLElement(DOM::Document&, const FlyString& local_name); + HTMLElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLElement() override; String title() const { return attribute(HTML::AttributeNames::title); } diff --git a/Libraries/LibWeb/HTML/HTMLEmbedElement.cpp b/Libraries/LibWeb/HTML/HTMLEmbedElement.cpp index a4d173aa61..1ec87b0fd0 100644 --- a/Libraries/LibWeb/HTML/HTMLEmbedElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLEmbedElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLEmbedElement::HTMLEmbedElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLEmbedElement::HTMLEmbedElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLEmbedElement.h b/Libraries/LibWeb/HTML/HTMLEmbedElement.h index 4f035ad9b5..6d3a37f17c 100644 --- a/Libraries/LibWeb/HTML/HTMLEmbedElement.h +++ b/Libraries/LibWeb/HTML/HTMLEmbedElement.h @@ -34,7 +34,7 @@ class HTMLEmbedElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLEmbedElementWrapper; - HTMLEmbedElement(DOM::Document&, const FlyString& local_name); + HTMLEmbedElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLEmbedElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLFieldSetElement.cpp b/Libraries/LibWeb/HTML/HTMLFieldSetElement.cpp index a4032dca3d..6a6c5bf87e 100644 --- a/Libraries/LibWeb/HTML/HTMLFieldSetElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLFieldSetElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLFieldSetElement::HTMLFieldSetElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLFieldSetElement::HTMLFieldSetElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLFieldSetElement.h b/Libraries/LibWeb/HTML/HTMLFieldSetElement.h index 6224c604e1..edb5f7f1f4 100644 --- a/Libraries/LibWeb/HTML/HTMLFieldSetElement.h +++ b/Libraries/LibWeb/HTML/HTMLFieldSetElement.h @@ -34,7 +34,7 @@ class HTMLFieldSetElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLFieldSetElementWrapper; - HTMLFieldSetElement(DOM::Document&, const FlyString& local_name); + HTMLFieldSetElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLFieldSetElement() override; const String& type() const diff --git a/Libraries/LibWeb/HTML/HTMLFontElement.cpp b/Libraries/LibWeb/HTML/HTMLFontElement.cpp index da41454609..50ef0e37f5 100644 --- a/Libraries/LibWeb/HTML/HTMLFontElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLFontElement.cpp @@ -30,8 +30,8 @@ namespace Web::HTML { -HTMLFontElement::HTMLFontElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLFontElement::HTMLFontElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLFontElement.h b/Libraries/LibWeb/HTML/HTMLFontElement.h index d349399f57..f611eabe17 100644 --- a/Libraries/LibWeb/HTML/HTMLFontElement.h +++ b/Libraries/LibWeb/HTML/HTMLFontElement.h @@ -32,7 +32,7 @@ namespace Web::HTML { class HTMLFontElement final : public HTMLElement { public: - HTMLFontElement(DOM::Document&, const FlyString& local_name); + HTMLFontElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLFontElement() override; virtual void apply_presentational_hints(CSS::StyleProperties&) const override; diff --git a/Libraries/LibWeb/HTML/HTMLFormElement.cpp b/Libraries/LibWeb/HTML/HTMLFormElement.cpp index f7307d5227..d026ea6a20 100644 --- a/Libraries/LibWeb/HTML/HTMLFormElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLFormElement.cpp @@ -33,8 +33,8 @@ namespace Web::HTML { -HTMLFormElement::HTMLFormElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLFormElement::HTMLFormElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLFormElement.h b/Libraries/LibWeb/HTML/HTMLFormElement.h index deb537c9de..67c1cb4817 100644 --- a/Libraries/LibWeb/HTML/HTMLFormElement.h +++ b/Libraries/LibWeb/HTML/HTMLFormElement.h @@ -35,7 +35,7 @@ class HTMLFormElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLFormElementWrapper; - HTMLFormElement(DOM::Document&, const FlyString& local_name); + HTMLFormElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLFormElement() override; String action() const { return attribute(HTML::AttributeNames::action); } diff --git a/Libraries/LibWeb/HTML/HTMLFrameElement.cpp b/Libraries/LibWeb/HTML/HTMLFrameElement.cpp index 983e0b2756..ba2e0fb470 100644 --- a/Libraries/LibWeb/HTML/HTMLFrameElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLFrameElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLFrameElement::HTMLFrameElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLFrameElement::HTMLFrameElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLFrameElement.h b/Libraries/LibWeb/HTML/HTMLFrameElement.h index baa89004c1..2e75cd527d 100644 --- a/Libraries/LibWeb/HTML/HTMLFrameElement.h +++ b/Libraries/LibWeb/HTML/HTMLFrameElement.h @@ -35,7 +35,7 @@ class HTMLFrameElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLFrameElementWrapper; - HTMLFrameElement(DOM::Document&, const FlyString& local_name); + HTMLFrameElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLFrameElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp b/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp index 84f759301a..128da69ccf 100644 --- a/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLFrameSetElement::HTMLFrameSetElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLFrameSetElement::HTMLFrameSetElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLFrameSetElement.h b/Libraries/LibWeb/HTML/HTMLFrameSetElement.h index 7fc0fbe76c..3bcd8aece9 100644 --- a/Libraries/LibWeb/HTML/HTMLFrameSetElement.h +++ b/Libraries/LibWeb/HTML/HTMLFrameSetElement.h @@ -35,7 +35,7 @@ class HTMLFrameSetElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLFrameSetElementWrapper; - HTMLFrameSetElement(DOM::Document&, const FlyString& local_name); + HTMLFrameSetElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLFrameSetElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLHRElement.cpp b/Libraries/LibWeb/HTML/HTMLHRElement.cpp index 6dd0b0d69b..82574cf789 100644 --- a/Libraries/LibWeb/HTML/HTMLHRElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLHRElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLHRElement::HTMLHRElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLHRElement::HTMLHRElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLHRElement.h b/Libraries/LibWeb/HTML/HTMLHRElement.h index bce708ec73..219ba8bde3 100644 --- a/Libraries/LibWeb/HTML/HTMLHRElement.h +++ b/Libraries/LibWeb/HTML/HTMLHRElement.h @@ -34,7 +34,7 @@ class HTMLHRElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLHRElementWrapper; - HTMLHRElement(DOM::Document&, const FlyString& local_name); + HTMLHRElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLHRElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLHeadElement.cpp b/Libraries/LibWeb/HTML/HTMLHeadElement.cpp index 86ffef1448..a17ead858b 100644 --- a/Libraries/LibWeb/HTML/HTMLHeadElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLHeadElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLHeadElement::HTMLHeadElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLHeadElement::HTMLHeadElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLHeadElement.h b/Libraries/LibWeb/HTML/HTMLHeadElement.h index d2bf33bbc6..c2762c87f8 100644 --- a/Libraries/LibWeb/HTML/HTMLHeadElement.h +++ b/Libraries/LibWeb/HTML/HTMLHeadElement.h @@ -34,7 +34,7 @@ class HTMLHeadElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLHeadElementWrapper; - HTMLHeadElement(DOM::Document&, const FlyString& local_name); + HTMLHeadElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLHeadElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLHeadingElement.cpp b/Libraries/LibWeb/HTML/HTMLHeadingElement.cpp index 82fbb68712..b899c873a5 100644 --- a/Libraries/LibWeb/HTML/HTMLHeadingElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLHeadingElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLHeadingElement::HTMLHeadingElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLHeadingElement::HTMLHeadingElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLHeadingElement.h b/Libraries/LibWeb/HTML/HTMLHeadingElement.h index bae4ce8cd2..b0a0357671 100644 --- a/Libraries/LibWeb/HTML/HTMLHeadingElement.h +++ b/Libraries/LibWeb/HTML/HTMLHeadingElement.h @@ -34,7 +34,7 @@ class HTMLHeadingElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLHeadingElementWrapper; - HTMLHeadingElement(DOM::Document&, const FlyString& local_name); + HTMLHeadingElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLHeadingElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLHtmlElement.cpp b/Libraries/LibWeb/HTML/HTMLHtmlElement.cpp index e671d28d15..ab1233f739 100644 --- a/Libraries/LibWeb/HTML/HTMLHtmlElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLHtmlElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLHtmlElement::HTMLHtmlElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLHtmlElement::HTMLHtmlElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLHtmlElement.h b/Libraries/LibWeb/HTML/HTMLHtmlElement.h index 27673d18ca..c47e2964ca 100644 --- a/Libraries/LibWeb/HTML/HTMLHtmlElement.h +++ b/Libraries/LibWeb/HTML/HTMLHtmlElement.h @@ -34,7 +34,7 @@ class HTMLHtmlElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLHtmlElementWrapper; - HTMLHtmlElement(DOM::Document&, const FlyString& local_name); + HTMLHtmlElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLHtmlElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp b/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp index 7fe0c5b929..4b10624550 100644 --- a/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp @@ -43,8 +43,8 @@ namespace Web::HTML { -HTMLIFrameElement::HTMLIFrameElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLIFrameElement::HTMLIFrameElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLIFrameElement.h b/Libraries/LibWeb/HTML/HTMLIFrameElement.h index 2d5e138d7c..71c0746b0c 100644 --- a/Libraries/LibWeb/HTML/HTMLIFrameElement.h +++ b/Libraries/LibWeb/HTML/HTMLIFrameElement.h @@ -34,7 +34,7 @@ class HTMLIFrameElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLIFrameElementWrapper; - HTMLIFrameElement(DOM::Document&, const FlyString& local_name); + HTMLIFrameElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLIFrameElement() override; virtual RefPtr create_layout_node(const CSS::StyleProperties* parent_style) override; diff --git a/Libraries/LibWeb/HTML/HTMLImageElement.cpp b/Libraries/LibWeb/HTML/HTMLImageElement.cpp index de50687aee..9d9439d0ce 100644 --- a/Libraries/LibWeb/HTML/HTMLImageElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLImageElement.cpp @@ -36,8 +36,8 @@ namespace Web::HTML { -HTMLImageElement::HTMLImageElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLImageElement::HTMLImageElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { m_image_loader.on_load = [this] { this->document().update_layout(); diff --git a/Libraries/LibWeb/HTML/HTMLImageElement.h b/Libraries/LibWeb/HTML/HTMLImageElement.h index 920bd6d2c2..011296ad93 100644 --- a/Libraries/LibWeb/HTML/HTMLImageElement.h +++ b/Libraries/LibWeb/HTML/HTMLImageElement.h @@ -38,7 +38,7 @@ class HTMLImageElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLImageElementWrapper; - HTMLImageElement(DOM::Document&, const FlyString& local_name); + HTMLImageElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLImageElement() override; virtual void parse_attribute(const FlyString& name, const String& value) override; diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Libraries/LibWeb/HTML/HTMLInputElement.cpp index 249329e056..bf721ed071 100644 --- a/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -38,8 +38,8 @@ namespace Web::HTML { -HTMLInputElement::HTMLInputElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLInputElement::HTMLInputElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.h b/Libraries/LibWeb/HTML/HTMLInputElement.h index 6b6405148c..1ff40da6f6 100644 --- a/Libraries/LibWeb/HTML/HTMLInputElement.h +++ b/Libraries/LibWeb/HTML/HTMLInputElement.h @@ -34,7 +34,7 @@ class HTMLInputElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLInputElementWrapper; - HTMLInputElement(DOM::Document&, const FlyString& local_name); + HTMLInputElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLInputElement() override; virtual RefPtr create_layout_node(const CSS::StyleProperties* parent_style) override; diff --git a/Libraries/LibWeb/HTML/HTMLLIElement.cpp b/Libraries/LibWeb/HTML/HTMLLIElement.cpp index 1623bf57b3..fbdb4d0444 100644 --- a/Libraries/LibWeb/HTML/HTMLLIElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLLIElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLLIElement::HTMLLIElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLLIElement::HTMLLIElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLLIElement.h b/Libraries/LibWeb/HTML/HTMLLIElement.h index c85bdd91ba..05ab2c9fd6 100644 --- a/Libraries/LibWeb/HTML/HTMLLIElement.h +++ b/Libraries/LibWeb/HTML/HTMLLIElement.h @@ -34,7 +34,7 @@ class HTMLLIElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLLIElementWrapper; - HTMLLIElement(DOM::Document&, const FlyString& local_name); + HTMLLIElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLLIElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLLabelElement.cpp b/Libraries/LibWeb/HTML/HTMLLabelElement.cpp index 356fca8ffd..766c64eecd 100644 --- a/Libraries/LibWeb/HTML/HTMLLabelElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLLabelElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLLabelElement::HTMLLabelElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLLabelElement::HTMLLabelElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLLabelElement.h b/Libraries/LibWeb/HTML/HTMLLabelElement.h index c1e613b1c6..c4c73ae4a7 100644 --- a/Libraries/LibWeb/HTML/HTMLLabelElement.h +++ b/Libraries/LibWeb/HTML/HTMLLabelElement.h @@ -34,7 +34,7 @@ class HTMLLabelElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLLabelElementWrapper; - HTMLLabelElement(DOM::Document&, const FlyString& local_name); + HTMLLabelElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLLabelElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLLegendElement.cpp b/Libraries/LibWeb/HTML/HTMLLegendElement.cpp index 70f2fba337..aa2bbc2049 100644 --- a/Libraries/LibWeb/HTML/HTMLLegendElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLLegendElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLLegendElement::HTMLLegendElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLLegendElement::HTMLLegendElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLLegendElement.h b/Libraries/LibWeb/HTML/HTMLLegendElement.h index 0f046cb4c2..8cb0ccacf9 100644 --- a/Libraries/LibWeb/HTML/HTMLLegendElement.h +++ b/Libraries/LibWeb/HTML/HTMLLegendElement.h @@ -34,7 +34,7 @@ class HTMLLegendElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLLegendElementWrapper; - HTMLLegendElement(DOM::Document&, const FlyString& local_name); + HTMLLegendElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLLegendElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLLinkElement.cpp b/Libraries/LibWeb/HTML/HTMLLinkElement.cpp index af07ebdabb..323c642d61 100644 --- a/Libraries/LibWeb/HTML/HTMLLinkElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLLinkElement.cpp @@ -34,8 +34,8 @@ namespace Web::HTML { -HTMLLinkElement::HTMLLinkElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLLinkElement::HTMLLinkElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLLinkElement.h b/Libraries/LibWeb/HTML/HTMLLinkElement.h index 1a50f2ffde..3aa6825b9a 100644 --- a/Libraries/LibWeb/HTML/HTMLLinkElement.h +++ b/Libraries/LibWeb/HTML/HTMLLinkElement.h @@ -37,7 +37,7 @@ class HTMLLinkElement final public: using WrapperType = Bindings::HTMLLinkElementWrapper; - HTMLLinkElement(DOM::Document&, const FlyString& local_name); + HTMLLinkElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLLinkElement() override; virtual void inserted_into(Node&) override; diff --git a/Libraries/LibWeb/HTML/HTMLMapElement.cpp b/Libraries/LibWeb/HTML/HTMLMapElement.cpp index 9686bdc38b..c85b871c71 100644 --- a/Libraries/LibWeb/HTML/HTMLMapElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLMapElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLMapElement::HTMLMapElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLMapElement::HTMLMapElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLMapElement.h b/Libraries/LibWeb/HTML/HTMLMapElement.h index 74a950788a..20327cec2d 100644 --- a/Libraries/LibWeb/HTML/HTMLMapElement.h +++ b/Libraries/LibWeb/HTML/HTMLMapElement.h @@ -34,7 +34,7 @@ class HTMLMapElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLMapElementWrapper; - HTMLMapElement(DOM::Document&, const FlyString& local_name); + HTMLMapElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLMapElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLMarqueeElement.cpp b/Libraries/LibWeb/HTML/HTMLMarqueeElement.cpp index 23c7427bb9..02e5e2ec6c 100644 --- a/Libraries/LibWeb/HTML/HTMLMarqueeElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLMarqueeElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLMarqueeElement::HTMLMarqueeElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLMarqueeElement::HTMLMarqueeElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLMarqueeElement.h b/Libraries/LibWeb/HTML/HTMLMarqueeElement.h index 766ad11e9c..ec163c6c0e 100644 --- a/Libraries/LibWeb/HTML/HTMLMarqueeElement.h +++ b/Libraries/LibWeb/HTML/HTMLMarqueeElement.h @@ -35,7 +35,7 @@ class HTMLMarqueeElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLMarqueeElementWrapper; - HTMLMarqueeElement(DOM::Document&, const FlyString& local_name); + HTMLMarqueeElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLMarqueeElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLMediaElement.cpp b/Libraries/LibWeb/HTML/HTMLMediaElement.cpp index f74464c8e1..15e4c01195 100644 --- a/Libraries/LibWeb/HTML/HTMLMediaElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLMediaElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLMediaElement::HTMLMediaElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLMediaElement::HTMLMediaElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLMediaElement.h b/Libraries/LibWeb/HTML/HTMLMediaElement.h index 84e845150c..6c67a83365 100644 --- a/Libraries/LibWeb/HTML/HTMLMediaElement.h +++ b/Libraries/LibWeb/HTML/HTMLMediaElement.h @@ -34,7 +34,7 @@ class HTMLMediaElement : public HTMLElement { public: using WrapperType = Bindings::HTMLMediaElementWrapper; - HTMLMediaElement(DOM::Document&, const FlyString& local_name); + HTMLMediaElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLMediaElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLMenuElement.cpp b/Libraries/LibWeb/HTML/HTMLMenuElement.cpp index 57bc990057..bcda7e5f56 100644 --- a/Libraries/LibWeb/HTML/HTMLMenuElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLMenuElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLMenuElement::HTMLMenuElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLMenuElement::HTMLMenuElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLMenuElement.h b/Libraries/LibWeb/HTML/HTMLMenuElement.h index a5d6009258..16fc19217b 100644 --- a/Libraries/LibWeb/HTML/HTMLMenuElement.h +++ b/Libraries/LibWeb/HTML/HTMLMenuElement.h @@ -34,7 +34,7 @@ class HTMLMenuElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLMenuElementWrapper; - HTMLMenuElement(DOM::Document&, const FlyString& local_name); + HTMLMenuElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLMenuElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLMetaElement.cpp b/Libraries/LibWeb/HTML/HTMLMetaElement.cpp index 582b5be39b..64c50a19e3 100644 --- a/Libraries/LibWeb/HTML/HTMLMetaElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLMetaElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLMetaElement::HTMLMetaElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLMetaElement::HTMLMetaElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLMetaElement.h b/Libraries/LibWeb/HTML/HTMLMetaElement.h index 321f1d41b6..e0b5716e54 100644 --- a/Libraries/LibWeb/HTML/HTMLMetaElement.h +++ b/Libraries/LibWeb/HTML/HTMLMetaElement.h @@ -34,7 +34,7 @@ class HTMLMetaElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLMetaElementWrapper; - HTMLMetaElement(DOM::Document&, const FlyString& local_name); + HTMLMetaElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLMetaElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLMeterElement.cpp b/Libraries/LibWeb/HTML/HTMLMeterElement.cpp index ee8a7339f9..07bfeee98f 100644 --- a/Libraries/LibWeb/HTML/HTMLMeterElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLMeterElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLMeterElement::HTMLMeterElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLMeterElement::HTMLMeterElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLMeterElement.h b/Libraries/LibWeb/HTML/HTMLMeterElement.h index ff2067e67d..66abc5fb92 100644 --- a/Libraries/LibWeb/HTML/HTMLMeterElement.h +++ b/Libraries/LibWeb/HTML/HTMLMeterElement.h @@ -34,7 +34,7 @@ class HTMLMeterElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLMeterElementWrapper; - HTMLMeterElement(DOM::Document&, const FlyString& local_name); + HTMLMeterElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLMeterElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLModElement.cpp b/Libraries/LibWeb/HTML/HTMLModElement.cpp index b740707185..5fcd7603b0 100644 --- a/Libraries/LibWeb/HTML/HTMLModElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLModElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLModElement::HTMLModElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLModElement::HTMLModElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLModElement.h b/Libraries/LibWeb/HTML/HTMLModElement.h index d0edbe1aaf..f4b4747aba 100644 --- a/Libraries/LibWeb/HTML/HTMLModElement.h +++ b/Libraries/LibWeb/HTML/HTMLModElement.h @@ -34,7 +34,7 @@ class HTMLModElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLModElementWrapper; - HTMLModElement(DOM::Document&, const FlyString& local_name); + HTMLModElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLModElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLOListElement.cpp b/Libraries/LibWeb/HTML/HTMLOListElement.cpp index 7d5255d955..48ac66fd8d 100644 --- a/Libraries/LibWeb/HTML/HTMLOListElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLOListElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLOListElement::HTMLOListElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLOListElement::HTMLOListElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLOListElement.h b/Libraries/LibWeb/HTML/HTMLOListElement.h index a385a59f48..6193902ce2 100644 --- a/Libraries/LibWeb/HTML/HTMLOListElement.h +++ b/Libraries/LibWeb/HTML/HTMLOListElement.h @@ -34,7 +34,7 @@ class HTMLOListElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLOListElementWrapper; - HTMLOListElement(DOM::Document&, const FlyString& local_name); + HTMLOListElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLOListElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLObjectElement.cpp b/Libraries/LibWeb/HTML/HTMLObjectElement.cpp index 45807816fd..e5f7ab2fd5 100644 --- a/Libraries/LibWeb/HTML/HTMLObjectElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLObjectElement.cpp @@ -35,8 +35,8 @@ namespace Web::HTML { -HTMLObjectElement::HTMLObjectElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLObjectElement::HTMLObjectElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { m_image_loader.on_load = [this] { m_should_show_fallback_content = false; diff --git a/Libraries/LibWeb/HTML/HTMLObjectElement.h b/Libraries/LibWeb/HTML/HTMLObjectElement.h index 3ee410b198..967ada32cc 100644 --- a/Libraries/LibWeb/HTML/HTMLObjectElement.h +++ b/Libraries/LibWeb/HTML/HTMLObjectElement.h @@ -37,7 +37,7 @@ class HTMLObjectElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLObjectElementWrapper; - HTMLObjectElement(DOM::Document&, const FlyString& local_name); + HTMLObjectElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLObjectElement() override; virtual void parse_attribute(const FlyString& name, const String& value) override; diff --git a/Libraries/LibWeb/HTML/HTMLOptGroupElement.cpp b/Libraries/LibWeb/HTML/HTMLOptGroupElement.cpp index 4ef92676aa..50c7d23b6f 100644 --- a/Libraries/LibWeb/HTML/HTMLOptGroupElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLOptGroupElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLOptGroupElement::HTMLOptGroupElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLOptGroupElement::HTMLOptGroupElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLOptGroupElement.h b/Libraries/LibWeb/HTML/HTMLOptGroupElement.h index 7164650093..ea65d11926 100644 --- a/Libraries/LibWeb/HTML/HTMLOptGroupElement.h +++ b/Libraries/LibWeb/HTML/HTMLOptGroupElement.h @@ -34,7 +34,7 @@ class HTMLOptGroupElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLOptGroupElementWrapper; - HTMLOptGroupElement(DOM::Document&, const FlyString& local_name); + HTMLOptGroupElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLOptGroupElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLOptionElement.cpp b/Libraries/LibWeb/HTML/HTMLOptionElement.cpp index bebeb0cd2c..c22fbb3668 100644 --- a/Libraries/LibWeb/HTML/HTMLOptionElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLOptionElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLOptionElement::HTMLOptionElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLOptionElement::HTMLOptionElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLOptionElement.h b/Libraries/LibWeb/HTML/HTMLOptionElement.h index 1660e18adb..bed1c7bede 100644 --- a/Libraries/LibWeb/HTML/HTMLOptionElement.h +++ b/Libraries/LibWeb/HTML/HTMLOptionElement.h @@ -34,7 +34,7 @@ class HTMLOptionElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLOptionElementWrapper; - HTMLOptionElement(DOM::Document&, const FlyString& local_name); + HTMLOptionElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLOptionElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLOutputElement.cpp b/Libraries/LibWeb/HTML/HTMLOutputElement.cpp index 752d5c0854..80f9d82dd5 100644 --- a/Libraries/LibWeb/HTML/HTMLOutputElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLOutputElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLOutputElement::HTMLOutputElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLOutputElement::HTMLOutputElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLOutputElement.h b/Libraries/LibWeb/HTML/HTMLOutputElement.h index 792711ba57..bf892feb62 100644 --- a/Libraries/LibWeb/HTML/HTMLOutputElement.h +++ b/Libraries/LibWeb/HTML/HTMLOutputElement.h @@ -34,7 +34,7 @@ class HTMLOutputElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLOutputElementWrapper; - HTMLOutputElement(DOM::Document&, const FlyString& local_name); + HTMLOutputElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLOutputElement() override; const String& type() const diff --git a/Libraries/LibWeb/HTML/HTMLParagraphElement.cpp b/Libraries/LibWeb/HTML/HTMLParagraphElement.cpp index af3ea8c65d..9e0fab9859 100644 --- a/Libraries/LibWeb/HTML/HTMLParagraphElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLParagraphElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLParagraphElement::HTMLParagraphElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLParagraphElement::HTMLParagraphElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLParagraphElement.h b/Libraries/LibWeb/HTML/HTMLParagraphElement.h index 1bec644188..542cea6a1a 100644 --- a/Libraries/LibWeb/HTML/HTMLParagraphElement.h +++ b/Libraries/LibWeb/HTML/HTMLParagraphElement.h @@ -34,7 +34,7 @@ class HTMLParagraphElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLParagraphElementWrapper; - HTMLParagraphElement(DOM::Document&, const FlyString& local_name); + HTMLParagraphElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLParagraphElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLParamElement.cpp b/Libraries/LibWeb/HTML/HTMLParamElement.cpp index b081c13c21..838ae13ef8 100644 --- a/Libraries/LibWeb/HTML/HTMLParamElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLParamElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLParamElement::HTMLParamElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLParamElement::HTMLParamElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLParamElement.h b/Libraries/LibWeb/HTML/HTMLParamElement.h index f7199d9530..2a8ce92f0a 100644 --- a/Libraries/LibWeb/HTML/HTMLParamElement.h +++ b/Libraries/LibWeb/HTML/HTMLParamElement.h @@ -34,7 +34,7 @@ class HTMLParamElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLParamElementWrapper; - HTMLParamElement(DOM::Document&, const FlyString& local_name); + HTMLParamElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLParamElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLPictureElement.cpp b/Libraries/LibWeb/HTML/HTMLPictureElement.cpp index 56a608559a..5aec65b51a 100644 --- a/Libraries/LibWeb/HTML/HTMLPictureElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLPictureElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLPictureElement::HTMLPictureElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLPictureElement::HTMLPictureElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLPictureElement.h b/Libraries/LibWeb/HTML/HTMLPictureElement.h index f667fc0d48..c1e0b92941 100644 --- a/Libraries/LibWeb/HTML/HTMLPictureElement.h +++ b/Libraries/LibWeb/HTML/HTMLPictureElement.h @@ -34,7 +34,7 @@ class HTMLPictureElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLPictureElementWrapper; - HTMLPictureElement(DOM::Document&, const FlyString& local_name); + HTMLPictureElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLPictureElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLPreElement.cpp b/Libraries/LibWeb/HTML/HTMLPreElement.cpp index d98162f43f..69349d7238 100644 --- a/Libraries/LibWeb/HTML/HTMLPreElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLPreElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLPreElement::HTMLPreElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLPreElement::HTMLPreElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLPreElement.h b/Libraries/LibWeb/HTML/HTMLPreElement.h index 2dfd4dad4b..d65d3fe580 100644 --- a/Libraries/LibWeb/HTML/HTMLPreElement.h +++ b/Libraries/LibWeb/HTML/HTMLPreElement.h @@ -34,7 +34,7 @@ class HTMLPreElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLPreElementWrapper; - HTMLPreElement(DOM::Document&, const FlyString& local_name); + HTMLPreElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLPreElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLProgressElement.cpp b/Libraries/LibWeb/HTML/HTMLProgressElement.cpp index a13d4bfff5..cfad730312 100644 --- a/Libraries/LibWeb/HTML/HTMLProgressElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLProgressElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLProgressElement::HTMLProgressElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLProgressElement::HTMLProgressElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLProgressElement.h b/Libraries/LibWeb/HTML/HTMLProgressElement.h index b01209151b..7987685763 100644 --- a/Libraries/LibWeb/HTML/HTMLProgressElement.h +++ b/Libraries/LibWeb/HTML/HTMLProgressElement.h @@ -34,7 +34,7 @@ class HTMLProgressElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLProgressElementWrapper; - HTMLProgressElement(DOM::Document&, const FlyString& local_name); + HTMLProgressElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLProgressElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLQuoteElement.cpp b/Libraries/LibWeb/HTML/HTMLQuoteElement.cpp index 320cd8bbbe..07bf149640 100644 --- a/Libraries/LibWeb/HTML/HTMLQuoteElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLQuoteElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLQuoteElement::HTMLQuoteElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLQuoteElement::HTMLQuoteElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLQuoteElement.h b/Libraries/LibWeb/HTML/HTMLQuoteElement.h index 16ac317bfa..e55dab3133 100644 --- a/Libraries/LibWeb/HTML/HTMLQuoteElement.h +++ b/Libraries/LibWeb/HTML/HTMLQuoteElement.h @@ -34,7 +34,7 @@ class HTMLQuoteElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLQuoteElementWrapper; - HTMLQuoteElement(DOM::Document&, const FlyString& local_name); + HTMLQuoteElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLQuoteElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Libraries/LibWeb/HTML/HTMLScriptElement.cpp index da69c5ca55..1b2bec1e73 100644 --- a/Libraries/LibWeb/HTML/HTMLScriptElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLScriptElement.cpp @@ -34,8 +34,8 @@ namespace Web::HTML { -HTMLScriptElement::HTMLScriptElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLScriptElement::HTMLScriptElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLScriptElement.h b/Libraries/LibWeb/HTML/HTMLScriptElement.h index 830a510986..baf6937fd1 100644 --- a/Libraries/LibWeb/HTML/HTMLScriptElement.h +++ b/Libraries/LibWeb/HTML/HTMLScriptElement.h @@ -35,7 +35,7 @@ class HTMLScriptElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLScriptElementWrapper; - HTMLScriptElement(DOM::Document&, const FlyString& local_name); + HTMLScriptElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLScriptElement() override; bool is_non_blocking() const { return m_non_blocking; } diff --git a/Libraries/LibWeb/HTML/HTMLSelectElement.cpp b/Libraries/LibWeb/HTML/HTMLSelectElement.cpp index e4fc54c573..9c4b486b05 100644 --- a/Libraries/LibWeb/HTML/HTMLSelectElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLSelectElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLSelectElement::HTMLSelectElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLSelectElement::HTMLSelectElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLSelectElement.h b/Libraries/LibWeb/HTML/HTMLSelectElement.h index 1418c6daa5..f02fba4436 100644 --- a/Libraries/LibWeb/HTML/HTMLSelectElement.h +++ b/Libraries/LibWeb/HTML/HTMLSelectElement.h @@ -34,7 +34,7 @@ class HTMLSelectElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLSelectElementWrapper; - HTMLSelectElement(DOM::Document&, const FlyString& local_name); + HTMLSelectElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLSelectElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLSlotElement.cpp b/Libraries/LibWeb/HTML/HTMLSlotElement.cpp index 88b053e83d..cb32ab7772 100644 --- a/Libraries/LibWeb/HTML/HTMLSlotElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLSlotElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLSlotElement::HTMLSlotElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLSlotElement::HTMLSlotElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLSlotElement.h b/Libraries/LibWeb/HTML/HTMLSlotElement.h index 2f9c167eb1..550912ad1b 100644 --- a/Libraries/LibWeb/HTML/HTMLSlotElement.h +++ b/Libraries/LibWeb/HTML/HTMLSlotElement.h @@ -34,7 +34,7 @@ class HTMLSlotElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLSlotElementWrapper; - HTMLSlotElement(DOM::Document&, const FlyString& local_name); + HTMLSlotElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLSlotElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLSourceElement.cpp b/Libraries/LibWeb/HTML/HTMLSourceElement.cpp index 99a8f9afd1..3dcf89815e 100644 --- a/Libraries/LibWeb/HTML/HTMLSourceElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLSourceElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLSourceElement::HTMLSourceElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLSourceElement::HTMLSourceElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLSourceElement.h b/Libraries/LibWeb/HTML/HTMLSourceElement.h index 26db0b257c..36e20a8268 100644 --- a/Libraries/LibWeb/HTML/HTMLSourceElement.h +++ b/Libraries/LibWeb/HTML/HTMLSourceElement.h @@ -34,7 +34,7 @@ class HTMLSourceElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLSourceElementWrapper; - HTMLSourceElement(DOM::Document&, const FlyString& local_name); + HTMLSourceElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLSourceElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLSpanElement.cpp b/Libraries/LibWeb/HTML/HTMLSpanElement.cpp index 5d99cee12a..568d24f891 100644 --- a/Libraries/LibWeb/HTML/HTMLSpanElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLSpanElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLSpanElement::HTMLSpanElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLSpanElement::HTMLSpanElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLSpanElement.h b/Libraries/LibWeb/HTML/HTMLSpanElement.h index e8c33c66be..59a4249771 100644 --- a/Libraries/LibWeb/HTML/HTMLSpanElement.h +++ b/Libraries/LibWeb/HTML/HTMLSpanElement.h @@ -34,7 +34,7 @@ class HTMLSpanElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLSpanElementWrapper; - HTMLSpanElement(DOM::Document&, const FlyString& local_name); + HTMLSpanElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLSpanElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLStyleElement.cpp b/Libraries/LibWeb/HTML/HTMLStyleElement.cpp index 985075a6cd..44fa6daea0 100644 --- a/Libraries/LibWeb/HTML/HTMLStyleElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLStyleElement.cpp @@ -32,8 +32,8 @@ namespace Web::HTML { -HTMLStyleElement::HTMLStyleElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLStyleElement::HTMLStyleElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLStyleElement.h b/Libraries/LibWeb/HTML/HTMLStyleElement.h index 79f00b60d3..29c05545b9 100644 --- a/Libraries/LibWeb/HTML/HTMLStyleElement.h +++ b/Libraries/LibWeb/HTML/HTMLStyleElement.h @@ -34,7 +34,7 @@ class HTMLStyleElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLStyleElementWrapper; - HTMLStyleElement(DOM::Document&, const FlyString& local_name); + HTMLStyleElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLStyleElement() override; virtual void children_changed() override; diff --git a/Libraries/LibWeb/HTML/HTMLTableCaptionElement.cpp b/Libraries/LibWeb/HTML/HTMLTableCaptionElement.cpp index 91c21af772..a9c3e62a98 100644 --- a/Libraries/LibWeb/HTML/HTMLTableCaptionElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTableCaptionElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLTableCaptionElement::HTMLTableCaptionElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLTableCaptionElement::HTMLTableCaptionElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLTableCaptionElement.h b/Libraries/LibWeb/HTML/HTMLTableCaptionElement.h index 10b4ac3123..8f134e3153 100644 --- a/Libraries/LibWeb/HTML/HTMLTableCaptionElement.h +++ b/Libraries/LibWeb/HTML/HTMLTableCaptionElement.h @@ -34,7 +34,7 @@ class HTMLTableCaptionElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLTableCaptionElementWrapper; - HTMLTableCaptionElement(DOM::Document&, const FlyString& local_name); + HTMLTableCaptionElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLTableCaptionElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp b/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp index 79d16b0c14..5dd60f2cbb 100644 --- a/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp @@ -29,8 +29,8 @@ namespace Web::HTML { -HTMLTableCellElement::HTMLTableCellElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLTableCellElement::HTMLTableCellElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLTableCellElement.h b/Libraries/LibWeb/HTML/HTMLTableCellElement.h index cb01c684ee..28fba12488 100644 --- a/Libraries/LibWeb/HTML/HTMLTableCellElement.h +++ b/Libraries/LibWeb/HTML/HTMLTableCellElement.h @@ -34,7 +34,7 @@ class HTMLTableCellElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLTableCellElementWrapper; - HTMLTableCellElement(DOM::Document&, const FlyString& local_name); + HTMLTableCellElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLTableCellElement() override; private: diff --git a/Libraries/LibWeb/HTML/HTMLTableColElement.cpp b/Libraries/LibWeb/HTML/HTMLTableColElement.cpp index 2a09e502c2..17a3e494c8 100644 --- a/Libraries/LibWeb/HTML/HTMLTableColElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTableColElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLTableColElement::HTMLTableColElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLTableColElement::HTMLTableColElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLTableColElement.h b/Libraries/LibWeb/HTML/HTMLTableColElement.h index f0def09684..922943e56c 100644 --- a/Libraries/LibWeb/HTML/HTMLTableColElement.h +++ b/Libraries/LibWeb/HTML/HTMLTableColElement.h @@ -34,7 +34,7 @@ class HTMLTableColElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLTableColElementWrapper; - HTMLTableColElement(DOM::Document&, const FlyString& local_name); + HTMLTableColElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLTableColElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLTableElement.cpp b/Libraries/LibWeb/HTML/HTMLTableElement.cpp index 7346c4327c..d31641af42 100644 --- a/Libraries/LibWeb/HTML/HTMLTableElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTableElement.cpp @@ -29,8 +29,8 @@ namespace Web::HTML { -HTMLTableElement::HTMLTableElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLTableElement::HTMLTableElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLTableElement.h b/Libraries/LibWeb/HTML/HTMLTableElement.h index fb34149384..8d4498f6c3 100644 --- a/Libraries/LibWeb/HTML/HTMLTableElement.h +++ b/Libraries/LibWeb/HTML/HTMLTableElement.h @@ -34,7 +34,7 @@ class HTMLTableElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLTableElementWrapper; - HTMLTableElement(DOM::Document&, const FlyString& local_name); + HTMLTableElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLTableElement() override; private: diff --git a/Libraries/LibWeb/HTML/HTMLTableRowElement.cpp b/Libraries/LibWeb/HTML/HTMLTableRowElement.cpp index d8155af01e..28f0d6d910 100644 --- a/Libraries/LibWeb/HTML/HTMLTableRowElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTableRowElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLTableRowElement::HTMLTableRowElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLTableRowElement::HTMLTableRowElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLTableRowElement.h b/Libraries/LibWeb/HTML/HTMLTableRowElement.h index b73ec5ba3d..41218e712a 100644 --- a/Libraries/LibWeb/HTML/HTMLTableRowElement.h +++ b/Libraries/LibWeb/HTML/HTMLTableRowElement.h @@ -34,7 +34,7 @@ class HTMLTableRowElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLTableRowElementWrapper; - HTMLTableRowElement(DOM::Document&, const FlyString& local_name); + HTMLTableRowElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLTableRowElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLTableSectionElement.cpp b/Libraries/LibWeb/HTML/HTMLTableSectionElement.cpp index 1fe5c3447b..2ce4394b94 100644 --- a/Libraries/LibWeb/HTML/HTMLTableSectionElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTableSectionElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLTableSectionElement::HTMLTableSectionElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLTableSectionElement::HTMLTableSectionElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLTableSectionElement.h b/Libraries/LibWeb/HTML/HTMLTableSectionElement.h index 85aa81d84b..64a87054e3 100644 --- a/Libraries/LibWeb/HTML/HTMLTableSectionElement.h +++ b/Libraries/LibWeb/HTML/HTMLTableSectionElement.h @@ -34,7 +34,7 @@ class HTMLTableSectionElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLTableSectionElementWrapper; - HTMLTableSectionElement(DOM::Document&, const FlyString& local_name); + HTMLTableSectionElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLTableSectionElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLTemplateElement.cpp b/Libraries/LibWeb/HTML/HTMLTemplateElement.cpp index 8a3b0812e0..ee166924b1 100644 --- a/Libraries/LibWeb/HTML/HTMLTemplateElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTemplateElement.cpp @@ -29,8 +29,8 @@ namespace Web::HTML { -HTMLTemplateElement::HTMLTemplateElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLTemplateElement::HTMLTemplateElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { m_content = adopt(*new DOM::DocumentFragment(appropriate_template_contents_owner_document(document))); m_content->set_host(*this); diff --git a/Libraries/LibWeb/HTML/HTMLTemplateElement.h b/Libraries/LibWeb/HTML/HTMLTemplateElement.h index 47e383cf74..09f32bf995 100644 --- a/Libraries/LibWeb/HTML/HTMLTemplateElement.h +++ b/Libraries/LibWeb/HTML/HTMLTemplateElement.h @@ -35,7 +35,7 @@ class HTMLTemplateElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLTemplateElementWrapper; - HTMLTemplateElement(DOM::Document&, const FlyString& local_name); + HTMLTemplateElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLTemplateElement() override; NonnullRefPtr content() { return *m_content; } diff --git a/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp b/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp index 2e9456be17..29433042c4 100644 --- a/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLTextAreaElement::HTMLTextAreaElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLTextAreaElement::HTMLTextAreaElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLTextAreaElement.h b/Libraries/LibWeb/HTML/HTMLTextAreaElement.h index 7dddf76a1b..d444f3ccfc 100644 --- a/Libraries/LibWeb/HTML/HTMLTextAreaElement.h +++ b/Libraries/LibWeb/HTML/HTMLTextAreaElement.h @@ -34,7 +34,7 @@ class HTMLTextAreaElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLTextAreaElementWrapper; - HTMLTextAreaElement(DOM::Document&, const FlyString& local_name); + HTMLTextAreaElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLTextAreaElement() override; const String& type() const diff --git a/Libraries/LibWeb/HTML/HTMLTimeElement.cpp b/Libraries/LibWeb/HTML/HTMLTimeElement.cpp index fbd0d3811a..613f8aadbe 100644 --- a/Libraries/LibWeb/HTML/HTMLTimeElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTimeElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLTimeElement::HTMLTimeElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLTimeElement::HTMLTimeElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLTimeElement.h b/Libraries/LibWeb/HTML/HTMLTimeElement.h index 91f8c97c82..675b79b710 100644 --- a/Libraries/LibWeb/HTML/HTMLTimeElement.h +++ b/Libraries/LibWeb/HTML/HTMLTimeElement.h @@ -34,7 +34,7 @@ class HTMLTimeElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLTimeElementWrapper; - HTMLTimeElement(DOM::Document&, const FlyString& local_name); + HTMLTimeElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLTimeElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLTitleElement.cpp b/Libraries/LibWeb/HTML/HTMLTitleElement.cpp index 36f2835191..277448b08a 100644 --- a/Libraries/LibWeb/HTML/HTMLTitleElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTitleElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLTitleElement::HTMLTitleElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLTitleElement::HTMLTitleElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLTitleElement.h b/Libraries/LibWeb/HTML/HTMLTitleElement.h index b58b6fef93..7250998040 100644 --- a/Libraries/LibWeb/HTML/HTMLTitleElement.h +++ b/Libraries/LibWeb/HTML/HTMLTitleElement.h @@ -34,7 +34,7 @@ class HTMLTitleElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLTitleElementWrapper; - HTMLTitleElement(DOM::Document&, const FlyString& local_name); + HTMLTitleElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLTitleElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLTrackElement.cpp b/Libraries/LibWeb/HTML/HTMLTrackElement.cpp index b78e2cab05..2f0cee7f28 100644 --- a/Libraries/LibWeb/HTML/HTMLTrackElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTrackElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLTrackElement::HTMLTrackElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLTrackElement::HTMLTrackElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLTrackElement.h b/Libraries/LibWeb/HTML/HTMLTrackElement.h index de635ad739..8724dd3867 100644 --- a/Libraries/LibWeb/HTML/HTMLTrackElement.h +++ b/Libraries/LibWeb/HTML/HTMLTrackElement.h @@ -34,7 +34,7 @@ class HTMLTrackElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLTrackElementWrapper; - HTMLTrackElement(DOM::Document&, const FlyString& local_name); + HTMLTrackElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLTrackElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLUListElement.cpp b/Libraries/LibWeb/HTML/HTMLUListElement.cpp index 48ecfcf597..d9cbcb9cd7 100644 --- a/Libraries/LibWeb/HTML/HTMLUListElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLUListElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLUListElement::HTMLUListElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLUListElement::HTMLUListElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLUListElement.h b/Libraries/LibWeb/HTML/HTMLUListElement.h index f18fb667f6..50083f79f6 100644 --- a/Libraries/LibWeb/HTML/HTMLUListElement.h +++ b/Libraries/LibWeb/HTML/HTMLUListElement.h @@ -34,7 +34,7 @@ class HTMLUListElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLUListElementWrapper; - HTMLUListElement(DOM::Document&, const FlyString& local_name); + HTMLUListElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLUListElement() override; }; diff --git a/Libraries/LibWeb/HTML/HTMLUnknownElement.cpp b/Libraries/LibWeb/HTML/HTMLUnknownElement.cpp index e07582363d..3ef559692d 100644 --- a/Libraries/LibWeb/HTML/HTMLUnknownElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLUnknownElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLUnknownElement::HTMLUnknownElement(DOM::Document& document, const FlyString& tag_name) - : HTMLElement(document, tag_name) +HTMLUnknownElement::HTMLUnknownElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLUnknownElement.h b/Libraries/LibWeb/HTML/HTMLUnknownElement.h index 5dd7cfdc50..163da5d55f 100644 --- a/Libraries/LibWeb/HTML/HTMLUnknownElement.h +++ b/Libraries/LibWeb/HTML/HTMLUnknownElement.h @@ -34,7 +34,7 @@ class HTMLUnknownElement final : public HTMLElement { public: using WrapperType = Bindings::HTMLUnknownElementWrapper; - HTMLUnknownElement(DOM::Document&, const FlyString& local_name); + HTMLUnknownElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLUnknownElement() override; private: diff --git a/Libraries/LibWeb/HTML/HTMLVideoElement.cpp b/Libraries/LibWeb/HTML/HTMLVideoElement.cpp index a644cf9023..cbd97199cf 100644 --- a/Libraries/LibWeb/HTML/HTMLVideoElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLVideoElement.cpp @@ -28,8 +28,8 @@ namespace Web::HTML { -HTMLVideoElement::HTMLVideoElement(DOM::Document& document, const FlyString& tag_name) - : HTMLMediaElement(document, tag_name) +HTMLVideoElement::HTMLVideoElement(DOM::Document& document, const QualifiedName& qualified_name) + : HTMLMediaElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/HTML/HTMLVideoElement.h b/Libraries/LibWeb/HTML/HTMLVideoElement.h index 11e5993339..7d9366d31a 100644 --- a/Libraries/LibWeb/HTML/HTMLVideoElement.h +++ b/Libraries/LibWeb/HTML/HTMLVideoElement.h @@ -34,7 +34,7 @@ class HTMLVideoElement final : public HTMLMediaElement { public: using WrapperType = Bindings::HTMLVideoElementWrapper; - HTMLVideoElement(DOM::Document&, const FlyString& local_name); + HTMLVideoElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~HTMLVideoElement() override; }; diff --git a/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.cpp b/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.cpp index 7de6600c8d..aad3f9398a 100644 --- a/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.cpp +++ b/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.cpp @@ -40,6 +40,7 @@ #include #include #include +#include namespace Web::HTML { @@ -356,7 +357,7 @@ void HTMLDocumentParser::handle_before_html(HTMLToken& token) } if (token.is_start_tag() && token.tag_name() == HTML::TagNames::html) { - auto element = create_element_for(token); + auto element = create_element_for(token, Namespace::HTML); document().append_child(element); m_stack_of_open_elements.push(move(element)); m_insertion_mode = InsertionMode::BeforeHead; @@ -373,7 +374,7 @@ void HTMLDocumentParser::handle_before_html(HTMLToken& token) } AnythingElse: - auto element = create_element(document(), HTML::TagNames::html); + auto element = create_element(document(), HTML::TagNames::html, Namespace::HTML); document().append_child(element); m_stack_of_open_elements.push(element); // FIXME: If the Document is being loaded as part of navigation of a browsing context, then: run the application cache selection algorithm with no manifest, passing it the Document object. @@ -424,25 +425,30 @@ HTMLDocumentParser::AdjustedInsertionLocation HTMLDocumentParser::find_appropria return adjusted_insertion_location; } -NonnullRefPtr HTMLDocumentParser::create_element_for(const HTMLToken& token) +NonnullRefPtr HTMLDocumentParser::create_element_for(const HTMLToken& token, const FlyString& namespace_) { - auto element = create_element(document(), token.tag_name()); + auto element = create_element(document(), token.tag_name(), namespace_); for (auto& attribute : token.m_tag.attributes) { element->set_attribute(attribute.local_name_builder.to_string(), attribute.value_builder.to_string()); } return element; } -RefPtr HTMLDocumentParser::insert_html_element(const HTMLToken& token) +RefPtr HTMLDocumentParser::insert_foreign_element(const HTMLToken& token, const FlyString& namespace_) { auto adjusted_insertion_location = find_appropriate_place_for_inserting_node(); - auto element = create_element_for(token); + auto element = create_element_for(token, namespace_); // FIXME: Check if it's possible to insert `element` at `adjusted_insertion_location` adjusted_insertion_location.parent->insert_before(element, adjusted_insertion_location.insert_before_sibling); m_stack_of_open_elements.push(element); return element; } +RefPtr HTMLDocumentParser::insert_html_element(const HTMLToken& token) +{ + return insert_foreign_element(token, Namespace::HTML); +} + void HTMLDocumentParser::handle_before_head(HTMLToken& token) { if (token.is_character() && token.is_parser_whitespace()) { @@ -551,7 +557,7 @@ void HTMLDocumentParser::handle_in_head(HTMLToken& token) if (token.is_start_tag() && token.tag_name() == HTML::TagNames::script) { auto adjusted_insertion_location = find_appropriate_place_for_inserting_node(); - auto element = create_element_for(token); + auto element = create_element_for(token, Namespace::HTML); auto& script_element = downcast(*element); script_element.set_parser_document({}, document()); script_element.set_non_blocking({}, false); @@ -1635,8 +1641,7 @@ void HTMLDocumentParser::handle_in_body(HTMLToken& token) adjust_mathml_attributes(token); adjust_foreign_attributes(token); - // FIXME: this should insert a foreign element, but lets just insert it normally for now :^) - insert_html_element(token); + insert_foreign_element(token, Namespace::MathML); if (token.is_self_closing()) { m_stack_of_open_elements.pop(); @@ -1651,8 +1656,7 @@ void HTMLDocumentParser::handle_in_body(HTMLToken& token) adjust_svg_attributes(token); adjust_foreign_attributes(token); - // FIXME: this should insert a foreign element, but lets just insert it normally for now :^) - insert_html_element(token); + insert_foreign_element(token, Namespace::SVG); if (token.is_self_closing()) { m_stack_of_open_elements.pop(); @@ -2822,7 +2826,7 @@ NonnullRefPtrVector HTMLDocumentParser::parse_html_fragment(DOM::Elem parser.m_tokenizer.switch_to({}, HTMLTokenizer::State::PLAINTEXT); } - auto root = create_element(context_element.document(), HTML::TagNames::html); + auto root = create_element(context_element.document(), HTML::TagNames::html, Namespace::HTML); parser.document().append_child(root); parser.m_stack_of_open_elements.push(root); diff --git a/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.h b/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.h index 8361eebc1c..bb343acb0c 100644 --- a/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.h +++ b/Libraries/LibWeb/HTML/Parser/HTMLDocumentParser.h @@ -117,7 +117,7 @@ private: void generate_implied_end_tags(const FlyString& exception = {}); void generate_all_implied_end_tags_thoroughly(); bool stack_of_open_elements_has_element_with_tag_name_in_scope(const FlyString& tag_name); - NonnullRefPtr create_element_for(const HTMLToken&); + NonnullRefPtr create_element_for(const HTMLToken&, const FlyString& namespace_); struct AdjustedInsertionLocation { RefPtr parent; @@ -128,6 +128,7 @@ private: DOM::Text* find_character_insertion_node(); void flush_character_insertions(); + RefPtr insert_foreign_element(const HTMLToken&, const FlyString&); RefPtr insert_html_element(const HTMLToken&); DOM::Element& current_node(); DOM::Element& node_before_current_node(); diff --git a/Libraries/LibWeb/Loader/FrameLoader.cpp b/Libraries/LibWeb/Loader/FrameLoader.cpp index f3c66e9011..9f2a338418 100644 --- a/Libraries/LibWeb/Loader/FrameLoader.cpp +++ b/Libraries/LibWeb/Loader/FrameLoader.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -78,7 +79,7 @@ static RefPtr create_text_document(const ByteBuffer& data, const auto body_element = document->create_element("body"); html_element->append_child(body_element); - auto pre_element = create_element(document, "pre"); + auto pre_element = document->create_element("pre"); body_element->append_child(pre_element); pre_element->append_child(document->create_text_node(String::copy(data))); @@ -93,22 +94,22 @@ static RefPtr create_image_document(const ByteBuffer& data, const auto bitmap = image_decoder->bitmap(); ASSERT(bitmap); - auto html_element = create_element(document, "html"); + auto html_element = document->create_element("html"); document->append_child(html_element); - auto head_element = create_element(document, "head"); + auto head_element = document->create_element("head"); html_element->append_child(head_element); - auto title_element = create_element(document, "title"); + auto title_element = document->create_element("title"); head_element->append_child(title_element); auto basename = LexicalPath(url.path()).basename(); auto title_text = adopt(*new DOM::Text(document, String::format("%s [%dx%d]", basename.characters(), bitmap->width(), bitmap->height()))); title_element->append_child(title_text); - auto body_element = create_element(document, "body"); + auto body_element = document->create_element("body"); html_element->append_child(body_element); - auto image_element = create_element(document, "img"); + auto image_element = document->create_element("img"); image_element->set_attribute(HTML::AttributeNames::src, url.to_string()); body_element->append_child(image_element); diff --git a/Libraries/LibWeb/Namespace.cpp b/Libraries/LibWeb/Namespace.cpp new file mode 100644 index 0000000000..5a73f00c35 --- /dev/null +++ b/Libraries/LibWeb/Namespace.cpp @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2020, the SerenityOS developers. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +namespace Web::Namespace { + +#define __ENUMERATE_NAMESPACE(name, namespace_) FlyString name; +ENUMERATE_NAMESPACES +#undef __ENUMERATE_NAMESPACE + + // clang-format off +// FIXME: clang-format gets confused here. Why? +[[gnu::constructor]] static void initialize() +// clang-format on +{ + static bool s_initialized = false; + if (s_initialized) + return; + +#define __ENUMERATE_NAMESPACE(name, namespace_) \ + name = namespace_; + ENUMERATE_NAMESPACES +#undef __ENUMERATE_NAMESPACE + + s_initialized = true; +} + +} diff --git a/Libraries/LibWeb/Namespace.h b/Libraries/LibWeb/Namespace.h new file mode 100644 index 0000000000..e7fe6ff0f7 --- /dev/null +++ b/Libraries/LibWeb/Namespace.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2020, the SerenityOS developers. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#pragma once + +#include + +namespace Web::Namespace { + +#define ENUMERATE_NAMESPACES \ + __ENUMERATE_NAMESPACE(HTML, "http://www.w3.org/1999/xhtml") \ + __ENUMERATE_NAMESPACE(MathML, "http://www.w3.org/1998/Math/MathML") \ + __ENUMERATE_NAMESPACE(SVG, "http://www.w3.org/2000/svg") \ + __ENUMERATE_NAMESPACE(XLink, "http://www.w3.org/1999/xlink") \ + __ENUMERATE_NAMESPACE(XML, "http://www.w3.org/XML/1998/namespace") \ + __ENUMERATE_NAMESPACE(XMLNS, "http://www.w3.org/2000/xmlns/") + +#define __ENUMERATE_NAMESPACE(name, namespace_) extern FlyString name; +ENUMERATE_NAMESPACES +#undef __ENUMERATE_NAMESPACE + +} diff --git a/Libraries/LibWeb/QualifiedName.h b/Libraries/LibWeb/QualifiedName.h new file mode 100644 index 0000000000..08103b507d --- /dev/null +++ b/Libraries/LibWeb/QualifiedName.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2020, the SerenityOS developers. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#pragma once + +#include + +namespace Web { + +class QualifiedName { +public: + QualifiedName(const FlyString& local_name, const FlyString& prefix, const FlyString& namespace_) + : m_local_name(local_name) + , m_prefix(prefix) + , m_namespace(namespace_) + { + } + + const FlyString& local_name() const { return m_local_name; } + const FlyString& prefix() const { return m_prefix; } + const FlyString& namespace_() const { return m_namespace; } + +private: + FlyString m_local_name; + FlyString m_prefix; + FlyString m_namespace; +}; + +} diff --git a/Libraries/LibWeb/SVG/SVGElement.cpp b/Libraries/LibWeb/SVG/SVGElement.cpp index f3699c18eb..828e9b0e99 100644 --- a/Libraries/LibWeb/SVG/SVGElement.cpp +++ b/Libraries/LibWeb/SVG/SVGElement.cpp @@ -28,8 +28,8 @@ namespace Web::SVG { -SVGElement::SVGElement(DOM::Document& document, const FlyString& tag_name) - : Element(document, tag_name) +SVGElement::SVGElement(DOM::Document& document, const QualifiedName& qualified_name) + : Element(document, qualified_name) { } diff --git a/Libraries/LibWeb/SVG/SVGElement.h b/Libraries/LibWeb/SVG/SVGElement.h index 185c1db7fb..b96ea1e774 100644 --- a/Libraries/LibWeb/SVG/SVGElement.h +++ b/Libraries/LibWeb/SVG/SVGElement.h @@ -37,7 +37,7 @@ public: virtual bool is_graphics_element() const { return false; } protected: - SVGElement(DOM::Document&, const FlyString& tag_name); + SVGElement(DOM::Document&, const QualifiedName& qualified_name); private: virtual bool is_svg_element() const final { return true; } diff --git a/Libraries/LibWeb/SVG/SVGGeometryElement.cpp b/Libraries/LibWeb/SVG/SVGGeometryElement.cpp index 47764c2363..c3e8f386fd 100644 --- a/Libraries/LibWeb/SVG/SVGGeometryElement.cpp +++ b/Libraries/LibWeb/SVG/SVGGeometryElement.cpp @@ -28,8 +28,8 @@ namespace Web::SVG { -SVGGeometryElement::SVGGeometryElement(DOM::Document& document, const FlyString& tag_name) - : SVGGraphicsElement(document, tag_name) +SVGGeometryElement::SVGGeometryElement(DOM::Document& document, const QualifiedName& qualified_name) + : SVGGraphicsElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/SVG/SVGGeometryElement.h b/Libraries/LibWeb/SVG/SVGGeometryElement.h index 3d3e6bcd3c..91c9e92288 100644 --- a/Libraries/LibWeb/SVG/SVGGeometryElement.h +++ b/Libraries/LibWeb/SVG/SVGGeometryElement.h @@ -35,7 +35,7 @@ public: using WrapperType = Bindings::SVGGeometryElementWrapper; protected: - SVGGeometryElement(DOM::Document& document, const FlyString& tag_name); + SVGGeometryElement(DOM::Document& document, const QualifiedName& qualified_name); }; } diff --git a/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp b/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp index 1e7556d693..2fca526027 100644 --- a/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp +++ b/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp @@ -28,8 +28,8 @@ namespace Web::SVG { -SVGGraphicsElement::SVGGraphicsElement(DOM::Document& document, const FlyString& tag_name) - : SVGElement(document, tag_name) +SVGGraphicsElement::SVGGraphicsElement(DOM::Document& document, const QualifiedName& qualified_name) + : SVGElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/SVG/SVGGraphicsElement.h b/Libraries/LibWeb/SVG/SVGGraphicsElement.h index 413ca16001..657a448957 100644 --- a/Libraries/LibWeb/SVG/SVGGraphicsElement.h +++ b/Libraries/LibWeb/SVG/SVGGraphicsElement.h @@ -37,7 +37,7 @@ class SVGGraphicsElement : public SVGElement { public: using WrapperType = Bindings::SVGGraphicsElementWrapper; - SVGGraphicsElement(DOM::Document&, const FlyString& tag_name); + SVGGraphicsElement(DOM::Document&, const QualifiedName& qualified_name); virtual void parse_attribute(const FlyString& name, const String& value) override; diff --git a/Libraries/LibWeb/SVG/SVGPathElement.cpp b/Libraries/LibWeb/SVG/SVGPathElement.cpp index add1460cd7..36a2ef2fb6 100644 --- a/Libraries/LibWeb/SVG/SVGPathElement.cpp +++ b/Libraries/LibWeb/SVG/SVGPathElement.cpp @@ -425,8 +425,8 @@ bool PathDataParser::match_coordinate() const return !done() && (isdigit(ch()) || ch() == '-' || ch() == '+' || ch() == '.'); } -SVGPathElement::SVGPathElement(DOM::Document& document, const FlyString& tag_name) - : SVGGeometryElement(document, tag_name) +SVGPathElement::SVGPathElement(DOM::Document& document, const QualifiedName& qualified_name) + : SVGGeometryElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/SVG/SVGPathElement.h b/Libraries/LibWeb/SVG/SVGPathElement.h index d08d197472..922c92b690 100644 --- a/Libraries/LibWeb/SVG/SVGPathElement.h +++ b/Libraries/LibWeb/SVG/SVGPathElement.h @@ -106,7 +106,7 @@ class SVGPathElement final : public SVGGeometryElement { public: using WrapperType = Bindings::SVGPathElementWrapper; - SVGPathElement(DOM::Document&, const FlyString& tag_name); + SVGPathElement(DOM::Document&, const QualifiedName& qualified_name); virtual ~SVGPathElement() override = default; virtual RefPtr create_layout_node(const CSS::StyleProperties* parent_style) override; diff --git a/Libraries/LibWeb/SVG/SVGSVGElement.cpp b/Libraries/LibWeb/SVG/SVGSVGElement.cpp index c22099c60e..0a0b2f75f3 100644 --- a/Libraries/LibWeb/SVG/SVGSVGElement.cpp +++ b/Libraries/LibWeb/SVG/SVGSVGElement.cpp @@ -35,8 +35,8 @@ namespace Web::SVG { -SVGSVGElement::SVGSVGElement(DOM::Document& document, const FlyString& tag_name) - : SVGGraphicsElement(document, tag_name) +SVGSVGElement::SVGSVGElement(DOM::Document& document, const QualifiedName& qualified_name) + : SVGGraphicsElement(document, qualified_name) { } diff --git a/Libraries/LibWeb/SVG/SVGSVGElement.h b/Libraries/LibWeb/SVG/SVGSVGElement.h index a4e3e46553..82be0cada2 100644 --- a/Libraries/LibWeb/SVG/SVGSVGElement.h +++ b/Libraries/LibWeb/SVG/SVGSVGElement.h @@ -35,7 +35,7 @@ class SVGSVGElement final : public SVGGraphicsElement { public: using WrapperType = Bindings::SVGSVGElementWrapper; - SVGSVGElement(DOM::Document&, const FlyString& tag_name); + SVGSVGElement(DOM::Document&, const QualifiedName& qualified_name); virtual RefPtr create_layout_node(const CSS::StyleProperties* parent_style) override; -- cgit v1.2.3