mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
LibWebView: Drop angle brackets from elements/comments in DOM inspector
This change drops the angle brackets around elements in the devtools DOM inspector, and also drops the similar delimiters around comments It also adds a “title” element tooltip to comments — so that when you hover over some comment text, the UI shows “comment” (to make it more obvious that what you’re reading is comment, and not a text node).
This commit is contained in:
parent
98dadb0ce6
commit
bd402b4b60
1 changed files with 1 additions and 5 deletions
|
@ -610,9 +610,7 @@ String InspectorClient::generate_dom_tree(JsonObject const& dom_tree)
|
|||
comment = escape_html_entities(comment);
|
||||
|
||||
builder.appendff("<span class=\"hoverable comment\" {}>", data_attributes.string_view());
|
||||
builder.append("<span><!--</span>"sv);
|
||||
builder.appendff("<span data-node-type=\"comment\" class=\"editable\">{}</span>", comment);
|
||||
builder.append("<span>--></span>"sv);
|
||||
builder.appendff("<span data-node-type=\"comment\" class=\"editable\" title=\"comment\">{}</span>", comment);
|
||||
builder.append("</span>"sv);
|
||||
return;
|
||||
}
|
||||
|
@ -639,7 +637,6 @@ String InspectorClient::generate_dom_tree(JsonObject const& dom_tree)
|
|||
auto tag = name.to_lowercase();
|
||||
|
||||
builder.appendff("<span class=\"hoverable\" {}>", data_attributes.string_view());
|
||||
builder.append("<span><</span>"sv);
|
||||
builder.appendff("<span data-node-type=\"tag\" data-tag=\"{0}\" class=\"editable tag\">{0}</span>", tag);
|
||||
|
||||
if (auto attributes = node.get_object("attributes"sv); attributes.has_value()) {
|
||||
|
@ -658,7 +655,6 @@ String InspectorClient::generate_dom_tree(JsonObject const& dom_tree)
|
|||
});
|
||||
}
|
||||
|
||||
builder.append("<span>></span>"sv);
|
||||
builder.append("</span>"sv);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue