mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:17:44 +00:00
LibWeb+WebContent: Modify did_request_scroll() IPC to take x&y deltas
This is in preparation for implementing JS scrolling functions, which specify both x and y scrolling deltas. The visible behavior has not changed. Also, moved the "mouse wheel delta * 20" calculation to the `EventHandler` since the JS calls will want to work directly in pixels.
This commit is contained in:
parent
92a3318375
commit
a09219159c
9 changed files with 13 additions and 12 deletions
|
@ -125,7 +125,7 @@ bool EventHandler::handle_mousewheel(const Gfx::IntPoint& position, unsigned int
|
|||
}
|
||||
|
||||
if (auto* page = m_frame.page()) {
|
||||
page->client().page_did_request_scroll(wheel_delta);
|
||||
page->client().page_did_request_scroll(0, wheel_delta * 20);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
virtual void page_did_invalidate(const Gfx::IntRect&) { }
|
||||
virtual void page_did_change_favicon(const Gfx::Bitmap&) { }
|
||||
virtual void page_did_layout() { }
|
||||
virtual void page_did_request_scroll(int) { }
|
||||
virtual void page_did_request_scroll(i32, i32) { }
|
||||
virtual void page_did_request_scroll_into_view(const Gfx::IntRect&) { }
|
||||
virtual void page_did_request_alert(const String&) { }
|
||||
virtual bool page_did_request_confirm(const String&) { return false; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue