From d3fdc138831496c61bb14b09173befe17e212da0 Mon Sep 17 00:00:00 2001 From: nguyenH-T Date: Sun, 21 Apr 2024 20:49:46 -0600 Subject: [PATCH] LibWeb: User_scrollable now ignores overflow-hidden --- Userland/Libraries/LibWeb/Layout/Box.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Layout/Box.cpp b/Userland/Libraries/LibWeb/Layout/Box.cpp index 97cf4061d2d856..d221fae43bfa05 100644 --- a/Userland/Libraries/LibWeb/Layout/Box.cpp +++ b/Userland/Libraries/LibWeb/Layout/Box.cpp @@ -56,7 +56,10 @@ bool Box::is_scroll_container() const bool Box::is_user_scrollable() const { - // FIXME: Support horizontal scroll as well (overflow-x) + // FIXME: Support horizontal scroll as well (overflow-x). + if (computed_values().overflow_y() == CSS::Overflow::Hidden || computed_values().overflow_x() == CSS::Overflow::Hidden) + return false; + return computed_values().overflow_y() == CSS::Overflow::Scroll || computed_values().overflow_y() == CSS::Overflow::Auto; }