From 79f8a278d95be21ce6f0999a304da5bdd9924dca Mon Sep 17 00:00:00 2001 From: JustOff Date: Sun, 6 May 2018 14:48:52 +0300 Subject: [PALEMOON] Remove fullscreen and pointer-lock from permission managing --- .../palemoon/base/content/pageinfo/pageInfo.xul | 29 ----------- .../palemoon/base/content/pageinfo/permissions.js | 14 ------ .../components/preferences/aboutPermissions.js | 35 +------------ .../components/preferences/aboutPermissions.xul | 58 ---------------------- .../locales/en-US/chrome/browser/pageInfo.dtd | 2 - .../browser/preferences/aboutPermissions.dtd | 4 -- .../themes/linux/preferences/aboutPermissions.css | 6 --- .../themes/osx/preferences/aboutPermissions.css | 6 --- .../windows/preferences/aboutPermissions.css | 6 --- 9 files changed, 2 insertions(+), 158 deletions(-) diff --git a/application/palemoon/base/content/pageinfo/pageInfo.xul b/application/palemoon/base/content/pageinfo/pageInfo.xul index 5bca1b495..943fa805c 100644 --- a/application/palemoon/base/content/pageinfo/pageInfo.xul +++ b/application/palemoon/base/content/pageinfo/pageInfo.xul @@ -52,7 +52,6 @@ - @@ -61,12 +60,9 @@ - - - @@ -405,31 +401,6 @@ - - - - diff --git a/application/palemoon/base/content/pageinfo/permissions.js b/application/palemoon/base/content/pageinfo/permissions.js index 68261ce6e..e0fb01f76 100644 --- a/application/palemoon/base/content/pageinfo/permissions.js +++ b/application/palemoon/base/content/pageinfo/permissions.js @@ -76,20 +76,6 @@ var gPermObj = { { return UNKNOWN; }, - fullscreen: function getFullscreenDefaultPermissions() - { - if (!gPrefs.getBoolPref("full-screen-api.enabled")) { - return DENY; - } - return UNKNOWN; - }, - pointerLock: function getPointerLockPermissions() - { - if (!gPrefs.getBoolPref("full-screen-api.pointer-lock.enabled")) { - return DENY; - } - return ALLOW; - }, }; var permissionObserver = { diff --git a/application/palemoon/components/preferences/aboutPermissions.js b/application/palemoon/components/preferences/aboutPermissions.js index 531bb061f..9fb12d081 100644 --- a/application/palemoon/components/preferences/aboutPermissions.js +++ b/application/palemoon/components/preferences/aboutPermissions.js @@ -418,31 +418,6 @@ var PermissionDefaults = { Services.prefs.setBoolPref("dom.indexedDB.enabled", value); }, - get fullscreen() { - if (!Services.prefs.getBoolPref("full-screen-api.enabled")) { - return this.DENY; - } - // We always ask for permission to fullscreen with a specific site, - // so there is no global ALLOW. - return this.UNKNOWN; - }, - set fullscreen(aValue) { - let value = (aValue != this.DENY); - Services.prefs.setBoolPref("full-screen-api.enabled", value); - }, - - get pointerLock() { - if (!Services.prefs.getBoolPref("full-screen-api.pointer-lock.enabled")) { - return this.DENY; - } - // We always ask for permission to hide the mouse pointer - // with a specific site, so there is no global ALLOW. - return this.UNKNOWN; - }, - set pointerLock(aValue) { - let value = (aValue != this.DENY); - Services.prefs.setBoolPref("full-screen-api.pointer-lock.enabled", value); - }, } /** @@ -489,14 +464,12 @@ var AboutPermissions = { * Potential future additions: "sts/use", "sts/subd" */ _supportedPermissions: ["password", "image", "popup", "cookie", - "desktop-notification", "install", "geo", "indexedDB", - "fullscreen", "pointerLock"], + "desktop-notification", "install", "geo", "indexedDB"], /** * Permissions that don't have a global "Allow" option. */ - _noGlobalAllow: ["desktop-notification", "geo", "indexedDB", "fullscreen", - "pointerLock"], + _noGlobalAllow: ["desktop-notification", "geo", "indexedDB"], /** * Permissions that don't have a global "Deny" option. @@ -543,8 +516,6 @@ var AboutPermissions = { Services.prefs.addObserver("geo.enabled", this, false); Services.prefs.addObserver("dom.indexedDB.enabled", this, false); Services.prefs.addObserver("plugins.click_to_play", this, false); - Services.prefs.addObserver("full-screen-api.enabled", this, false); - Services.prefs.addObserver("full-screen-api.pointer-lock.enabled", this, false); Services.prefs.addObserver("permissions.places-sites-limit", this, false); Services.obs.addObserver(this, "perm-changed", false); @@ -695,8 +666,6 @@ var AboutPermissions = { Services.prefs.removeObserver("geo.enabled", this, false); Services.prefs.removeObserver("dom.indexedDB.enabled", this, false); Services.prefs.removeObserver("plugins.click_to_play", this, false); - Services.prefs.removeObserver("full-screen-api.enabled", this, false); - Services.prefs.removeObserver("full-screen-api.pointer-lock.enabled", this, false); Services.prefs.removeObserver("permissions.places-sites-limit", this, false); Services.obs.removeObserver(this, "perm-changed"); diff --git a/application/palemoon/components/preferences/aboutPermissions.xul b/application/palemoon/components/preferences/aboutPermissions.xul index c099161f2..56d6cfbbf 100644 --- a/application/palemoon/components/preferences/aboutPermissions.xul +++ b/application/palemoon/components/preferences/aboutPermissions.xul @@ -336,64 +336,6 @@ - - - - - - - - - - - - - - - -