1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:18:12 +00:00

LibWeb: Make dump_tree() look okay for DocumentFragments

This commit is contained in:
Andreas Kling 2020-03-25 18:49:29 +01:00
parent a32f3b29a3
commit 5b87043221

View file

@ -29,6 +29,7 @@
#include <LibWeb/CSS/StyleSheet.h>
#include <LibWeb/DOM/Comment.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/DocumentFragment.h>
#include <LibWeb/DOM/DocumentType.h>
#include <LibWeb/DOM/Element.h>
#include <LibWeb/DOM/Text.h>
@ -59,6 +60,8 @@ void dump_tree(const Node& node)
dbgprintf("<!DOCTYPE>\n");
} else if (is<Comment>(node)) {
dbgprintf("<!--%s-->\n", to<Comment>(node).data().characters());
} else if (is<DocumentFragment>(node)) {
dbgprintf("#document-fragment\n");
}
++indent;
if (is<ParentNode>(node)) {