mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:58:12 +00:00
LibHTML: Add DocumentFragment
Right now this is just a simple ParentNode subclass with its node type being DOCUMENT_FRAGMENT_NODE.
This commit is contained in:
parent
26493a3039
commit
f404a1dc16
2 changed files with 21 additions and 0 deletions
|
@ -13,6 +13,7 @@ enum class NodeType : unsigned {
|
|||
COMMENT_NODE = 8,
|
||||
DOCUMENT_NODE = 9,
|
||||
DOCUMENT_TYPE_NODE = 10,
|
||||
DOCUMENT_FRAGMENT_NODE = 11,
|
||||
};
|
||||
|
||||
class Document;
|
||||
|
@ -35,6 +36,7 @@ public:
|
|||
bool is_document_type() const { return type() == NodeType::DOCUMENT_TYPE_NODE; }
|
||||
bool is_comment() const { return type() == NodeType::COMMENT_NODE; }
|
||||
bool is_character_data() const { return type() == NodeType::TEXT_NODE || type() == NodeType::COMMENT_NODE; }
|
||||
bool is_document_fragment() const { return type() == NodeType::DOCUMENT_FRAGMENT_NODE; }
|
||||
bool is_parent_node() const { return is_element() || is_document(); }
|
||||
|
||||
virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue