ma1 pushed to branch tor-browser-115.1.0esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
63eecb92
by hackademix at 2023-08-08T08:08:43+02:00
1 changed file:
Changes:
| ... | ... | @@ -475,14 +475,14 @@ class _RFPHelper { |
| 475 | 475 | /**
|
| 476 | 476 | * Given a width or height, rounds it with the proper stepping.
|
| 477 | 477 | */
|
| 478 | - steppedSize(aDimension) {
|
|
| 478 | + steppedSize(aDimension, isWidth = false) {
|
|
| 479 | 479 | let stepping;
|
| 480 | 480 | if (aDimension <= 50) {
|
| 481 | 481 | return 0;
|
| 482 | 482 | } else if (aDimension <= 500) {
|
| 483 | 483 | stepping = 50;
|
| 484 | 484 | } else if (aDimension <= 1600) {
|
| 485 | - stepping = 100;
|
|
| 485 | + stepping = isWidth ? 200 : 100;
|
|
| 486 | 486 | } else {
|
| 487 | 487 | stepping = 200;
|
| 488 | 488 | }
|
| ... | ... | @@ -569,7 +569,7 @@ class _RFPHelper { |
| 569 | 569 | // If the set is empty, we will round the content with the default
|
| 570 | 570 | // stepping size.
|
| 571 | 571 | if (!this._letterboxingDimensions.length) {
|
| 572 | - result = r(this.steppedSize(aWidth), this.steppedSize(aHeight));
|
|
| 572 | + result = r(this.steppedSize(aWidth, true), this.steppedSize(aHeight));
|
|
| 573 | 573 | log(
|
| 574 | 574 | `${logPrefix} roundDimensions(${aWidth}, ${aHeight}) = ${result.width} x ${result.height}`
|
| 575 | 575 | );
|