Skip to content
Snippets Groups Projects
Verified Commit 036aaa05 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

fixup! Bug 32308: Use direct browser sizing for letterboxing.

Restore our changes after backporting MozBug 1556002.
parent 4a33efb7
Branches
No related tags found
1 merge request!1280No Bug: Backport MozBug 1556002
......@@ -53,8 +53,8 @@ function checkForDefaultSetting(
aRealHeight
) {
// We can get the rounded size by subtracting twice the margin.
let targetWidth = aRealWidth - 2 * RFPHelper.steppedRange(aRealWidth, true);
let targetHeight = aRealHeight - 2 * RFPHelper.steppedRange(aRealHeight);
let targetWidth = aRealWidth - 2 * RFPHelper.steppedSize(aRealWidth, true);
let targetHeight = aRealHeight - 2 * RFPHelper.steppedSize(aRealHeight);
// This platform-specific code is explained in the large comment below.
if (getPlatform() != "linux") {
......
......@@ -522,7 +522,7 @@ class _RFPHelper {
/**
* Given a width or height, rounds it with the proper stepping.
*/
steppedRange(aDimension, aIsWidth = false) {
steppedSize(aDimension, aIsWidth = false) {
let stepping;
if (aDimension <= 50) {
return 0;
......@@ -607,10 +607,7 @@ class _RFPHelper {
// If the set is empty, we will round the content with the default
// stepping size.
if (!this._letterboxingDimensions.length) {
result = {
width: this.steppedRange(aWidth, true),
height: this.steppedRange(aHeight),
};
return r(this.steppedSize(aWidth, true), this.steppedSize(aHeight));
}
let matchingArea = aWidth * aHeight;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment