mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibWeb: Remove unused Document::fixup()
This was some naive fixup mechanism we used before implementing a spec compliant HTML parser.
This commit is contained in:
parent
ac8fe3d062
commit
99acbbe86b
Notes:
sideshowbarker
2024-07-19 01:56:10 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/99acbbe86b4
2 changed files with 0 additions and 17 deletions
|
@ -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>();
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue