Skip to content
Snippets Groups Projects
Commit 460e98e7 authored by ma1's avatar ma1 Committed by Beatriz Rizental
Browse files

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

parent 9430f555
Branches
Tags
1 merge request!1527Bug 43808: Rebase 128.10.1 onto 128.11
......@@ -833,9 +833,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 =
......@@ -885,6 +893,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