LibWebView: Fix capitalization in devtools

This commit is contained in:
Psychpsyo 2025-01-11 16:14:07 +01:00 committed by Tim Flynn
parent 64eeda6450
commit 31b20e38ee
Notes: github-actions[bot] 2025-01-11 21:29:49 +00:00
2 changed files with 6 additions and 1 deletions

View file

@ -1544,6 +1544,9 @@ void Node::serialize_tree_as_json(JsonObjectSerializer<StringBuilder>& object) c
MUST(object.add("type"sv, "element"));
auto const* element = static_cast<DOM::Element const*>(this);
if (element->namespace_uri().has_value())
MUST(object.add("namespace"sv, element->namespace_uri().value()));
if (element->has_attributes()) {
auto attributes = MUST(object.add_object("attributes"sv));
element->for_each_attribute([&attributes](auto& name, auto& value) {

View file

@ -633,7 +633,9 @@ String InspectorClient::generate_dom_tree(JsonObject const& dom_tree)
if (name.equals_ignoring_ascii_case("BODY"sv) || name.equals_ignoring_ascii_case("FRAMESET"sv))
m_body_or_frameset_node_id = node_id;
auto tag = name.to_lowercase();
auto tag = name;
if (node.get_byte_string("namespace"sv) == "http://www.w3.org/1999/xhtml")
tag = tag.to_lowercase();
builder.appendff("<span class=\"hoverable\" {}>", data_attributes.string_view());
builder.append("<span>&lt;</span>"sv);