LibWeb: Adjust positions by the scroll offset for scrollbar hit testing

This ensures we scroll to the correct position when dragging a scrollbar
or clicking its gutter.
This commit is contained in:
Timothy Flynn 2025-05-07 19:06:57 -04:00 committed by Sam Atkins
parent 22532c769c
commit c846616d51
Notes: github-actions[bot] 2025-05-08 09:41:59 +00:00
2 changed files with 12 additions and 2 deletions

View file

@ -274,6 +274,7 @@ protected:
[[nodiscard]] bool could_be_scrolled_by_wheel_event(ScrollDirection) const;
TraversalDecision hit_test_scrollbars(CSSPixelPoint position, Function<TraversalDecision(HitTestResult)> const& callback) const;
CSSPixelPoint adjust_position_for_cumulative_scroll_offset(CSSPixelPoint) const;
private:
[[nodiscard]] virtual bool is_paintable_box() const final { return true; }