mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-01 05:41:01 +00:00 
			
		
		
		
	LibWeb: Use TraversalDecision for multi level Node traversal methods
				
					
				
			This adds the `SkipChildrenAndContinue` option, where traversal continues but child nodes are not included.
This commit is contained in:
		
							parent
							
								
									c57d395a48
								
							
						
					
					
						commit
						398bf10b92
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-17 08:59:18 +09:00 
				
			
			Author: https://github.com/tcl3
Commit: 398bf10b92
Pull-request: https://github.com/SerenityOS/serenity/pull/24207
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/shannonbooth ✅
			
					 33 changed files with 229 additions and 215 deletions
				
			
		|  | @ -157,15 +157,15 @@ void HTMLDetailsElement::update_shadow_tree_slots() | |||
| 
 | ||||
|     for_each_in_subtree([&](auto& child) { | ||||
|         if (&child == summary) | ||||
|             return IterationDecision::Continue; | ||||
|             return TraversalDecision::Continue; | ||||
|         if (!child.is_slottable()) | ||||
|             return IterationDecision::Continue; | ||||
|             return TraversalDecision::Continue; | ||||
| 
 | ||||
|         child.as_slottable().visit([&](auto& node) { | ||||
|             descendants_assignment.append(JS::make_handle(node)); | ||||
|         }); | ||||
| 
 | ||||
|         return IterationDecision::Continue; | ||||
|         return TraversalDecision::Continue; | ||||
|     }); | ||||
| 
 | ||||
|     m_summary_slot->assign(move(summary_assignment)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Ledbetter
						Tim Ledbetter