1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:37:46 +00:00

LibWeb: Implement document.elementsFromPoint

This API seems to be used by WPT for sending synthetic input events.

Implementing the naive translation of elementFromPoint to the spec steps
for this algorithm turns 4 'tests had errors unexpectedly' and 3 'tests
had timeouts unexpectedly' into 1 pass and 7 'tests had unexpected
subtest results' on the infrastructure/ subdirectory of WPT.
This commit is contained in:
Andrew Kaster 2024-02-09 13:50:44 -07:00 committed by Andrew Kaster
parent e7daa02bf2
commit 6a0fe08604
5 changed files with 104 additions and 0 deletions

View file

@ -0,0 +1,13 @@
Negative coordinates return empty array: true
Coordinates outside the viewport return empty array: true
== Elements at (500, 10) ==
<DIV id="large-box" >
<HTML >
== FIXME: Elements at (550, 60) ==
<DIV id="small-box" >
<DIV id="large-box" >
<DIV id="large-box" >
<DIV id="large-box" >
<DIV id="small-box" >
<PRE id="out" >
<HTML >