mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Grey out invisible nodes in the DOM inspector
This makes it easier to navigate large DOM trees where some nodes have display: none
This commit is contained in:
committed by
Andreas Kling
parent
a128d4931d
commit
69fc7009bf
Notes:
sideshowbarker
2024-07-17 17:02:19 +09:00
Author: https://github.com/skyrising Commit: https://github.com/SerenityOS/serenity/commit/69fc7009bf Pull-request: https://github.com/SerenityOS/serenity/pull/13160
@@ -793,6 +793,8 @@ void Node::serialize_tree_as_json(JsonObjectSerializer<StringBuilder>& object) c
|
||||
MUST(object.add("data"sv, static_cast<DOM::Comment const&>(*this).data()));
|
||||
}
|
||||
|
||||
MUST((object.add("visible"sv, !!layout_node())));
|
||||
|
||||
if (has_child_nodes()) {
|
||||
auto children = MUST(object.add_array("children"));
|
||||
for_each_child([&children](DOM::Node& child) {
|
||||
|
||||
Reference in New Issue
Block a user