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

@ -1651,7 +1651,7 @@ void Node::serialize_tree_as_json(JsonObjectSerializer<StringBuilder>& object) c
}
if (paintable_box()) {
if (paintable_box()->is_scrollable()) {
if (paintable_box()->could_be_scrolled_by_wheel_event()) {
MUST(object.add("scrollable"sv, true));
}
if (!paintable_box()->is_visible()) {