mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
LibHTML: Make sure every DOM Node belongs to a Document
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
Document::Document()
|
||||
: ParentNode(NodeType::DOCUMENT_NODE)
|
||||
: ParentNode(*this, NodeType::DOCUMENT_NODE)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ void Document::normalize()
|
||||
return;
|
||||
}
|
||||
|
||||
NonnullRefPtr<Element> body = adopt(*new Element("body"));
|
||||
NonnullRefPtr<Element> html = adopt(*new Element("html"));
|
||||
NonnullRefPtr<Element> body = adopt(*new Element(*this, "body"));
|
||||
NonnullRefPtr<Element> html = adopt(*new Element(*this, "html"));
|
||||
html->append_child(body);
|
||||
this->donate_all_children_to(body);
|
||||
this->append_child(html);
|
||||
|
||||
Reference in New Issue
Block a user