LibWeb: Adjust the scroll offset when the scrollbar gutter is clicked

This allows clicking on the scrollbar gutter to scroll to the offset
indicated by the mouse position.
This commit is contained in:
Timothy Flynn 2025-04-21 10:22:14 -04:00 committed by Tim Flynn
commit 4cd186f3f5
Notes: github-actions[bot] 2025-04-22 15:30:02 +00:00
2 changed files with 56 additions and 31 deletions

View file

@ -283,6 +283,7 @@ private:
virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, CSSPixelPoint, unsigned buttons, unsigned modifiers) override;
bool scrollbar_contains_mouse_position(ScrollDirection, CSSPixelPoint);
void scroll_to_mouse_postion(CSSPixelPoint);
OwnPtr<StackingContext> m_stacking_context;