From d5e3a557fdf804c2e394e67e3dcc2db70d60bd7e Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 11 Jan 2025 16:31:36 -0500 Subject: [PATCH] LibWebView: Avoid replication of the HTML namespace string Now that we can use these string constants, let's avoid the replication. --- Libraries/LibWebView/InspectorClient.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWebView/InspectorClient.cpp b/Libraries/LibWebView/InspectorClient.cpp index 98c7ace4a3c0..9b3cb4c34d91 100644 --- a/Libraries/LibWebView/InspectorClient.cpp +++ b/Libraries/LibWebView/InspectorClient.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -634,7 +635,7 @@ String InspectorClient::generate_dom_tree(JsonObject const& dom_tree) m_body_or_frameset_node_id = node_id; auto tag = name; - if (node.get_byte_string("namespace"sv) == "http://www.w3.org/1999/xhtml") + if (node.get_byte_string("namespace"sv) == Web::Namespace::HTML.bytes_as_string_view()) tag = tag.to_lowercase(); builder.appendff("", data_attributes.string_view());