mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Add a test to ensure "resize" event on VV is fired on pinch-zoom
This commit is contained in:
parent
835081d66e
commit
0fbadba2e1
Notes:
github-actions[bot]
2025-10-10 13:39:06 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 0fbadba2e1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6430
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/konradekk
5 changed files with 29 additions and 0 deletions
|
|
@ -224,6 +224,13 @@ void Internals::wheel(double x, double y, double delta_x, double delta_y)
|
|||
page.handle_mousewheel(position, position, 0, 0, 0, delta_x, delta_y);
|
||||
}
|
||||
|
||||
void Internals::pinch(double x, double y, double scale_delta)
|
||||
{
|
||||
auto& page = this->page();
|
||||
auto position = page.css_to_device_point({ x, y });
|
||||
page.handle_pinch_event(position, scale_delta);
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<bool> Internals::dispatch_user_activated_event(DOM::EventTarget& target, DOM::Event& event)
|
||||
{
|
||||
event.set_is_trusted(true);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ public:
|
|||
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);
|
||||
void pinch(double x, double y, double scale_delta);
|
||||
|
||||
WebIDL::ExceptionOr<bool> dispatch_user_activated_event(DOM::EventTarget&, DOM::Event& event);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ interface Internals {
|
|||
undefined mouseDown(double x, double y);
|
||||
undefined movePointerTo(double x, double y);
|
||||
undefined wheel(double x, double y, double deltaX, double deltaY);
|
||||
undefined pinch(double x, double y, double scaleDelta);
|
||||
|
||||
boolean dispatchUserActivatedEvent(EventTarget target, Event event);
|
||||
undefined spoofCurrentURL(USVString url);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue