mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWebView: Avoid replication of the HTML namespace string
Now that we can use these string constants, let's avoid the replication.
This commit is contained in:
parent
a4324ee6e9
commit
d5e3a557fd
|
|
@ -16,6 +16,7 @@
|
|||
#include <LibCore/Resource.h>
|
||||
#include <LibJS/MarkupGenerator.h>
|
||||
#include <LibWeb/Infra/Strings.h>
|
||||
#include <LibWeb/Namespace.h>
|
||||
#include <LibWebView/Application.h>
|
||||
#include <LibWebView/CookieJar.h>
|
||||
#include <LibWebView/InspectorClient.h>
|
||||
|
|
@ -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("<span class=\"hoverable\" {}>", data_attributes.string_view());
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user