mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:42:45 +00:00 
			
		
		
		
	LibWeb: Let subframes propagate paint invalidations via host element
When a paint invalidation occurs inside a subframe, it bubbles up to Frame::set_needs_display(). From there, we call PageView if this is the main frame, or otherwise invalidate the subframe host element.
This commit is contained in:
		
							parent
							
								
									59f9b32a44
								
							
						
					
					
						commit
						3ae3729b4e
					
				
					 5 changed files with 30 additions and 17 deletions
				
			
		|  | @ -93,9 +93,14 @@ void Frame::set_needs_display(const Gfx::Rect& rect) | |||
|     if (!m_viewport_rect.intersects(rect)) | ||||
|         return; | ||||
| 
 | ||||
|     if (!on_set_needs_display) | ||||
|     if (is_main_frame()) { | ||||
|         if (page_view()) | ||||
|             page_view()->notify_needs_display({}, *this, rect); | ||||
|         return; | ||||
|     on_set_needs_display(rect); | ||||
|     } | ||||
| 
 | ||||
|     if (host_element() && host_element()->layout_node()) | ||||
|         host_element()->layout_node()->set_needs_display(); | ||||
| } | ||||
| 
 | ||||
| void Frame::did_scroll(Badge<PageView>) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling