Skip to content
Snippets Groups Projects
Verified Commit a9bdd514 authored by ma1's avatar ma1 Committed by Pier Angelo Vendrame
Browse files

amend! Bug 32308: use direct browser sizing for letterboxing.

Bug 32308: use direct browser sizing for letterboxing.
Bug 30556: align letterboxing with 200x100 new win width stepping
parent aba8bc9f
Branches
Tags
1 merge request!734Bug 42030: Rebased 13.0 alpha onto Firefox 115.2.0esr
......@@ -376,14 +376,14 @@ class _RFPHelper {
/**
* Given a width or height, rounds it with the proper stepping.
*/
steppedSize(aDimension) {
steppedSize(aDimension, isWidth = false) {
let stepping;
if (aDimension <= 50) {
return 0;
} else if (aDimension <= 500) {
stepping = 50;
} else if (aDimension <= 1600) {
stepping = 100;
stepping = isWidth ? 200 : 100;
} else {
stepping = 200;
}
......@@ -437,7 +437,7 @@ class _RFPHelper {
// If the set is empty, we will round the content with the default
// stepping size.
if (!this._letterboxingDimensions.length) {
result = r(this.steppedSize(aWidth), this.steppedSize(aHeight));
result = r(this.steppedSize(aWidth, true), this.steppedSize(aHeight));
log(
`${logPrefix} roundDimensions(${aWidth}, ${aHeight}) = ${result.width} x ${result.height}`
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment