mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +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
4
Tests/LibWeb/Text/expected/DOM/Elements-from-point-2.txt
Normal file
4
Tests/LibWeb/Text/expected/DOM/Elements-from-point-2.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
hello <DIV id="c" >
|
||||
<DIV id="b" >
|
||||
<DIV id="a" >
|
||||
<HTML >
|
1
Tests/LibWeb/Text/expected/DOM/Elements-from-point-3.txt
Normal file
1
Tests/LibWeb/Text/expected/DOM/Elements-from-point-3.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Some text Elements at point 30, 20: p < div < body < html
|
|
@ -3,11 +3,9 @@ Coordinates outside the viewport return empty array: true
|
|||
== Elements at (500, 10) ==
|
||||
<DIV id="large-box" >
|
||||
<HTML >
|
||||
== FIXME: Elements at (550, 60) ==
|
||||
== Elements at (550, 60) ==
|
||||
<DIV id="small-box" >
|
||||
<PRE id="out" >
|
||||
<PRE id="out" >
|
||||
<DIV id="large-box" >
|
||||
<DIV id="small-box" >
|
||||
<PRE id="out" >
|
||||
<BODY >
|
||||
<HTML >
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue