Backed out changeset d25a5921d961 (bug 1369815)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 15 Aug 2017 18:30:23 +0200
changeset 374808 76f15802d69c2835eaa13e92df4bee34637f3b6c
parent 374807 4871dc084c88feecdbabe1b3a9acdb5ffaa71a2b
child 374809 7780a4af90284e7f812d44ec32adb68dcbcc94b1
push id93770
push userarchaeopteryx@coole-files.de
push dateTue, 15 Aug 2017 16:31:29 +0000
treeherdermozilla-inbound@4af3a98934c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1369815
milestone57.0a1
backs outd25a5921d961a0f5dc392a785f5d46704ca82bfa
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset d25a5921d961 (bug 1369815)
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewSettings.java
mobile/android/modules/geckoview/GeckoViewSettings.jsm
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewSettings.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewSettings.java
@@ -17,51 +17,26 @@ public final class GeckoViewSettings {
     private static class Key<T> {
         private final String text;
 
         public Key(final String text) {
             this.text = text;
         }
     }
 
-    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.
      */
     public static final Key<Boolean> USE_TRACKING_PROTECTION =
         new Key<Boolean>("useTrackingProtection");
     /*
      * Key to enabled and disable private mode browsing.
      */
     public static final Key<Boolean> USE_PRIVATE_MODE =
         new Key<Boolean>("usePrivateMode");
-
-    /*
-     * Key to specify which display-mode we should use
-     */
-    public static final Key<Boolean> USE_DISPLAY_MODE =
-        new Key<Boolean>("useDisplayMode");
-
     /*
      * Key to enabled and disable multiprocess browsing (e10s).
      * Note: can only be set during GeckoView initialization, changes during an
      * active GeckoView session will be ignored.
      */
     public static final Key<Boolean> USE_MULTIPROCESS =
         new Key<Boolean>("useMultiprocess");
 
@@ -98,33 +73,16 @@ public final class GeckoViewSettings {
     }
 
     public boolean getBoolean(final Key<Boolean> key) {
         synchronized (mBundle) {
             return mBundle.getBoolean(key.text);
         }
     }
 
-    public void setInt(final Key<Boolean> 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<Boolean> key) {
-        synchronized (mBundle) {
-            return mBundle.getInt(key.text);
-        }
-    }
-
     /* package */ GeckoBundle asBundle() {
         return mBundle;
     }
 
     private void dispatchUpdate() {
         if (mEventDispatcher != null) {
             mEventDispatcher.dispatch("GeckoView:UpdateSettings", null);
         }
--- a/mobile/android/modules/geckoview/GeckoViewSettings.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewSettings.jsm
@@ -23,42 +23,40 @@ function debug(aMsg) {
 
 // Handles GeckoView settings including:
 // * tracking protection
 // * multiprocess
 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.
     this.useMultiprocess = !!this.settings.useMultiprocess;
   }
 
   onSettingsUpdate() {
     debug("onSettingsUpdate: " + JSON.stringify(this.settings));
 
     this.useTrackingProtection = !!this.settings.useTrackingProtection;
-    this.useDisplayMode = this.settings.useDisplayMode;
   }
 
   get useTrackingProtection() {
     return this._useTrackingProtection;
   }
 
   set useTrackingProtection(aUse) {
     if (aUse && !this._isSafeBrowsingInit) {
       SafeBrowsing.init();
       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;
     }
   }
 
   get useMultiprocess() {
     return this.browser.getAttribute("remote") == "true";
@@ -72,32 +70,10 @@ class GeckoViewSettings extends GeckoVie
     parentNode.removeChild(this.browser);
 
     if (aUse) {
       this.browser.setAttribute("remote", "true");
     } else {
       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;
   }
 }