mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:42:44 +00:00 
			
		
		
		
	 4d401bf796
			
		
	
	
		4d401bf796
		
	
	
	
	
		
			
			This simplifies the ownership model between DOM/layout/paint nodes immensely by deferring to the garbage collector for figuring out what's live and what's not.
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			807 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			807 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
 | |
|  * Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibWeb/DOM/Document.h>
 | |
| #include <LibWeb/DOM/Element.h>
 | |
| #include <LibWeb/Layout/BlockContainer.h>
 | |
| #include <LibWeb/Layout/InlineFormattingContext.h>
 | |
| #include <LibWeb/Layout/InlineNode.h>
 | |
| #include <LibWeb/Painting/InlinePaintable.h>
 | |
| 
 | |
| namespace Web::Layout {
 | |
| 
 | |
| InlineNode::InlineNode(DOM::Document& document, DOM::Element* element, NonnullRefPtr<CSS::StyleProperties> style)
 | |
|     : Layout::NodeWithStyleAndBoxModelMetrics(document, element, move(style))
 | |
| {
 | |
| }
 | |
| 
 | |
| InlineNode::~InlineNode() = default;
 | |
| 
 | |
| JS::GCPtr<Painting::Paintable> InlineNode::create_paintable() const
 | |
| {
 | |
|     return Painting::InlinePaintable::create(*this);
 | |
| }
 | |
| 
 | |
| }
 |