diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-09 20:17:01 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-09 20:17:01 +0200 |
commit | fc5386793708b7d5d1694f2914b1f62326f74ebd (patch) | |
tree | 3985c9c2ef5f8e5976131e76a98894bd3f82f306 /Libraries/LibHTML/Dump.cpp | |
parent | 850955053f55a97f932976783db8e7b2f19ee5f1 (diff) | |
download | serenity-fc5386793708b7d5d1694f2914b1f62326f74ebd.zip |
LibHTML: Add basic <!DOCTYPE> parsing and a DocumentType class
Plus, Document::fixup() will now make sure that the document always
starts with a doctype node, followed by an <html> element.
Diffstat (limited to 'Libraries/LibHTML/Dump.cpp')
-rw-r--r-- | Libraries/LibHTML/Dump.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibHTML/Dump.cpp b/Libraries/LibHTML/Dump.cpp index 82458f44b0..6533b58774 100644 --- a/Libraries/LibHTML/Dump.cpp +++ b/Libraries/LibHTML/Dump.cpp @@ -1,6 +1,7 @@ #include <AK/Utf8View.h> #include <LibHTML/CSS/StyleSheet.h> #include <LibHTML/DOM/Document.h> +#include <LibHTML/DOM/DocumentType.h> #include <LibHTML/DOM/Element.h> #include <LibHTML/DOM/Text.h> #include <LibHTML/Dump.h> @@ -24,6 +25,8 @@ void dump_tree(const Node& node) dbgprintf(">\n"); } else if (is<Text>(node)) { dbgprintf("\"%s\"\n", static_cast<const Text&>(node).data().characters()); + } else if (is<DocumentType>(node)) { + dbgprintf("<!DOCTYPE>\n"); } ++indent; if (is<ParentNode>(node)) { |