1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:37:45 +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

@ -567,6 +567,7 @@ public:
WebIDL::ExceptionOr<void> set_design_mode(String const&);
Element const* element_from_point(double x, double y);
Vector<JS::NonnullGCPtr<Element>> elements_from_point(double x, double y);
void set_needs_to_resolve_paint_only_properties() { m_needs_to_resolve_paint_only_properties = true; }