diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index d783433cf99..cd638ac93f6 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -74,6 +74,16 @@ namespace Web::DOM { +NonnullRefPtr Document::create_with_global_object(Bindings::WindowObject&) +{ + return Document::create(); +} + +NonnullRefPtr Document::create(AK::URL const& url) +{ + return adopt_ref(*new Document(url)); +} + Document::Document(const AK::URL& url) : ParentNode(*this, NodeType::DOCUMENT_NODE) , m_style_computer(make(*this)) diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index 21a87925dc4..51409d8dabc 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -51,15 +51,8 @@ public: HTML }; - static NonnullRefPtr create(const AK::URL& url = "about:blank"sv) - { - return adopt_ref(*new Document(url)); - } - static NonnullRefPtr create_with_global_object(Bindings::WindowObject&) - { - return Document::create(); - } - + static NonnullRefPtr create(AK::URL const& url = "about:blank"sv); + static NonnullRefPtr create_with_global_object(Bindings::WindowObject&); virtual ~Document() override; size_t next_layout_node_serial_id(Badge) { return m_next_layout_node_serial_id++; }