Skip to content
Snippets Groups Projects
Verified Commit 63eecb92 authored by ma1's avatar ma1
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 384dff97
1 merge request!718Bug 30556: align letterboxing with 200x100 new win width stepping
......@@ -475,14 +475,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;
}
......@@ -569,7 +569,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 register or to comment