Skip to main content
Sign in
Snippets Groups Projects
Commit 2b399f97 authored by ma1's avatar ma1 Committed by Pier Angelo Vendrame
Browse files

BB 42443: Shrink window to match letterboxing size when the emtpy area is clicked.

parent 07808992
Branches
Tags
1 merge request!1505BB/TB 43416: Rebased onto 135.0a1
......@@ -774,9 +774,17 @@ class _RFPHelper {
return false;
}
_onWindowDoubleClick(e) {
if (e.target.classList.contains("browserStack")) {
e.currentTarget.shrinkToLetterbox();
}
}
_attachWindow(aWindow) {
this._fixRounding(aWindow);
aWindow.addEventListener("sizemodechange", windowResizeHandler);
aWindow.shrinkToLetterbox = this.shrinkToLetterbox;
aWindow.addEventListener("dblclick", this._onWindowDoubleClick);
aWindow.gBrowser.addTabsProgressListener(this);
aWindow.addEventListener("TabOpen", this);
const resizeObserver = (aWindow._rfpResizeObserver =
......@@ -808,6 +816,8 @@ class _RFPHelper {
let browser = tab.linkedBrowser;
this._resetContentSize(browser);
}
aWindow.removeEventListener("dblclick", this._onWindowDoubleClick);
delete aWindow.shrinkToLetterbox;
aWindow.removeEventListener("sizemodechange", windowResizeHandler);
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment