Skip to content
Snippets Groups Projects
Commit 1c20eff5 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 68ea938b
No related branches found
No related tags found
1 merge request!1503TB 43415, part 3: Shuffle commits
......@@ -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