mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 10:57:36 +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
|
@ -104,9 +104,9 @@ void PageHost::page_did_change_title(const String& title)
|
|||
m_client.async_did_change_title(title);
|
||||
}
|
||||
|
||||
void PageHost::page_did_request_scroll(int wheel_delta)
|
||||
void PageHost::page_did_request_scroll(i32 x_delta, i32 y_delta)
|
||||
{
|
||||
m_client.async_did_request_scroll(wheel_delta);
|
||||
m_client.async_did_request_scroll(x_delta, y_delta);
|
||||
}
|
||||
|
||||
void PageHost::page_did_request_scroll_into_view(const Gfx::IntRect& rect)
|
||||
|
|
|
@ -41,7 +41,7 @@ private:
|
|||
virtual void page_did_request_cursor_change(Gfx::StandardCursor) override;
|
||||
virtual void page_did_layout() override;
|
||||
virtual void page_did_change_title(const String&) override;
|
||||
virtual void page_did_request_scroll(int) override;
|
||||
virtual void page_did_request_scroll(i32, i32) override;
|
||||
virtual void page_did_request_scroll_into_view(const Gfx::IntRect&) override;
|
||||
virtual void page_did_enter_tooltip_area(const Gfx::IntPoint&, const String&) override;
|
||||
virtual void page_did_leave_tooltip_area() override;
|
||||
|
|
|
@ -12,7 +12,7 @@ endpoint WebContentClient
|
|||
did_request_cursor_change(i32 cursor_type) =|
|
||||
did_layout(Gfx::IntSize content_size) =|
|
||||
did_change_title(String title) =|
|
||||
did_request_scroll(int wheel_delta) =|
|
||||
did_request_scroll(i32 x_delta, i32 y_delta) =|
|
||||
did_request_scroll_into_view(Gfx::IntRect rect) =|
|
||||
did_enter_tooltip_area(Gfx::IntPoint content_position, String title) =|
|
||||
did_leave_tooltip_area() =|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue