diff options
author | Andreas Kling <kling@serenityos.org> | 2023-03-08 15:09:16 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-03-09 21:54:59 +0100 |
commit | 9eb80254639e4a46e52a2dbf5bce425a9aa6a113 (patch) | |
tree | 2c4b5a328240609cb34550adb8d9239da2df50b6 | |
parent | d517e7fb3a81ee3b46dd6863ef978beeed9ecfc8 (diff) | |
download | serenity-9eb80254639e4a46e52a2dbf5bce425a9aa6a113.zip |
LibWeb: Always include shadow roots in DOM debug dumps
-rw-r--r-- | Userland/Libraries/LibWeb/Dump.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Dump.cpp b/Userland/Libraries/LibWeb/Dump.cpp index 4c7df52cb2..dd9ce84976 100644 --- a/Userland/Libraries/LibWeb/Dump.cpp +++ b/Userland/Libraries/LibWeb/Dump.cpp @@ -63,8 +63,10 @@ void dump_tree(StringBuilder& builder, DOM::Node const& node) builder.appendff("{}\n", node.node_name()); } ++indent; - if (is<DOM::Element>(node) && verify_cast<DOM::Element>(node).shadow_root()) { - dump_tree(builder, *verify_cast<DOM::Element>(node).shadow_root()); + if (is<DOM::Element>(node)) { + if (auto* shadow_root = static_cast<DOM::Element const&>(node).shadow_root_internal()) { + dump_tree(builder, *shadow_root); + } } if (is<DOM::ParentNode>(node)) { if (!is<HTML::HTMLTemplateElement>(node)) { |