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

[tor-commits] [Git][tpo/applications/tor-browser][base-browser-128.3.0esr-14.0-1] Bug 1922204: fixup square spoofed orientation. r=tjr



Title: GitLab

morgan pushed to branch base-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser

Commits:

  • c3282afe
    by Fatih at 2024-10-10T20:52:43+00:00
    Bug 1922204: fixup square spoofed orientation. r=tjr
    
    Differential Revision: https://phabricator.services.mozilla.com/D224312

1 changed file:

Changes:

  • toolkit/components/resistfingerprinting/nsRFPService.cpp
    ... ... @@ -2287,10 +2287,12 @@ Maybe<RFPTarget> nsRFPService::GetOverriddenFingerprintingSettingsForURI(
    2287 2287
     
    
    2288 2288
     /* static */
    
    2289 2289
     uint16_t nsRFPService::ViewportSizeToAngle(int32_t aWidth, int32_t aHeight) {
    
    2290
    +  // Note that, if screen is square, we return portrait-primary.
    
    2291
    +  // That's why we use > on non-android and >= on Android.
    
    2290 2292
     #ifdef MOZ_WIDGET_ANDROID
    
    2291 2293
       bool neutral = aHeight >= aWidth;
    
    2292 2294
     #else
    
    2293
    -  bool neutral = aWidth >= aHeight;
    
    2295
    +  bool neutral = aWidth > aHeight;
    
    2294 2296
     #endif
    
    2295 2297
       if (neutral) {
    
    2296 2298
         return 0;
    
    ... ... @@ -2301,7 +2303,7 @@ uint16_t nsRFPService::ViewportSizeToAngle(int32_t aWidth, int32_t aHeight) {
    2301 2303
     /* static */
    
    2302 2304
     dom::OrientationType nsRFPService::ViewportSizeToOrientationType(
    
    2303 2305
         int32_t aWidth, int32_t aHeight) {
    
    2304
    -  if (aWidth >= aHeight) {
    
    2306
    +  if (aWidth > aHeight) {
    
    2305 2307
         return dom::OrientationType::Landscape_primary;
    
    2306 2308
       }
    
    2307 2309
       return dom::OrientationType::Portrait_primary;
    

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