mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibWebView: Fix capitalization in devtools
This commit is contained in:
parent
64eeda6450
commit
31b20e38ee
Notes:
github-actions[bot]
2025-01-11 21:29:49 +00:00
Author: https://github.com/Psychpsyo Commit: https://github.com/LadybirdBrowser/ladybird/commit/31b20e38ee9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3227 Reviewed-by: https://github.com/trflynn89
2 changed files with 6 additions and 1 deletions
|
@ -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) {
|
||||
|
|
|
@ -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><</span>"sv);
|
||||
|
|
Loading…
Add table
Reference in a new issue