1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 16:25:07 +00:00
serenity/LibHTML/DOM/Node.cpp
Andreas Kling 77b9fa89dd AK: Rename Retainable => RefCounted.
(And various related renames that go along with it.)
2019-06-21 15:30:03 +02:00

34 lines
489 B
C++

#include <LibHTML/DOM/Node.h>
#include <LibHTML/Layout/LayoutNode.h>
Node::Node(NodeType type)
: m_type(type)
{
}
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;
}
RetainPtr<LayoutNode> Node::create_layout_node()
{
return nullptr;
}
void Node::set_layout_node(Retained<LayoutNode> layout_node)
{
m_layout_node = move(layout_node);
}