mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibHTML: Make sure every DOM Node belongs to a Document
This commit is contained in:
parent
13860e4dd8
commit
1b8509a0c9
Notes:
sideshowbarker
2024-07-19 11:53:57 +09:00
Author: https://github.com/awesomekling
Commit: 1b8509a0c9
9 changed files with 28 additions and 22 deletions
|
@ -13,6 +13,7 @@ enum class NodeType : unsigned {
|
|||
DOCUMENT_NODE = 9,
|
||||
};
|
||||
|
||||
class Document;
|
||||
class ParentNode;
|
||||
class LayoutNode;
|
||||
class StyleResolver;
|
||||
|
@ -33,8 +34,12 @@ public:
|
|||
|
||||
virtual String tag_name() const = 0;
|
||||
|
||||
protected:
|
||||
explicit Node(NodeType);
|
||||
Document& document() { return m_document; }
|
||||
const Document& document() const { return m_document; }
|
||||
|
||||
protected:
|
||||
Node(Document&, NodeType);
|
||||
|
||||
Document& m_document;
|
||||
NodeType m_type { NodeType::INVALID };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue