From 3c3ae3a768e96e255600bed2575545aa80759c03 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 18 Sep 2022 00:53:26 +0200 Subject: [PATCH] LibWeb: Only uppercase qualified names in HTML documents This takes care of an old FIXME now that we can distinguish between HTML and non-HTML documents. --- Userland/Libraries/LibWeb/DOM/Element.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index 37219fb37d..9559163446 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -545,7 +545,7 @@ CSS::CSSStyleDeclaration* Element::style_for_bindings() void Element::make_html_uppercased_qualified_name() { // This is allowed by the spec: "User agents could optimize qualified name and HTML-uppercased qualified name by storing them in internal slots." - if (namespace_() == Namespace::HTML /* FIXME: and its node document is an HTML document */) + if (namespace_() == Namespace::HTML && document().document_type() == Document::Type::HTML) m_html_uppercased_qualified_name = qualified_name().to_uppercase(); else m_html_uppercased_qualified_name = qualified_name();