summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-10-11 21:24:14 +0200
committerAndreas Kling <kling@serenityos.org>2020-10-11 21:24:14 +0200
commit99acbbe86b45c0eaa88e9e646844ba561685de6a (patch)
treec4a346bcdd1c72d3c9cf1c5e18e830161eccbec1 /Libraries/LibWeb
parentac8fe3d0625ffc95f9b042e990b122ccf5abe2d3 (diff)
downloadserenity-99acbbe86b45c0eaa88e9e646844ba561685de6a.zip
LibWeb: Remove unused Document::fixup()
This was some naive fixup mechanism we used before implementing a spec compliant HTML parser.
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r--Libraries/LibWeb/DOM/Document.cpp15
-rw-r--r--Libraries/LibWeb/DOM/Document.h2
2 files changed, 0 insertions, 17 deletions
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<DocumentType>(*first_child()))
- prepend_child(adopt(*new DocumentType(*this)));
-
- if (is<HTML::HTMLHtmlElement>(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<Element>();
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; }