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

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

parent 63408484
Branches
No related tags found
2 merge requests!1202Bug_43099: 2024 YEC Strings,!1136Bug 43085: Rebased alpha onto 128.2.0esr
......@@ -799,8 +799,16 @@ class _RFPHelper {
return false;
}
_onWindowDoubleClick(e) {
if (e.target.classList.contains("browserStack")) {
e.currentTarget.shrinkToLetterbox();
}
}
_attachWindow(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 =
......@@ -832,6 +840,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