[tor-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-115.10.0esr-13.5-1] Bug 42528: Don't leak system scrollbar size on windows.
Pier Angelo Vendrame (@pierov)
git at gitlab.torproject.org
Wed Apr 17 16:11:06 UTC 2024
Pier Angelo Vendrame pushed to branch mullvad-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser
Commits:
1908311e by Henry Wilkes at 2024-04-17T18:10:56+02:00
Bug 42528: Don't leak system scrollbar size on windows.
- - - - -
2 changed files:
- widget/ScrollbarDrawingWin.cpp
- widget/ScrollbarDrawingWin11.cpp
Changes:
=====================================
widget/ScrollbarDrawingWin.cpp
=====================================
@@ -11,6 +11,7 @@
#include "nsLayoutUtils.h"
#include "Theme.h"
#include "nsNativeTheme.h"
+#include "nsContentUtils.h"
namespace mozilla::widget {
@@ -164,7 +165,10 @@ void ScrollbarDrawingWin::RecomputeScrollbarParams() {
}
ConfigureScrollbarSize(defaultSize);
- if (StaticPrefs::widget_non_native_theme_win_scrollbar_use_system_size()) {
+ // Do not leak system size when using ResistFingerprinting.
+ if (!nsContentUtils::ShouldResistFingerprinting("No context available",
+ RFPTarget::Unknown) &&
+ StaticPrefs::widget_non_native_theme_win_scrollbar_use_system_size()) {
ConfigureScrollbarSize(LookAndFeel::GetInt(
LookAndFeel::IntID::SystemScrollbarSize, defaultSize));
}
=====================================
widget/ScrollbarDrawingWin11.cpp
=====================================
@@ -11,6 +11,7 @@
#include "nsLayoutUtils.h"
#include "Theme.h"
#include "nsNativeTheme.h"
+#include "nsContentUtils.h"
using mozilla::gfx::sRGBColor;
@@ -352,6 +353,11 @@ bool ScrollbarDrawingWin11::PaintScrollbarThumb(
void ScrollbarDrawingWin11::RecomputeScrollbarParams() {
ScrollbarDrawingWin::RecomputeScrollbarParams();
+ if (nsContentUtils::ShouldResistFingerprinting("No context available",
+ RFPTarget::Unknown)) {
+ // Do not distinguish sizes between windows 10 and 11.
+ return;
+ }
// TODO(emilio): Maybe make this configurable? Though this doesn't respect
// classic Windows registry settings, and cocoa overlay scrollbars also don't
// respect the override it seems, so this should be fine.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/1908311ea6023085715224be247dcdcc83c14460
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/1908311ea6023085715224be247dcdcc83c14460
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20240417/452128b4/attachment-0001.htm>
More information about the tor-commits
mailing list