mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:52:43 +00:00 
			
		
		
		
	 b91c49364d
			
		
	
	
		b91c49364d
		
	
	
	
	
		
			
			This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			456 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			456 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibWeb/DOM/Text.h>
 | |
| #include <LibWeb/Layout/TextNode.h>
 | |
| 
 | |
| namespace Web::DOM {
 | |
| 
 | |
| Text::Text(Document& document, const String& data)
 | |
|     : CharacterData(document, NodeType::TEXT_NODE, data)
 | |
| {
 | |
| }
 | |
| 
 | |
| Text::~Text()
 | |
| {
 | |
| }
 | |
| 
 | |
| RefPtr<Layout::Node> Text::create_layout_node()
 | |
| {
 | |
|     return adopt_ref(*new Layout::TextNode(document(), *this));
 | |
| }
 | |
| 
 | |
| }
 |