mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
LibWeb: Move DOM::Document factory functions out of line
This commit is contained in:
parent
50d951aea2
commit
b838f2029b
2 changed files with 12 additions and 9 deletions
|
@ -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))
|
||||
|
|
|
@ -51,15 +51,8 @@ public:
|
|||
HTML
|
||||
};
|
||||
|
||||
static NonnullRefPtr<Document> create(const AK::URL& url = "about:blank"sv)
|
||||
{
|
||||
return adopt_ref(*new Document(url));
|
||||
}
|
||||
static NonnullRefPtr<Document> create_with_global_object(Bindings::WindowObject&)
|
||||
{
|
||||
return Document::create();
|
||||
}
|
||||
|
||||
static NonnullRefPtr<Document> create(AK::URL const& url = "about:blank"sv);
|
||||
static NonnullRefPtr<Document> create_with_global_object(Bindings::WindowObject&);
|
||||
virtual ~Document() override;
|
||||
|
||||
size_t next_layout_node_serial_id(Badge<Layout::Node>) { return m_next_layout_node_serial_id++; }
|
||||
|
|
Loading…
Add table
Reference in a new issue