mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 11:32:43 +00:00 
			
		
		
		
	LibHTML: Make sure every DOM Node belongs to a Document
This commit is contained in:
		
							parent
							
								
									13860e4dd8
								
							
						
					
					
						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
	
	 Andreas Kling
						Andreas Kling