mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:07:44 +00: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 {
|
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)
|
Document::Document(const AK::URL& url)
|
||||||
: ParentNode(*this, NodeType::DOCUMENT_NODE)
|
: ParentNode(*this, NodeType::DOCUMENT_NODE)
|
||||||
, m_style_computer(make<CSS::StyleComputer>(*this))
|
, m_style_computer(make<CSS::StyleComputer>(*this))
|
||||||
|
|
|
@ -51,15 +51,8 @@ public:
|
||||||
HTML
|
HTML
|
||||||
};
|
};
|
||||||
|
|
||||||
static NonnullRefPtr<Document> create(const AK::URL& url = "about:blank"sv)
|
static NonnullRefPtr<Document> create(AK::URL const& url = "about:blank"sv);
|
||||||
{
|
static NonnullRefPtr<Document> create_with_global_object(Bindings::WindowObject&);
|
||||||
return adopt_ref(*new Document(url));
|
|
||||||
}
|
|
||||||
static NonnullRefPtr<Document> create_with_global_object(Bindings::WindowObject&)
|
|
||||||
{
|
|
||||||
return Document::create();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~Document() override;
|
virtual ~Document() override;
|
||||||
|
|
||||||
size_t next_layout_node_serial_id(Badge<Layout::Node>) { return m_next_layout_node_serial_id++; }
|
size_t next_layout_node_serial_id(Badge<Layout::Node>) { return m_next_layout_node_serial_id++; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue