mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:52:45 +00:00 
			
		
		
		
	 92c08ad4ac
			
		
	
	
		92c08ad4ac
		
	
	
	
	
		
			
			Instead of trying to layout SVG boxes as if they are regular CSS boxes, let's invent an "SVG formatting context" and let it manage SVG boxes. To facilitate this, Layout::SVGBox no longer inherits from ReplacedBox, and is instead a simple, "inline-block" style BlockBox.
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			442 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			442 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibWeb/Forward.h>
 | |
| #include <LibWeb/Layout/FormattingContext.h>
 | |
| 
 | |
| namespace Web::Layout {
 | |
| 
 | |
| class SVGFormattingContext : public FormattingContext {
 | |
| public:
 | |
|     explicit SVGFormattingContext(Box&, FormattingContext* parent);
 | |
|     ~SVGFormattingContext();
 | |
| 
 | |
|     virtual void run(Box&, LayoutMode) override;
 | |
| };
 | |
| 
 | |
| }
 |