1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:07:46 +00:00

LibWeb: Move DOM::Document factory functions out of line

This commit is contained in:
Andreas Kling 2022-08-01 22:50:31 +02:00
parent 50d951aea2
commit b838f2029b
2 changed files with 12 additions and 9 deletions

View file

@ -74,6 +74,16 @@
namespace Web::DOM {
NonnullRefPtr<Document> Document::create_with_global_object(Bindings::WindowObject&)
{
return Document::create();
}
NonnullRefPtr<Document> 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<CSS::StyleComputer>(*this))