diff --git a/build/cromite_patches_list.txt b/build/cromite_patches_list.txt index 431937d2..8723d814 100644 --- a/build/cromite_patches_list.txt +++ b/build/cromite_patches_list.txt @@ -308,6 +308,7 @@ Disable-minikin-hyphenation.patch Disable-integration-with-Gemini.patch Disable-AppRating.patch Enable-Android-DevTools-Frontend.patch +Reduce-input-capability-fingerprinting-through-normalization.patch # temporary or wip patches Temp-disable-predictive-back-gesture.patch diff --git a/build/patches/Reduce-input-capability-fingerprinting-through-normalization.patch b/build/patches/Reduce-input-capability-fingerprinting-through-normalization.patch new file mode 100644 index 00000000..7122f2ac --- /dev/null +++ b/build/patches/Reduce-input-capability-fingerprinting-through-normalization.patch @@ -0,0 +1,115 @@ +From: uazo +Date: Fri, 10 Jul 2026 06:28:01 +0000 +Subject: Reduce input capability fingerprinting through normalization + +Reduce the amount of hardware-specific information exposed through pointer and +touch capability APIs. +Normalize pointer type, hover capability, and maximum touch points to common +profiles instead of exposing the exact input hardware configuration. +This avoids exposing differences between devices with similar usage patterns, +such as desktop systems with optional touchscreen hardware. + +License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html +--- + .../java/src/org/chromium/ui/base/TouchDevice.java | 10 +++++----- + ui/base/pointer/pointer_device_linux.cc | 4 ++++ + ui/base/pointer/pointer_device_win.cc | 3 +++ + 3 files changed, 12 insertions(+), 5 deletions(-) + +diff --git a/ui/android/java/src/org/chromium/ui/base/TouchDevice.java b/ui/android/java/src/org/chromium/ui/base/TouchDevice.java +--- a/ui/android/java/src/org/chromium/ui/base/TouchDevice.java ++++ b/ui/android/java/src/org/chromium/ui/base/TouchDevice.java +@@ -37,18 +37,17 @@ public class TouchDevice { + } else if (ContextUtils.getApplicationContext() + .getPackageManager() + .hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT)) { +- return 2; ++ return 5; + } else if (ContextUtils.getApplicationContext() + .getPackageManager() + .hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH)) { +- return 2; ++ return 5; + } else if (ContextUtils.getApplicationContext() + .getPackageManager() + .hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN)) { +- return 1; +- } else { +- return 0; ++ return 5; + } ++ return 0; + } + + /** +@@ -58,6 +57,7 @@ public class TouchDevice { + */ + @CalledByNative + private static int[] availablePointerAndHoverTypes() { ++ if ((true)) return new int[] {PointerType.COARSE, HoverType.NONE}; + int pointerTypes = 0; + int hoverTypes = 0; + +diff --git a/ui/base/pointer/pointer_device_linux.cc b/ui/base/pointer/pointer_device_linux.cc +--- a/ui/base/pointer/pointer_device_linux.cc ++++ b/ui/base/pointer/pointer_device_linux.cc +@@ -15,6 +15,7 @@ namespace ui { + namespace { + + bool IsTouchDevicePresent() { ++ if ((true)) return false; + return !DeviceDataManager::GetInstance()->GetTouchscreenDevices().empty(); + } + +@@ -31,6 +32,7 @@ bool IsMouseOrTouchpadPresent() { + } // namespace + + std::pair GetAvailablePointerAndHoverTypesImpl() { ++ if ((true)) return {POINTER_TYPE_FINE, HOVER_TYPE_HOVER}; + int pointer_types = IsTouchDevicePresent() ? POINTER_TYPE_COARSE : 0; + int hover_types = HOVER_TYPE_NONE; + if (IsMouseOrTouchpadPresent()) { +@@ -41,6 +43,7 @@ std::pair GetAvailablePointerAndHoverTypesImpl() { + } + + TouchScreensAvailability GetTouchScreensAvailability() { ++ if ((true)) return TouchScreensAvailability::NONE; + if (!IsTouchDevicePresent()) { + return TouchScreensAvailability::NONE; + } +@@ -51,6 +54,7 @@ TouchScreensAvailability GetTouchScreensAvailability() { + } + + int MaxTouchPoints() { ++ if ((true)) return 0; + const std::vector& touchscreen_devices = + DeviceDataManager::GetInstance()->GetTouchscreenDevices(); + const auto& it = std::ranges::max_element(touchscreen_devices, {}, +diff --git a/ui/base/pointer/pointer_device_win.cc b/ui/base/pointer/pointer_device_win.cc +--- a/ui/base/pointer/pointer_device_win.cc ++++ b/ui/base/pointer/pointer_device_win.cc +@@ -18,6 +18,7 @@ namespace ui { + namespace { + + bool IsTouchDevicePresent() { ++ if ((true)) return false; + const int value = GetSystemMetrics(SM_DIGITIZER); + return (value & NID_READY) && + ((value & NID_INTEGRATED_TOUCH) || (value & NID_EXTERNAL_TOUCH)); +@@ -48,6 +49,7 @@ PointerDevice ToPointerDevice(const POINTER_DEVICE_INFO& device) { + } // namespace + + std::pair GetAvailablePointerAndHoverTypesImpl() { ++ if ((true)) return {POINTER_TYPE_FINE, HOVER_TYPE_HOVER}; + // `IsDeviceUsedAsATablet()` guarantees that the device has a touch screen and + // has no keyboard connected. On Windows 10 it means that it has verified with + // `GetSystemMetrics(SM_CONVERTIBLESLATEMODE)`. +@@ -73,6 +75,7 @@ TouchScreensAvailability GetTouchScreensAvailability() { + } + + int MaxTouchPoints() { ++ if ((true)) return 0; + return IsTouchDevicePresent() ? GetSystemMetrics(SM_MAXIMUMTOUCHES) : 0; + } + +--