From 99acbbe86b45c0eaa88e9e646844ba561685de6a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 11 Oct 2020 21:24:14 +0200 Subject: LibWeb: Remove unused Document::fixup() This was some naive fixup mechanism we used before implementing a spec compliant HTML parser. --- Libraries/LibWeb/DOM/Document.cpp | 15 --------------- Libraries/LibWeb/DOM/Document.h | 2 -- 2 files changed, 17 deletions(-) (limited to 'Libraries/LibWeb') diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp index efb64b68e5..0a999ea6e9 100644 --- a/Libraries/LibWeb/DOM/Document.cpp +++ b/Libraries/LibWeb/DOM/Document.cpp @@ -108,21 +108,6 @@ bool Document::is_child_allowed(const Node& node) const } } -void Document::fixup() -{ - if (!first_child() || !is(*first_child())) - prepend_child(adopt(*new DocumentType(*this))); - - if (is(first_child()->next_sibling())) - return; - - auto body = create_element("body"); - auto html = create_element("html"); - html->append_child(body); - this->donate_all_children_to(body); - this->append_child(html); -} - const Element* Document::document_element() const { return first_child_of_type(); diff --git a/Libraries/LibWeb/DOM/Document.h b/Libraries/LibWeb/DOM/Document.h index 31d2da63d4..1a7455d515 100644 --- a/Libraries/LibWeb/DOM/Document.h +++ b/Libraries/LibWeb/DOM/Document.h @@ -69,8 +69,6 @@ public: URL complete_url(const String&) const; - void fixup(); - CSS::StyleResolver& style_resolver() { return *m_style_resolver; } const CSS::StyleResolver& style_resolver() const { return *m_style_resolver; } -- cgit v1.2.3