mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 00:48:11 +00:00
LibHTML: Add a simple TreeNode<T> template for making trees.
We'll be making a lot of trees here, so let's share code during bootstrap. Eventually some of these classes are gonna want custom trees but for now we can just fit them all into the same clothes.
This commit is contained in:
parent
e9b619c4aa
commit
8adae51b35
8 changed files with 68 additions and 109 deletions
|
@ -10,19 +10,6 @@ Node::~Node()
|
|||
{
|
||||
}
|
||||
|
||||
void Node::ref()
|
||||
{
|
||||
ASSERT(m_retain_count);
|
||||
++m_retain_count;
|
||||
}
|
||||
|
||||
void Node::deref()
|
||||
{
|
||||
ASSERT(m_retain_count);
|
||||
if (!--m_retain_count)
|
||||
delete this;
|
||||
}
|
||||
|
||||
RefPtr<LayoutNode> Node::create_layout_node()
|
||||
{
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue