mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00: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
Notes:
github-actions[bot]
2025-01-11 23:36:56 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/d5e3a557fdf Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3229 Reviewed-by: https://github.com/gmta ✅
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue