mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +00:00 
			
		
		
		
	LibWeb: Remember the selection state of each LayoutNode
Instead of computing it on the fly while painting each layout node, they now remember their selection state. This avoids a whole bunch of tree traversal while painting with anything selected.
This commit is contained in:
		
							parent
							
								
									cf4870c93e
								
							
						
					
					
						commit
						d47f77169f
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-19 03:21:04 +09:00 
				
			
			Author: https://github.com/awesomekling
Commit: d47f77169f
			
					 6 changed files with 60 additions and 15 deletions
				
			
		|  | @ -110,6 +110,7 @@ void InProcessWebView::select_all() | |||
|         last_layout_node_index_in_node = downcast<LayoutText>(*last_layout_node).text_for_rendering().length() - 1; | ||||
| 
 | ||||
|     layout_root->selection().set({ first_layout_node, 0 }, { last_layout_node, last_layout_node_index_in_node }); | ||||
|     layout_root->recompute_selection_states(); | ||||
|     update(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling