mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibWeb: Fix out-of-order DOM tree dumps
There were a few calls to the standalone version of dump_tree() inside the recursive version of dump_tree(), which led to the output getting jumbled out of order.
This commit is contained in:
parent
678dd2d180
commit
f58f58fb77
1 changed files with 4 additions and 4 deletions
|
@ -52,16 +52,16 @@ void dump_tree(StringBuilder& builder, DOM::Node const& node)
|
|||
}
|
||||
++indent;
|
||||
if (is<DOM::Element>(node) && verify_cast<DOM::Element>(node).shadow_root()) {
|
||||
dump_tree(*verify_cast<DOM::Element>(node).shadow_root());
|
||||
dump_tree(builder, *verify_cast<DOM::Element>(node).shadow_root());
|
||||
}
|
||||
if (is<DOM::ParentNode>(node)) {
|
||||
if (!is<HTML::HTMLTemplateElement>(node)) {
|
||||
static_cast<DOM::ParentNode const&>(node).for_each_child([](auto& child) {
|
||||
dump_tree(child);
|
||||
static_cast<DOM::ParentNode const&>(node).for_each_child([&](auto& child) {
|
||||
dump_tree(builder, child);
|
||||
});
|
||||
} else {
|
||||
auto& template_element = verify_cast<HTML::HTMLTemplateElement>(node);
|
||||
dump_tree(template_element.content());
|
||||
dump_tree(builder, template_element.content());
|
||||
}
|
||||
}
|
||||
--indent;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue