1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:18:12 +00:00

LibWeb: Return whether handle_mousewheel was handled

We try scrolling a Node with the handle_mousewheel event, but if it
isn't scrollable, the event should be passed back up to the page
host. This is the first step in that process.
This commit is contained in:
Angus Gibson 2021-03-02 08:36:58 +11:00 committed by Andreas Kling
parent 17e6287333
commit e9c1d9c89a
5 changed files with 13 additions and 7 deletions

View file

@ -139,7 +139,8 @@ bool EventHandler::handle_mousewheel(const Gfx::IntPoint& position, unsigned int
auto result = layout_root()->hit_test(position, Layout::HitTestType::Exact);
if (result.layout_node) {
result.layout_node->handle_mousewheel({}, position, buttons, modifiers, wheel_delta);
if (result.layout_node->handle_mousewheel({}, position, buttons, modifiers, wheel_delta))
return true;
return true;
}