mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +00:00 
			
		
		
		
	LibWeb: Make DOM::Node::create_layout_node() not need parent's style
The StyleResolver can find the specified CSS values for the parent element via the DOM. Forcing everyone to locate specified values for their parent was completely unnecessary.
This commit is contained in:
		
							parent
							
								
									d9b2650dcc
								
							
						
					
					
						commit
						29a4da30b7
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-19 00:04:31 +09:00 
				
			
			Author: https://github.com/awesomekling
Commit: 29a4da30b7
			
					 28 changed files with 40 additions and 39 deletions
				
			
		|  | @ -84,9 +84,9 @@ void HTMLImageElement::parse_attribute(const FlyString& name, const String& valu | |||
|         m_image_loader.load(document().complete_url(value)); | ||||
| } | ||||
| 
 | ||||
| RefPtr<Layout::Node> HTMLImageElement::create_layout_node(const CSS::StyleProperties* parent_style) | ||||
| RefPtr<Layout::Node> HTMLImageElement::create_layout_node() | ||||
| { | ||||
|     auto style = document().style_resolver().resolve_style(*this, parent_style); | ||||
|     auto style = document().style_resolver().resolve_style(*this); | ||||
|     if (style->display() == CSS::Display::None) | ||||
|         return nullptr; | ||||
|     return adopt(*new Layout::ImageBox(document(), *this, move(style), m_image_loader)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling