mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:12:43 +00:00 
			
		
		
		
	LibWeb: Do paint-order traversal in Document::elements_from_point()
Elements are now collected according to paint order as spec says, replacing the depth-first traversal of the paint tree with hit-testing on each box. This change resolves a FIXME in an existing test and adds a new previously non-working test.
This commit is contained in:
		
							parent
							
								
									9c99182b1e
								
							
						
					
					
						commit
						9d2809146f
					
				
					 7 changed files with 68 additions and 20 deletions
				
			
		|  | @ -32,15 +32,9 @@ | |||
|         for (let elem of document.elementsFromPoint(500, 10)) { | ||||
|             printElement(elem); | ||||
|         } | ||||
|         println("== FIXME: Elements at (550, 60) ==") | ||||
|         println("== Elements at (550, 60) ==") | ||||
|         for (let elem of document.elementsFromPoint(550, 60)) { | ||||
|             printElement(elem); | ||||
|         } | ||||
|         // FIXME: 550, 60 is supposed to print the following, but the algorithm is wrong. | ||||
|         // <DIV id="small-box" > | ||||
|         // <DIV id="large-box" > | ||||
|         // <PRE id="out" > | ||||
|         // <BODY > | ||||
|         // <HTML > | ||||
|     }); | ||||
| </script> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Aliaksandr Kalenik
						Aliaksandr Kalenik