mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 07:42:43 +00:00 
			
		
		
		
	 f4f5ede10a
			
		
	
	
		f4f5ede10a
		
	
	
	
	
		
			
			There's no need to pass the StyleResolver to this function. Nodes that need it can just get it from the document.
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			466 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			466 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <AK/String.h>
 | |
| #include <LibHTML/DOM/CharacterData.h>
 | |
| 
 | |
| class Text final : public CharacterData {
 | |
| public:
 | |
|     explicit Text(Document&, const String&);
 | |
|     virtual ~Text() override;
 | |
| 
 | |
|     virtual String tag_name() const override { return "#text"; }
 | |
| 
 | |
| private:
 | |
|     virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;
 | |
| };
 | |
| 
 | |
| template<>
 | |
| inline bool is<Text>(const Node& node)
 | |
| {
 | |
|     return node.is_text();
 | |
| }
 |