LibWeb: Add internals.mouseDown(x, y)

This triggers a mouse button press without the up event, allowing us to
e.g. simulate a selection by moving the mouse while keeping the button
depressed.
This commit is contained in:
Jelle Raaijmakers 2024-12-06 16:29:40 +01:00 committed by Jelle Raaijmakers
commit 15e3db5932
Notes: github-actions[bot] 2024-12-10 13:55:25 +00:00
3 changed files with 15 additions and 0 deletions

View file

@ -32,6 +32,7 @@ public:
void click(double x, double y);
void doubleclick(double x, double y);
void middle_click(double x, double y);
void mouse_down(double x, double y);
void move_pointer_to(double x, double y);
void wheel(double x, double y, double delta_x, double delta_y);
@ -59,6 +60,7 @@ private:
virtual void initialize(JS::Realm&) override;
void click(double x, double y, UIEvents::MouseButton);
void mouse_down(double x, double y, UIEvents::MouseButton);
HTML::Window& internals_window() const;
Page& internals_page() const;