Skip to content

Commit

Permalink
LibWeb: Only uppercase qualified names in HTML documents
Browse files Browse the repository at this point in the history
This takes care of an old FIXME now that we can distinguish between HTML
and non-HTML documents.
  • Loading branch information
awesomekling committed Sep 17, 2022
1 parent dc6e625 commit 3c3ae3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/DOM/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3c3ae3a

Please sign in to comment.