diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2017-12-13 17:47:44 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-24 10:30:41 +0100 |
commit | c88c161875beca091fe183a3b04480422b3d3885 (patch) | |
tree | a65fa8c0a8dddab16d65739b382a7632b73e813d | |
parent | 46ad1199deeaf6ba2db31fb3398d3eaa9abdbb2e (diff) | |
download | UXP-c88c161875beca091fe183a3b04480422b3d3885.tar UXP-c88c161875beca091fe183a3b04480422b3d3885.tar.gz UXP-c88c161875beca091fe183a3b04480422b3d3885.tar.lz UXP-c88c161875beca091fe183a3b04480422b3d3885.tar.xz UXP-c88c161875beca091fe183a3b04480422b3d3885.zip |
Remove unnecessary front-end features and pres when not building EME.
Tag #26.
-rw-r--r-- | browser/app/profile/firefox.js | 19 | ||||
-rw-r--r-- | browser/base/content/browser-media.js | 4 | ||||
-rw-r--r-- | browser/base/jar.mn | 2 | ||||
-rw-r--r-- | browser/components/preferences/in-content/content.js | 2 | ||||
-rw-r--r-- | browser/components/preferences/in-content/content.xul | 4 | ||||
-rw-r--r-- | browser/components/preferences/in-content/jar.mn | 2 | ||||
-rw-r--r-- | mobile/android/app/mobile.js | 6 |
7 files changed, 28 insertions, 11 deletions
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index b46d944e8..94615ded0 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1330,20 +1330,21 @@ pref("identity.fxaccounts.migrateToDevEdition", false); pref("ui.key.menuAccessKeyFocuses", true); #endif +#ifdef MOZ_EME // Encrypted media extensions. -#ifdef XP_LINUX -// On Linux EME is visible but disabled by default. This is so that the -// "Play DRM content" checkbox in the Firefox UI is unchecked by default. +// EME is visible but disabled by default. This is so that the +// "Play DRM content" checkbox in the browser UI is unchecked by default. // DRM requires downloading and installing proprietary binaries, which -// users on an open source operating systems didn't opt into. The first -// time a site using EME is encountered, the user will be prompted to -// enable DRM, whereupon the EME plugin binaries will be downloaded if -// permission is granted. +// users didn't necessarily opt-in to by installing the browser. +// The first time a site using EME is encountered, the user will be +// prompted to enable DRM, whereupon the EME plugin binaries will be +// downloaded if permission is granted. pref("media.eme.enabled", false); +pref("media.eme.apiVisible", true); #else -pref("media.eme.enabled", true); +// Disable redundant interfaces +pref("media.eme.apiVisible", false); #endif -pref("media.eme.apiVisible", true); // Decode using Gecko Media Plugins in <video>, if a system decoder is not // availble and the preferred GMP is available. diff --git a/browser/base/content/browser-media.js b/browser/base/content/browser-media.js index a013dbd8a..f721be74d 100644 --- a/browser/base/content/browser-media.js +++ b/browser/base/content/browser-media.js @@ -5,12 +5,16 @@ var gEMEHandler = { get uiEnabled() { +#ifdef MOZ_EME let emeUIEnabled = Services.prefs.getBoolPref("browser.eme.ui.enabled"); // Force-disable on WinXP: if (navigator.platform.toLowerCase().startsWith("win")) { emeUIEnabled = emeUIEnabled && parseFloat(Services.sysinfo.get("version")) >= 6; } return emeUIEnabled; +#else + return false; +#endif }, ensureEMEEnabled: function(browser, keySystem) { Services.prefs.setBoolPref("media.eme.enabled", true); diff --git a/browser/base/jar.mn b/browser/base/jar.mn index 3fa5ea408..a65c77338 100644 --- a/browser/base/jar.mn +++ b/browser/base/jar.mn @@ -80,7 +80,7 @@ browser.jar: content/browser/browser-fullZoom.js (content/browser-fullZoom.js) content/browser/browser-fxaccounts.js (content/browser-fxaccounts.js) content/browser/browser-gestureSupport.js (content/browser-gestureSupport.js) - content/browser/browser-media.js (content/browser-media.js) +* content/browser/browser-media.js (content/browser-media.js) content/browser/browser-places.js (content/browser-places.js) content/browser/browser-plugins.js (content/browser-plugins.js) content/browser/browser-refreshblocker.js (content/browser-refreshblocker.js) diff --git a/browser/components/preferences/in-content/content.js b/browser/components/preferences/in-content/content.js index 5ba334b02..a957b1dd5 100644 --- a/browser/components/preferences/in-content/content.js +++ b/browser/components/preferences/in-content/content.js @@ -78,6 +78,7 @@ var gContentPane = { document.getElementById("notificationsPolicyLearnMore").setAttribute("href", notificationInfoURL); +#ifdef MOZ_EME let drmInfoURL = Services.urlFormatter.formatURLPref("app.support.baseURL") + "drm-content"; document.getElementById("playDRMContentLink").setAttribute("href", drmInfoURL); @@ -91,6 +92,7 @@ var gContentPane = { // of the pane hiding/showing code potentially interfering: document.getElementById("drmGroup").setAttribute("style", "display: none !important"); } +#endif }, // UTILITY FUNCTIONS diff --git a/browser/components/preferences/in-content/content.xul b/browser/components/preferences/in-content/content.xul index c646c16a2..9434cba62 100644 --- a/browser/components/preferences/in-content/content.xul +++ b/browser/components/preferences/in-content/content.xul @@ -6,10 +6,12 @@ <preferences id="contentPreferences" hidden="true" data-category="paneContent"> +#ifdef MOZ_EME <!-- DRM content --> <preference id="media.eme.enabled" name="media.eme.enabled" type="bool"/> +#endif <!-- Popups --> <preference id="dom.disable_open_during_load" @@ -40,6 +42,7 @@ <html:a class="help-button" target="_blank" aria-label="&helpButton.label;"></html:a> </hbox> +#ifdef MOZ_EME <groupbox id="drmGroup" data-category="paneContent" hidden="true"> <caption><label>&drmContent.label;</label></caption> <grid id="contentGrid2"> @@ -60,6 +63,7 @@ </rows> </grid> </groupbox> +#endif <groupbox id="notificationsGroup" data-category="paneContent" hidden="true"> <caption><label>¬ificationsPolicy.label;</label></caption> diff --git a/browser/components/preferences/in-content/jar.mn b/browser/components/preferences/in-content/jar.mn index 52f536e96..3497ff555 100644 --- a/browser/components/preferences/in-content/jar.mn +++ b/browser/components/preferences/in-content/jar.mn @@ -12,7 +12,7 @@ browser.jar: content/browser/preferences/in-content/containers.js content/browser/preferences/in-content/advanced.js content/browser/preferences/in-content/applications.js - content/browser/preferences/in-content/content.js +* content/browser/preferences/in-content/content.js content/browser/preferences/in-content/sync.js content/browser/preferences/in-content/security.js content/browser/preferences/in-content/search.js diff --git a/mobile/android/app/mobile.js b/mobile/android/app/mobile.js index 2a64297c4..9a28bd716 100644 --- a/mobile/android/app/mobile.js +++ b/mobile/android/app/mobile.js @@ -627,6 +627,12 @@ pref("media.mediasource.enabled", true); pref("media.mediadrm-widevinecdm.visible", true); +#ifdef MOZ_EME +// Enable EME(Encrypted media extensions?) +pref("media.eme.enabled", false); +pref("media.eme.apiVisible", false); +#endif + // optimize images memory usage pref("image.downscale-during-decode.enabled", true); |