1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

LibWeb: Return true for "overflow: auto" from Box::is_scrollable()

is_scrollable() is currently used to determine if box support scroll
user interaction so it should return true for "auto" overflow.
This commit is contained in:
Aliaksandr Kalenik 2023-08-08 15:35:15 +02:00 committed by Andreas Kling
parent 1b63095271
commit 869bef523e

View file

@ -58,7 +58,7 @@ bool Box::is_scroll_container() const
bool Box::is_scrollable() const
{
// FIXME: Support horizontal scroll as well (overflow-x)
return computed_values().overflow_y() == CSS::Overflow::Scroll;
return computed_values().overflow_y() == CSS::Overflow::Scroll || computed_values().overflow_y() == CSS::Overflow::Auto;
}
void Box::set_needs_display()