Prevent mouse wheel fingerprinting on Windows
This commit is contained in:
@@ -293,6 +293,7 @@ PublicKeyCredential-fingerprinting-mitigations.patch
|
||||
Disable-Web-Bluetooth-by-default-in-desktop-platforms.patch
|
||||
Enable-Cert-Management-UI.patch
|
||||
Enable-ProcessBoundStringEncryption-by-default.patch
|
||||
Prevent-mouse-wheel-fingerprinting-on-Windows.patch
|
||||
|
||||
# temporary or wip patches
|
||||
Temp-PerformanceNavigationTiming-privacy-fix.patch
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Fri, 7 Feb 2025 11:27:51 +0000
|
||||
Subject: Prevent mouse wheel fingerprinting on Windows
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
ui/events/blink/web_input_event_builders_win.cc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/ui/events/blink/web_input_event_builders_win.cc b/ui/events/blink/web_input_event_builders_win.cc
|
||||
--- a/ui/events/blink/web_input_event_builders_win.cc
|
||||
+++ b/ui/events/blink/web_input_event_builders_win.cc
|
||||
@@ -297,6 +297,8 @@ WebMouseWheelEvent WebMouseWheelEventBuilder::Build(
|
||||
// |wheel_delta| is expressed in multiples or divisions of WHEEL_DELTA,
|
||||
// divide this out here to get the number of wheel ticks.
|
||||
float num_ticks = wheel_delta / WHEEL_DELTA;
|
||||
+ if (num_ticks > 0) num_ticks = 1;
|
||||
+ else if (num_ticks < 0) num_ticks = -1;
|
||||
float scroll_delta = num_ticks;
|
||||
if (horizontal_scroll) {
|
||||
unsigned long scroll_chars = kDefaultScrollCharsPerWheelDelta;
|
||||
--
|
||||
Reference in New Issue
Block a user