mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:07:44 +00:00
LibWeb: Make dump_tree() look okay for DocumentFragments
This commit is contained in:
parent
a32f3b29a3
commit
5b87043221
1 changed files with 3 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
||||||
#include <LibWeb/CSS/StyleSheet.h>
|
#include <LibWeb/CSS/StyleSheet.h>
|
||||||
#include <LibWeb/DOM/Comment.h>
|
#include <LibWeb/DOM/Comment.h>
|
||||||
#include <LibWeb/DOM/Document.h>
|
#include <LibWeb/DOM/Document.h>
|
||||||
|
#include <LibWeb/DOM/DocumentFragment.h>
|
||||||
#include <LibWeb/DOM/DocumentType.h>
|
#include <LibWeb/DOM/DocumentType.h>
|
||||||
#include <LibWeb/DOM/Element.h>
|
#include <LibWeb/DOM/Element.h>
|
||||||
#include <LibWeb/DOM/Text.h>
|
#include <LibWeb/DOM/Text.h>
|
||||||
|
@ -59,6 +60,8 @@ void dump_tree(const Node& node)
|
||||||
dbgprintf("<!DOCTYPE>\n");
|
dbgprintf("<!DOCTYPE>\n");
|
||||||
} else if (is<Comment>(node)) {
|
} else if (is<Comment>(node)) {
|
||||||
dbgprintf("<!--%s-->\n", to<Comment>(node).data().characters());
|
dbgprintf("<!--%s-->\n", to<Comment>(node).data().characters());
|
||||||
|
} else if (is<DocumentFragment>(node)) {
|
||||||
|
dbgprintf("#document-fragment\n");
|
||||||
}
|
}
|
||||||
++indent;
|
++indent;
|
||||||
if (is<ParentNode>(node)) {
|
if (is<ParentNode>(node)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue