summaryrefslogtreecommitdiffstats
path: root/browser/base/content/browser-fullScreenAndPointerLock.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /browser/base/content/browser-fullScreenAndPointerLock.js
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/base/content/browser-fullScreenAndPointerLock.js')
-rw-r--r--browser/base/content/browser-fullScreenAndPointerLock.js43
1 files changed, 10 insertions, 33 deletions
diff --git a/browser/base/content/browser-fullScreenAndPointerLock.js b/browser/base/content/browser-fullScreenAndPointerLock.js
index aae596a0f7..c8794c760c 100644
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -365,26 +365,19 @@ var FullScreen = {
passive: true,
});
- if (enterFS) {
- gNavToolbox.setAttribute("inFullscreen", true);
- document.documentElement.setAttribute("inFullscreen", true);
- let alwaysUsesNativeFullscreen =
+ document.documentElement.toggleAttribute("inFullscreen", enterFS);
+ document.documentElement.toggleAttribute(
+ "macOSNativeFullscreen",
+ enterFS &&
AppConstants.platform == "macosx" &&
- Services.prefs.getBoolPref("full-screen-api.macos-native-full-screen");
- if (
- (alwaysUsesNativeFullscreen || !document.fullscreenElement) &&
- AppConstants.platform == "macosx"
- ) {
- document.documentElement.setAttribute("macOSNativeFullscreen", true);
- }
- } else {
- gNavToolbox.removeAttribute("inFullscreen");
- document.documentElement.removeAttribute("inFullscreen");
- document.documentElement.removeAttribute("macOSNativeFullscreen");
- }
+ (Services.prefs.getBoolPref(
+ "full-screen-api.macos-native-full-screen"
+ ) ||
+ !document.fullscreenElement)
+ );
if (!document.fullscreenElement) {
- this._updateToolbars(enterFS);
+ ToolbarIconColor.inferFromText("fullscreen", enterFS);
}
if (enterFS) {
@@ -948,22 +941,6 @@ var FullScreen = {
MousePosTracker.removeListener(this);
},
-
- _updateToolbars(aEnterFS) {
- for (let el of document.querySelectorAll(
- "toolbar[fullscreentoolbar=true]"
- )) {
- // Set the inFullscreen attribute to allow specific styling
- // in fullscreen mode
- if (aEnterFS) {
- el.setAttribute("inFullscreen", true);
- } else {
- el.removeAttribute("inFullscreen");
- }
- }
-
- ToolbarIconColor.inferFromText("fullscreen", aEnterFS);
- },
};
ChromeUtils.defineLazyGetter(FullScreen, "_permissionNotificationIDs", () => {