mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:22:45 +00:00 
			
		
		
		
	LibWeb: Make Element::recompute_style() really compare properties
It's not enough to compare StyleProperties pointers to see if something changed, we have to do a deep compare.
This commit is contained in:
		
							parent
							
								
									1223c88e68
								
							
						
					
					
						commit
						201afb50c7
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -271,13 +271,12 @@ void Element::recompute_style() | |||
| { | ||||
|     set_needs_style_update(false); | ||||
|     VERIFY(parent()); | ||||
|     auto old_specified_css_values = m_specified_css_values; | ||||
|     auto new_specified_css_values = document().style_computer().compute_style(*this); | ||||
| 
 | ||||
|     if (old_specified_css_values == new_specified_css_values) | ||||
|     if (m_specified_css_values && *m_specified_css_values == *new_specified_css_values) | ||||
|         return; | ||||
| 
 | ||||
|     m_specified_css_values = new_specified_css_values; | ||||
|     m_specified_css_values = move(new_specified_css_values); | ||||
| 
 | ||||
|     document().invalidate_layout(); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling