LibWeb: Rename is_scrollable() to could_be_scrolled_by_wheel_event()

Previous name for misleading because it checks if box could be scrolled
by user input event which is diffent from checking if box is scrollable.
For example box with `overflow: hidden` is scrollable but it can't be
scrolled by user input event.
This commit is contained in:
Aliaksandr Kalenik 2025-01-30 15:47:09 +01:00 committed by Jelle Raaijmakers
commit 74dde4dc0f
Notes: github-actions[bot] 2025-01-30 23:39:27 +00:00
4 changed files with 10 additions and 10 deletions

View file

@ -194,7 +194,7 @@ void ViewportPaintable::refresh_scroll_state()
CSSPixels min_x_offset_relative_to_nearest_scrollable_ancestor;
CSSPixels max_x_offset_relative_to_nearest_scrollable_ancestor;
auto const* containing_block_of_sticky_box = sticky_box.containing_block();
if (containing_block_of_sticky_box->is_scrollable()) {
if (containing_block_of_sticky_box->could_be_scrolled_by_wheel_event()) {
min_y_offset_relative_to_nearest_scrollable_ancestor = 0;
max_y_offset_relative_to_nearest_scrollable_ancestor = containing_block_of_sticky_box->scrollable_overflow_rect()->height() - sticky_box.absolute_border_box_rect().height();
min_x_offset_relative_to_nearest_scrollable_ancestor = 0;