[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-115.10.0esr-13.5-1] Bug 42528: Don't leak system scrollbar size on windows.



Title: GitLab

Pier Angelo Vendrame pushed to branch tor-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Tor Browser

Commits:

  • 9b68a413
    by Henry Wilkes at 2024-04-17T16:09:08+00:00
    Bug 42528: Don't leak system scrollbar size on windows.
    

2 changed files:

Changes:

  • widget/ScrollbarDrawingWin.cpp
    ... ... @@ -11,6 +11,7 @@
    11 11
     #include "nsLayoutUtils.h"
    
    12 12
     #include "Theme.h"
    
    13 13
     #include "nsNativeTheme.h"
    
    14
    +#include "nsContentUtils.h"
    
    14 15
     
    
    15 16
     namespace mozilla::widget {
    
    16 17
     
    
    ... ... @@ -164,7 +165,10 @@ void ScrollbarDrawingWin::RecomputeScrollbarParams() {
    164 165
       }
    
    165 166
       ConfigureScrollbarSize(defaultSize);
    
    166 167
     
    
    167
    -  if (StaticPrefs::widget_non_native_theme_win_scrollbar_use_system_size()) {
    
    168
    +  // Do not leak system size when using ResistFingerprinting.
    
    169
    +  if (!nsContentUtils::ShouldResistFingerprinting("No context available",
    
    170
    +                                                  RFPTarget::Unknown) &&
    
    171
    +      StaticPrefs::widget_non_native_theme_win_scrollbar_use_system_size()) {
    
    168 172
         ConfigureScrollbarSize(LookAndFeel::GetInt(
    
    169 173
             LookAndFeel::IntID::SystemScrollbarSize, defaultSize));
    
    170 174
       }
    

  • widget/ScrollbarDrawingWin11.cpp
    ... ... @@ -11,6 +11,7 @@
    11 11
     #include "nsLayoutUtils.h"
    
    12 12
     #include "Theme.h"
    
    13 13
     #include "nsNativeTheme.h"
    
    14
    +#include "nsContentUtils.h"
    
    14 15
     
    
    15 16
     using mozilla::gfx::sRGBColor;
    
    16 17
     
    
    ... ... @@ -352,6 +353,11 @@ bool ScrollbarDrawingWin11::PaintScrollbarThumb(
    352 353
     
    
    353 354
     void ScrollbarDrawingWin11::RecomputeScrollbarParams() {
    
    354 355
       ScrollbarDrawingWin::RecomputeScrollbarParams();
    
    356
    +  if (nsContentUtils::ShouldResistFingerprinting("No context available",
    
    357
    +                                                 RFPTarget::Unknown)) {
    
    358
    +    // Do not distinguish sizes between windows 10 and 11.
    
    359
    +    return;
    
    360
    +  }
    
    355 361
       // TODO(emilio): Maybe make this configurable? Though this doesn't respect
    
    356 362
       // classic Windows registry settings, and cocoa overlay scrollbars also don't
    
    357 363
       // respect the override it seems, so this should be fine.
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits