morgan pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
- 
61c5f500
by Fatih at 2024-10-10T09:43:32+02:00
 
1 changed file:
Changes:
| ... | ... | @@ -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;
 |