diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/Node.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/Node.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/Node.cpp b/Userland/Libraries/LibWeb/Layout/Node.cpp index 7a72dfbca5..b2c1cd4661 100644 --- a/Userland/Libraries/LibWeb/Layout/Node.cpp +++ b/Userland/Libraries/LibWeb/Layout/Node.cpp @@ -322,15 +322,18 @@ void Node::handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint&, unsigned, { } -void Node::handle_mousewheel(Badge<EventHandler>, const Gfx::IntPoint&, unsigned, unsigned, int wheel_delta) +bool Node::handle_mousewheel(Badge<EventHandler>, const Gfx::IntPoint&, unsigned, unsigned, int wheel_delta) { if (auto* containing_block = this->containing_block()) { if (!containing_block->is_scrollable()) - return; + return false; auto new_offset = containing_block->scroll_offset(); new_offset.move_by(0, wheel_delta); containing_block->set_scroll_offset(new_offset); + return true; } + + return false; } bool Node::is_root_element() const |