mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:32:45 +00:00 
			
		
		
		
	 28b771560a
			
		
	
	
		28b771560a
		
	
	
	
	
		
			
			This makes SVG-in-HTML behave quite a bit better by following general replaced layout rules. It also turns <svg> elements into inline-level boxes instead of block-level boxes.
		
			
				
	
	
		
			16 lines
		
	
	
	
		
			333 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			333 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibWeb/Layout/SVGBox.h>
 | |
| 
 | |
| namespace Web::Layout {
 | |
| 
 | |
| SVGBox::SVGBox(DOM::Document& document, SVG::SVGElement& element, NonnullRefPtr<CSS::StyleProperties> style)
 | |
|     : Box(document, &element, move(style))
 | |
| {
 | |
| }
 | |
| 
 | |
| }
 |