mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:32:46 +00:00 
			
		
		
		
	LibWeb: Make sure that SVG use and symbol elements get paintables
I'm about to make StackingContext traverse the paintable tree instead of actually traversing the layout tree, and it turns out we were not creating paintables for these SVG elements. Also switch them to Layout::Box instead of the default InlineNode to make the trees look a bit less weird. Ultimately, we should do something specialized for these subtrees, but for now this'll do.
This commit is contained in:
		
							parent
							
								
									3d7c880a42
								
							
						
					
					
						commit
						1e0ea45fe5
					
				
					 6 changed files with 45 additions and 13 deletions
				
			
		|  | @ -10,6 +10,7 @@ | |||
| #include <LibWeb/CSS/StyleValues/IdentifierStyleValue.h> | ||||
| #include <LibWeb/CSS/StyleValues/OverflowStyleValue.h> | ||||
| #include <LibWeb/DOM/ShadowRoot.h> | ||||
| #include <LibWeb/Layout/Box.h> | ||||
| #include <LibWeb/SVG/AttributeNames.h> | ||||
| #include <LibWeb/SVG/SVGSymbolElement.h> | ||||
| #include <LibWeb/SVG/SVGUseElement.h> | ||||
|  | @ -62,4 +63,9 @@ bool SVGSymbolElement::is_direct_child_of_use_shadow_tree() const | |||
|     return is<SVGUseElement>(host); | ||||
| } | ||||
| 
 | ||||
| JS::GCPtr<Layout::Node> SVGSymbolElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style) | ||||
| { | ||||
|     return heap().allocate_without_realm<Layout::Box>(document(), this, move(style)); | ||||
| } | ||||
| 
 | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling