mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
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:
parent
dd37d1c536
commit
74dde4dc0f
Notes:
github-actions[bot]
2025-01-30 23:39:27 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 74dde4dc0f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3410
Reviewed-by: https://github.com/gmta ✅
4 changed files with 10 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue