mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1801168, initialize the field that gets the fullscr-toggler element properly, as showNavToolbox can be called without it being set yet, this caused the browser_tabswitch_select.js test to fail in verify mode, r=dao
Depends on D162857 Differential Revision: https://phabricator.services.mozilla.com/D163059
This commit is contained in:
parent
6f0485ce50
commit
6fd167483f
@ -295,6 +295,13 @@ var FullScreen = {
|
||||
}
|
||||
},
|
||||
|
||||
get fullScreenToggler() {
|
||||
delete this.fullScreenToggler;
|
||||
return (this.fullScreenToggler = document.getElementById(
|
||||
"fullscr-toggler"
|
||||
));
|
||||
},
|
||||
|
||||
toggle() {
|
||||
var enterFS = window.fullScreen;
|
||||
|
||||
@ -314,14 +321,12 @@ var FullScreen = {
|
||||
this.shiftMacToolbarDown(0);
|
||||
}
|
||||
|
||||
if (!this._fullScrToggler) {
|
||||
this._fullScrToggler = document.getElementById("fullscr-toggler");
|
||||
this._fullScrToggler.addEventListener("mouseover", this._expandCallback);
|
||||
this._fullScrToggler.addEventListener("dragenter", this._expandCallback);
|
||||
this._fullScrToggler.addEventListener("touchmove", this._expandCallback, {
|
||||
passive: true,
|
||||
});
|
||||
}
|
||||
let fstoggler = this.fullScreenToggler;
|
||||
fstoggler.addEventListener("mouseover", this._expandCallback);
|
||||
fstoggler.addEventListener("dragenter", this._expandCallback);
|
||||
fstoggler.addEventListener("touchmove", this._expandCallback, {
|
||||
passive: true,
|
||||
});
|
||||
|
||||
if (enterFS) {
|
||||
gNavToolbox.setAttribute("inFullscreen", true);
|
||||
@ -788,7 +793,7 @@ var FullScreen = {
|
||||
if (BrowserHandler.kiosk) {
|
||||
return;
|
||||
}
|
||||
this._fullScrToggler.hidden = true;
|
||||
this.fullScreenToggler.hidden = true;
|
||||
gNavToolbox.removeAttribute("fullscreenShouldAnimate");
|
||||
gNavToolbox.style.marginTop = "";
|
||||
|
||||
@ -859,7 +864,7 @@ var FullScreen = {
|
||||
}
|
||||
|
||||
if (!BrowserHandler.kiosk) {
|
||||
this._fullScrToggler.hidden = false;
|
||||
this.fullScreenToggler.hidden = false;
|
||||
}
|
||||
|
||||
if (
|
||||
|
Loading…
Reference in New Issue
Block a user