From 6d278c7bee5e156fcdfae5e3d7ff5f3e504ee3f0 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Tue, 15 Aug 2017 18:30:23 +0200 Subject: [PATCH] Backed out changeset d25a5921d961 (bug 1369815) --- .../org/mozilla/gecko/GeckoViewSettings.java | 42 ------------------- .../modules/geckoview/GeckoViewSettings.jsm | 28 +------------ 2 files changed, 2 insertions(+), 68 deletions(-) diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewSettings.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewSettings.java index febfedcf6bbd..ee07ca256449 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewSettings.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewSettings.java @@ -22,24 +22,6 @@ public final class GeckoViewSettings { } } - public enum DisplayMode { - // This needs to match nsIDocShell.idl - BROWSER(0), - MINIMAL_UI(1), - STANDALONE(2), - FULLSCREEN(3); - - private final int mMode; - - DisplayMode(int mode) { - mMode = mode; - } - - public int value() { - return mMode; - } - } - /* * Key to enabled and disable tracking protection. */ @@ -50,13 +32,6 @@ public final class GeckoViewSettings { */ public static final Key USE_PRIVATE_MODE = new Key("usePrivateMode"); - - /* - * Key to specify which display-mode we should use - */ - public static final Key USE_DISPLAY_MODE = - new Key("useDisplayMode"); - /* * Key to enabled and disable multiprocess browsing (e10s). * Note: can only be set during GeckoView initialization, changes during an @@ -103,23 +78,6 @@ public final class GeckoViewSettings { } } - public void setInt(final Key key, int value) { - synchronized (mBundle) { - final Object old = mBundle.get(key.text); - if (old != null && old.equals(value)) { - return; - } - mBundle.putInt(key.text, value); - } - dispatchUpdate(); - } - - public int getInt(final Key key) { - synchronized (mBundle) { - return mBundle.getInt(key.text); - } - } - /* package */ GeckoBundle asBundle() { return mBundle; } diff --git a/mobile/android/modules/geckoview/GeckoViewSettings.jsm b/mobile/android/modules/geckoview/GeckoViewSettings.jsm index cb8c03abf67c..98c8071630b4 100644 --- a/mobile/android/modules/geckoview/GeckoViewSettings.jsm +++ b/mobile/android/modules/geckoview/GeckoViewSettings.jsm @@ -28,7 +28,6 @@ class GeckoViewSettings extends GeckoViewModule { init() { this._isSafeBrowsingInit = false; this._useTrackingProtection = false; - this._displayMode = Ci.nsIDocShell.DISPLAY_MODE_BROWSER; // We only allow to set this setting during initialization, further updates // will be ignored. @@ -39,7 +38,6 @@ class GeckoViewSettings extends GeckoViewModule { debug("onSettingsUpdate: " + JSON.stringify(this.settings)); this.useTrackingProtection = !!this.settings.useTrackingProtection; - this.useDisplayMode = this.settings.useDisplayMode; } get useTrackingProtection() { @@ -52,8 +50,8 @@ class GeckoViewSettings extends GeckoViewModule { this._isSafeBrowsingInit = true; } if (aUse != this._useTrackingProtection) { - this.messageManager.loadFrameScript('data:,' + - `docShell.useTrackingProtection = ${aUse}`, + this.messageManager.loadFrameScript("data:," + + "docShell.useTrackingProtection = " + aUse, true ); this._useTrackingProtection = aUse; @@ -77,27 +75,5 @@ class GeckoViewSettings extends GeckoViewModule { this.browser.removeAttribute("remote"); } parentNode.appendChild(this.browser); - - // Re-set the display mode, as we probably need to set it on - // a different docshell now - this.useDisplayMode = this.useDisplayMode; - } - - get useDisplayMode() { - return this._displayMode; - } - - set useDisplayMode(aMode) { - if (!this.useMultiprocess) { - this.window.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDocShell) - .displayMode = aMode; - } else { - this.messageManager.loadFrameScript('data:,' + - `docShell.displayMode = ${aMode}`, - true - ); - } - this._displayMode = aMode; } }