summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorDmitry Petrov <dpetroff@gmail.com>2022-01-20 22:35:01 +0100
committerIdan Horowitz <idan.horowitz@gmail.com>2022-01-29 21:48:57 +0200
commit2616b61eee50c37b6295ee99ca6bfa758e84a26f (patch)
treea57dea55b350eb2602019d903c9f56f76e99dcfb /Userland/Libraries/LibWeb
parentb0a54518d89cfad8fdc7a85576f72894bb40c950 (diff)
downloadserenity-2616b61eee50c37b6295ee99ca6bfa758e84a26f.zip
WebContent: Switch scroll direction on shift modifier
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/Page/EventHandler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.cpp b/Userland/Libraries/LibWeb/Page/EventHandler.cpp
index a254df2bd4..77b67793ce 100644
--- a/Userland/Libraries/LibWeb/Page/EventHandler.cpp
+++ b/Userland/Libraries/LibWeb/Page/EventHandler.cpp
@@ -117,6 +117,9 @@ bool EventHandler::handle_mousewheel(const Gfx::IntPoint& position, unsigned int
if (!layout_root())
return false;
+ if (modifiers & KeyModifier::Mod_Shift)
+ swap(wheel_delta_x, wheel_delta_y);
+
// FIXME: Support wheel events in subframes.
auto result = layout_root()->hit_test(position, Layout::HitTestType::Exact);