diff --git a/Userland/Libraries/LibWeb/Layout/Box.cpp b/Userland/Libraries/LibWeb/Layout/Box.cpp index 701a47961ac..feea12ea8b9 100644 --- a/Userland/Libraries/LibWeb/Layout/Box.cpp +++ b/Userland/Libraries/LibWeb/Layout/Box.cpp @@ -60,12 +60,6 @@ bool Box::is_scroll_container() const || overflow_value_makes_box_a_scroll_container(computed_values().overflow_y()); } -bool Box::is_user_scrollable() const -{ - // FIXME: Support horizontal scroll as well (overflow-x) - return computed_values().overflow_y() == CSS::Overflow::Scroll || computed_values().overflow_y() == CSS::Overflow::Auto; -} - bool Box::is_body() const { return dom_node() && dom_node() == document().body(); diff --git a/Userland/Libraries/LibWeb/Layout/Box.h b/Userland/Libraries/LibWeb/Layout/Box.h index ceae26f4025..93928d96109 100644 --- a/Userland/Libraries/LibWeb/Layout/Box.h +++ b/Userland/Libraries/LibWeb/Layout/Box.h @@ -52,8 +52,6 @@ public: bool is_scroll_container() const; - bool is_user_scrollable() const; - void add_contained_abspos_child(JS::NonnullGCPtr child) { m_contained_abspos_children.append(child); } void clear_contained_abspos_children() { m_contained_abspos_children.clear(); } Vector> const& contained_abspos_children() const { return m_contained_abspos_children; } diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp index b079844fe5d..79801815c2a 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -775,12 +775,9 @@ Paintable::DispatchEventOfSameName PaintableBox::handle_mousemove(Badge, CSSPixelPoint, unsigned, unsigned, int wheel_delta_x, int wheel_delta_y) { - if (!layout_box().is_user_scrollable()) - return false; - - // TODO: Vertical and horizontal scroll overflow should be handled seperately. - if (!has_scrollable_overflow()) + if (!is_scrollable()) { return false; + } scroll_by(wheel_delta_x, wheel_delta_y); return true;