mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.
This commit is contained in:
parent
77b9fa89dd
commit
90b1354688
188 changed files with 562 additions and 562 deletions
|
@ -36,7 +36,7 @@ void Document::build_layout_tree()
|
|||
create_layout_tree_for_node(*this);
|
||||
}
|
||||
|
||||
RetainPtr<LayoutNode> Document::create_layout_node()
|
||||
RefPtr<LayoutNode> Document::create_layout_node()
|
||||
{
|
||||
return adopt(*new LayoutDocument(*this));
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ public:
|
|||
Document();
|
||||
virtual ~Document() override;
|
||||
|
||||
virtual RetainPtr<LayoutNode> create_layout_node() override;
|
||||
virtual RefPtr<LayoutNode> create_layout_node() override;
|
||||
|
||||
void build_layout_tree();
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ void Element::set_attributes(Vector<Attribute>&& attributes)
|
|||
m_attributes = move(attributes);
|
||||
}
|
||||
|
||||
RetainPtr<LayoutNode> Element::create_layout_node()
|
||||
RefPtr<LayoutNode> Element::create_layout_node()
|
||||
{
|
||||
if (m_tag_name == "html")
|
||||
return adopt(*new LayoutBlock(*this));
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
callback(attribute.name(), attribute.value());
|
||||
}
|
||||
|
||||
virtual RetainPtr<LayoutNode> create_layout_node() override;
|
||||
virtual RefPtr<LayoutNode> create_layout_node() override;
|
||||
|
||||
private:
|
||||
Attribute* find_attribute(const String& name);
|
||||
|
|
|
@ -23,12 +23,12 @@ void Node::deref()
|
|||
delete this;
|
||||
}
|
||||
|
||||
RetainPtr<LayoutNode> Node::create_layout_node()
|
||||
RefPtr<LayoutNode> Node::create_layout_node()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Node::set_layout_node(Retained<LayoutNode> layout_node)
|
||||
void Node::set_layout_node(NonnullRefPtr<LayoutNode> layout_node)
|
||||
{
|
||||
m_layout_node = move(layout_node);
|
||||
}
|
||||
|
|
|
@ -41,12 +41,12 @@ public:
|
|||
void set_next_sibling(Node* node) { m_next_sibling = node; }
|
||||
void set_previous_sibling(Node* node) { m_previous_sibling = node; }
|
||||
|
||||
virtual RetainPtr<LayoutNode> create_layout_node();
|
||||
virtual RefPtr<LayoutNode> create_layout_node();
|
||||
|
||||
const LayoutNode* layout_node() const { return m_layout_node; }
|
||||
LayoutNode* layout_node() { return m_layout_node; }
|
||||
|
||||
void set_layout_node(Retained<LayoutNode>);
|
||||
void set_layout_node(NonnullRefPtr<LayoutNode>);
|
||||
|
||||
protected:
|
||||
explicit Node(NodeType);
|
||||
|
@ -56,5 +56,5 @@ protected:
|
|||
ParentNode* m_parent_node { nullptr };
|
||||
Node* m_next_sibling { nullptr };
|
||||
Node* m_previous_sibling { nullptr };
|
||||
RetainPtr<LayoutNode> m_layout_node;
|
||||
RefPtr<LayoutNode> m_layout_node;
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <LibHTML/DOM/ParentNode.h>
|
||||
|
||||
void ParentNode::append_child(Retained<Node> node)
|
||||
void ParentNode::append_child(NonnullRefPtr<Node> node)
|
||||
{
|
||||
if (m_last_child)
|
||||
m_last_child->set_next_sibling(node.ptr());
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
class ParentNode : public Node {
|
||||
public:
|
||||
void append_child(Retained<Node>);
|
||||
void append_child(NonnullRefPtr<Node>);
|
||||
|
||||
Node* first_child() { return m_first_child; }
|
||||
Node* last_child() { return m_last_child; }
|
||||
|
|
|
@ -11,7 +11,7 @@ Text::~Text()
|
|||
{
|
||||
}
|
||||
|
||||
RetainPtr<LayoutNode> Text::create_layout_node()
|
||||
RefPtr<LayoutNode> Text::create_layout_node()
|
||||
{
|
||||
return adopt(*new LayoutText(*this));
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ public:
|
|||
|
||||
const String& data() const { return m_data; }
|
||||
|
||||
virtual RetainPtr<LayoutNode> create_layout_node() override;
|
||||
virtual RefPtr<LayoutNode> create_layout_node() override;
|
||||
|
||||
private:
|
||||
String m_data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue