Backed out 12 changesets (bug 1460874) for geckoview failures at geckoview.test.RuntimeSettingsTest.automaticFontSize.
authorBrindusan Cristian <cbrindusan@mozilla.com>
Wed, 13 Feb 2019 23:37:14 +0200
changeset 459062 cd616c3e3eea
parent 459061 ba60c53e2606
child 459063 9b2bfb8871c9
push id111913
push usershindli@mozilla.com
push dateThu, 14 Feb 2019 05:01:59 +0000
treeherdermozilla-inbound@a0752d7e8073 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1460874
milestone67.0a1
backs out593a2316ac28
3d4297e781cb
2020cb134d1f
9fc145133f20
17fbff3da236
1026b786e779
78f59df737fc
81c4e88003a5
02f24dec5ae4
c7fce6c79bef
d42e39761eb8
2d5e902b5b88
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 12 changesets (bug 1460874) for geckoview failures at geckoview.test.RuntimeSettingsTest.automaticFontSize. Backed out changeset 593a2316ac28 (bug 1460874) Backed out changeset 3d4297e781cb (bug 1460874) Backed out changeset 2020cb134d1f (bug 1460874) Backed out changeset 9fc145133f20 (bug 1460874) Backed out changeset 17fbff3da236 (bug 1460874) Backed out changeset 1026b786e779 (bug 1460874) Backed out changeset 78f59df737fc (bug 1460874) Backed out changeset 81c4e88003a5 (bug 1460874) Backed out changeset 02f24dec5ae4 (bug 1460874) Backed out changeset c7fce6c79bef (bug 1460874) Backed out changeset d42e39761eb8 (bug 1460874) Backed out changeset 2d5e902b5b88 (bug 1460874)
mobile/android/base/java/org/mozilla/gecko/GeckoApplication.java
mobile/android/base/java/org/mozilla/gecko/GeckoFontScaleListener.java
mobile/android/components/BrowserCLH.js
mobile/android/components/MobileComponents.manifest
mobile/android/geckoview/api.txt
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/RuntimeSettingsTest.kt
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoFontScaleListener.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoApplication.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApplication.java
@@ -6,17 +6,16 @@ package org.mozilla.gecko;
 
 import android.Manifest;
 import android.app.Activity;
 import android.app.Application;
 import android.app.Service;
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.Intent;
-import android.content.SharedPreferences;
 import android.content.res.Configuration;
 import android.graphics.Bitmap;
 import android.net.Uri;
 import android.os.Bundle;
 import android.os.Environment;
 import android.os.Parcelable;
 import android.os.Process;
 import android.os.SystemClock;
@@ -45,17 +44,16 @@ import org.mozilla.gecko.icons.Icons;
 import org.mozilla.gecko.lwt.LightweightTheme;
 import org.mozilla.gecko.mdns.MulticastDNSManager;
 import org.mozilla.gecko.media.AudioFocusAgent;
 import org.mozilla.gecko.mozglue.SafeIntent;
 import org.mozilla.gecko.notifications.NotificationClient;
 import org.mozilla.gecko.notifications.NotificationHelper;
 import org.mozilla.gecko.permissions.Permissions;
 import org.mozilla.gecko.preferences.DistroSharedPrefsImport;
-import org.mozilla.gecko.preferences.GeckoPreferences;
 import org.mozilla.gecko.pwa.PwaUtils;
 import org.mozilla.gecko.telemetry.TelemetryBackgroundReceiver;
 import org.mozilla.gecko.util.ActivityResultHandler;
 import org.mozilla.gecko.util.BitmapUtils;
 import org.mozilla.gecko.util.BundleEventListener;
 import org.mozilla.gecko.util.EventCallback;
 import org.mozilla.gecko.util.GeckoBundle;
 import org.mozilla.gecko.util.HardwareUtils;
@@ -69,18 +67,17 @@ import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.InputStream;
 import java.io.IOException;
 import java.lang.reflect.Method;
 import java.net.URL;
 import java.util.UUID;
 
 public class GeckoApplication extends Application
-                              implements HapticFeedbackDelegate,
-                                         SharedPreferences.OnSharedPreferenceChangeListener {
+                              implements HapticFeedbackDelegate {
     private static final String LOG_TAG = "GeckoApplication";
     public static final String ACTION_DEBUG = "org.mozilla.gecko.DEBUG";
     private static final String MEDIA_DECODING_PROCESS_CRASH = "MEDIA_DECODING_PROCESS_CRASH";
 
     private boolean mInBackground;
     private boolean mPausedGecko;
     private boolean mIsInitialResume;
 
@@ -210,33 +207,28 @@ public class GeckoApplication extends Ap
         });
 
         GeckoNetworkManager.getInstance().stop();
     }
 
     public void onApplicationForeground() {
         if (mIsInitialResume) {
             GeckoBatteryManager.getInstance().start(this);
+            GeckoFontScaleListener.getInstance().initialize(this);
             GeckoNetworkManager.getInstance().start(this);
             mIsInitialResume = false;
         } else if (mPausedGecko) {
             GeckoThread.onResume();
             mPausedGecko = false;
             GeckoNetworkManager.getInstance().start(this);
         }
 
         mInBackground = false;
     }
 
-    private void initFontScaleListener() {
-        final SharedPreferences prefs = GeckoSharedPrefs.forApp(this);
-        prefs.registerOnSharedPreferenceChangeListener(this);
-        onSharedPreferenceChanged(prefs, GeckoPreferences.PREFS_SYSTEM_FONT_SIZE);
-    }
-
     private static GeckoRuntime sGeckoRuntime;
     public static GeckoRuntime getRuntime() {
         return sGeckoRuntime;
     }
 
     public static GeckoRuntime ensureRuntime(@NonNull Context context) {
         if (sGeckoRuntime != null) {
             return sGeckoRuntime;
@@ -281,34 +273,27 @@ public class GeckoApplication extends Ap
 
             Bundle extras = intent.getExtras();
             if (extras != null) {
                 builder.extras(extras);
             }
         }
 
         sGeckoRuntime = GeckoRuntime.create(context, builder.build());
-        ((GeckoApplication) GeckoAppShell.getApplicationContext()).initFontScaleListener();
         return sGeckoRuntime;
     }
 
     @Override
     public void onCreate() {
         Log.i(LOG_TAG, "zerdatime " + SystemClock.elapsedRealtime() +
               " - application start");
 
         final Context oldContext = GeckoAppShell.getApplicationContext();
         if (oldContext instanceof GeckoApplication) {
             ((GeckoApplication) oldContext).onDestroy();
-            if (sGeckoRuntime != null) {
-                // The listener is registered when the runtime gets created, so if we already have
-                // a runtime, we need to transfer the listener registration to the new instance.
-                // The old listener will be unregistered through onDestroy().
-                GeckoSharedPrefs.forApp(this).registerOnSharedPreferenceChangeListener(this);
-            }
         }
 
         final Context context = getApplicationContext();
         if (AppConstants.MOZ_CRASHREPORTER) {
             GeckoAppShell.ensureCrashHandling(getCrashHandlerServiceClass());
         }
         GeckoAppShell.setApplicationContext(context);
 
@@ -432,17 +417,16 @@ public class GeckoApplication extends Ap
                 "Share:Text",
                 null);
         EventDispatcher.getInstance().unregisterBackgroundThreadListener(mListener,
                 "PushServiceAndroidGCM:Configure",
                 "Bookmark:Insert",
                 "Image:SetAs",
                 "Profile:Create",
                 null);
-        GeckoSharedPrefs.forApp(this).unregisterOnSharedPreferenceChangeListener(this);
 
         GeckoService.unregister();
     }
 
     /* package */ boolean initPushService() {
         // It's fine to throw GCM initialization onto a background thread; the registration process requires
         // network access, so is naturally asynchronous.  This, of course, races against Gecko page load of
         // content requiring GCM-backed services, like Web Push.  There's nothing to be done here.
@@ -920,17 +904,9 @@ public class GeckoApplication extends Ap
     @Override // HapticFeedbackDelegate
     public void performHapticFeedback(final int effect) {
         final Activity currentActivity =
                 GeckoActivityMonitor.getInstance().getCurrentActivity();
         if (currentActivity != null) {
             currentActivity.getWindow().getDecorView().performHapticFeedback(effect);
         }
     }
-
-    @Override // OnSharedPreferenceChangeListener
-    public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
-        if (GeckoPreferences.PREFS_SYSTEM_FONT_SIZE.equals(key)) {
-            final boolean enabled = prefs.getBoolean(GeckoPreferences.PREFS_SYSTEM_FONT_SIZE, false);
-            getRuntime().getSettings().setAutomaticFontSizeAdjustment(enabled);
-        }
-    }
 }
rename from mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoFontScaleListener.java
rename to mobile/android/base/java/org/mozilla/gecko/GeckoFontScaleListener.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoFontScaleListener.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoFontScaleListener.java
@@ -1,174 +1,134 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.geckoview;
+package org.mozilla.gecko;
 
-import org.mozilla.gecko.util.ThreadUtils;
-import org.mozilla.geckoview.GeckoRuntimeSettings;
-
-import android.annotation.SuppressLint;
 import android.content.ContentResolver;
 import android.content.Context;
 import android.database.ContentObserver;
+import android.content.SharedPreferences;
 import android.net.Uri;
 import android.provider.Settings;
 import android.support.annotation.UiThread;
 import android.util.Log;
 
-/**
- * A class that automatically adjusts font size and font inflation settings for web content in Gecko
- * in accordance with the device's OS font scale setting.
- *
- * @see android.provider.Settings.System#FONT_SCALE
- */
-/* package */ final class GeckoFontScaleListener
-        extends ContentObserver {
+import org.mozilla.gecko.preferences.GeckoPreferences;
+
+class GeckoFontScaleListener
+        extends ContentObserver
+        implements SharedPreferences.OnSharedPreferenceChangeListener {
     private static final String LOGTAG = "GeckoFontScaleListener";
 
-    // We're referencing the *application* context, so this is in fact okay.
-    @SuppressLint("StaticFieldLeak")
-    private static final GeckoFontScaleListener sInstance = new GeckoFontScaleListener();
-
-    private Context mApplicationContext;
-    private GeckoRuntimeSettings mSettings;
+    private static final String PREF_SYSTEM_FONT_SCALE = "font.size.systemFontScale";
+    private static final String PREF_FONT_INFLATION = "font.size.inflation.minTwips";
+    private static final int FONT_INFLATION_OFF = 0;
+    private static final int FONT_INFLATION_ON_DEFAULT_VALUE = 120;
+    private static final float DEFAULT_FONT_SCALE = 1.0f;
 
-    private boolean mAttached;
-    private boolean mEnabled;
-    private boolean mRunning;
+    private static final GeckoFontScaleListener listenerInstance = new GeckoFontScaleListener();
 
-    private float mPrevGeckoFontScale;
-    private boolean mPrevFontInflationState;
+    private Context applicationContext;
+    private boolean initialized;
+    private boolean running;
 
     public static GeckoFontScaleListener getInstance() {
-        return sInstance;
+        return listenerInstance;
     }
 
     private GeckoFontScaleListener() {
-        // Ensure the ContentObserver callback runs on the UI thread.
-        super(ThreadUtils.getUiHandler());
+        super(null);
     }
 
-    /**
-     * Prepare the GeckoFontScaleListener for usage. If it has been previously enabled, it will
-     * now start actively working.
-     */
-    public void attachToContext(final Context context,
-                                final GeckoRuntimeSettings settings) {
-        ThreadUtils.assertOnUiThread();
+    public synchronized void initialize(final Context context) {
+        if (initialized) {
+            Log.w(LOGTAG, "Already initialized!");
+            return;
+        }
 
-        if (mAttached) {
-            Log.w(LOGTAG, "Already attached!");
+        applicationContext = context.getApplicationContext();
+        SharedPreferences prefs = GeckoSharedPrefs.forApp(applicationContext);
+        prefs.registerOnSharedPreferenceChangeListener(this);
+        onPrefChange(prefs);
+        initialized = true;
+    }
+
+    public synchronized void shutdown() {
+        if (!initialized) {
+            Log.w(LOGTAG, "Already shut down!");
             return;
         }
 
-        mAttached = true;
-        mSettings = settings;
-        mApplicationContext = context.getApplicationContext();
-        onEnabledChange();
+        GeckoSharedPrefs.forApp(applicationContext).unregisterOnSharedPreferenceChangeListener(this);
+        stop();
+        applicationContext = null;
+        initialized = false;
     }
 
-    /**
-     * Detaches the context and also stops the GeckoFontScaleListener if it was previously enabled.
-     * This will also restore the previously used font size settings.
-     */
-    public void detachFromContext() {
-        ThreadUtils.assertOnUiThread();
+    private synchronized void start() {
+        if (running) {
+            return;
+        }
 
-        if (!mAttached) {
-            Log.w(LOGTAG, "Already detached!");
+        ContentResolver contentResolver = applicationContext.getContentResolver();
+        Uri fontSizeSetting = Settings.System.getUriFor(Settings.System.FONT_SCALE);
+        contentResolver.registerContentObserver(fontSizeSetting, false, this);
+        onSystemFontScaleChange(contentResolver, false);
+
+        running = true;
+    }
+
+    private synchronized void stop() {
+        if (!running) {
             return;
         }
 
-        stop();
-        mApplicationContext = null;
-        mSettings = null;
-        mAttached = false;
+        ContentResolver contentResolver = applicationContext.getContentResolver();
+        contentResolver.unregisterContentObserver(this);
+        onSystemFontScaleChange(contentResolver, /*stopping*/ true);
+
+        running = false;
     }
 
-    /**
-     * Controls whether the GeckoFontScaleListener should automatically adjust font sizes for web
-     * content in Gecko. When disabling, this will restore the previously used font size settings.
-     *
-     * <p>This method can be called at any time, but the GeckoFontScaleListener won't start actively
-     * adjusting font sizes until it has been attached to a context.
-     *
-     * @param enabled True if automatic font size setting should be enabled.
-     */
-    public void setEnabled(boolean enabled) {
-        ThreadUtils.assertOnUiThread();
-        mEnabled = enabled;
-        onEnabledChange();
+    private void onSystemFontScaleChange(final ContentResolver contentResolver, boolean stopping) {
+        float fontScale;
+        int fontInflation;
+
+        if (!stopping) { // Pref was flipped to "On" or system font scale changed.
+            fontScale = Settings.System.getFloat(contentResolver, Settings.System.FONT_SCALE, DEFAULT_FONT_SCALE);
+            fontInflation = Math.round(FONT_INFLATION_ON_DEFAULT_VALUE * fontScale);
+        } else { // Pref was flipped to "Off".
+            fontScale = DEFAULT_FONT_SCALE;
+            fontInflation = FONT_INFLATION_OFF;
+        }
+
+        PrefsHelper.setPref(PREF_FONT_INFLATION, fontInflation);
+        PrefsHelper.setPref(PREF_SYSTEM_FONT_SCALE, Math.round(fontScale * 100));
     }
 
-    /**
-     * Get whether the GeckoFontScaleListener is currently enabled.
-     *
-     * @return True if the GeckoFontScaleListener is currently enabled.
-     */
-    public boolean getEnabled() {
-        return mEnabled;
-    }
+    private void onPrefChange(final SharedPreferences prefs) {
+        boolean useSystemFontScale = prefs.getBoolean(GeckoPreferences.PREFS_SYSTEM_FONT_SIZE, false);
 
-    private void onEnabledChange() {
-        if (!mAttached) {
-            return;
-        }
-
-        if (mEnabled) {
+        if (useSystemFontScale) {
             start();
         } else {
             stop();
         }
     }
 
-    private void start() {
-        if (mRunning) {
-            return;
-        }
-
-        mPrevGeckoFontScale = mSettings.getFontSizeFactor();
-        mPrevFontInflationState = mSettings.getFontInflationEnabled();
-        ContentResolver contentResolver = mApplicationContext.getContentResolver();
-        Uri fontSizeSetting = Settings.System.getUriFor(Settings.System.FONT_SCALE);
-        contentResolver.registerContentObserver(fontSizeSetting, false, this);
-        onSystemFontScaleChange(contentResolver, false);
-
-        mRunning = true;
+    @Override
+    public void onChange(boolean selfChange) {
+        onSystemFontScaleChange(applicationContext.getContentResolver(), false);
     }
 
-    private void stop() {
-        if (!mRunning) {
+    @UiThread // According to the docs.
+    @Override
+    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
+        if (!GeckoPreferences.PREFS_SYSTEM_FONT_SIZE.equals(key)) {
             return;
         }
 
-        ContentResolver contentResolver = mApplicationContext.getContentResolver();
-        contentResolver.unregisterContentObserver(this);
-        onSystemFontScaleChange(contentResolver, /*stopping*/ true);
-
-        mRunning = false;
-    }
-
-    private void onSystemFontScaleChange(final ContentResolver contentResolver, boolean stopping) {
-        float fontScale;
-        boolean fontInflationEnabled;
-
-        if (!stopping) { // Either we were enabled, or else the system font scale changed.
-            fontScale = Settings.System.getFloat(contentResolver, Settings.System.FONT_SCALE, mPrevGeckoFontScale);
-            fontInflationEnabled = true;
-        } else { // We were turned off.
-            fontScale = mPrevGeckoFontScale;
-            fontInflationEnabled = mPrevFontInflationState;
-        }
-
-        mSettings.setFontInflationEnabledInternal(fontInflationEnabled);
-        mSettings.setFontSizeFactorInternal(fontScale);
-    }
-
-    @UiThread // See constructor.
-    @Override
-    public void onChange(boolean selfChange) {
-        onSystemFontScaleChange(mApplicationContext.getContentResolver(), false);
+        onPrefChange(sharedPreferences);
     }
 }
--- a/mobile/android/components/BrowserCLH.js
+++ b/mobile/android/components/BrowserCLH.js
@@ -4,19 +4,17 @@
 "use strict";
 
 const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   ActorManagerParent: "resource://gre/modules/ActorManagerParent.jsm",
   AppConstants: "resource://gre/modules/AppConstants.jsm",
   DelayedInit: "resource://gre/modules/DelayedInit.jsm",
-  EventDispatcher: "resource://gre/modules/Messaging.jsm",
   GeckoViewUtils: "resource://gre/modules/GeckoViewUtils.jsm",
-  Preferences: "resource://gre/modules/Preferences.jsm",
   Services: "resource://gre/modules/Services.jsm",
 });
 
 function BrowserCLH() {
   this.wrappedJSObject = this;
 }
 
 BrowserCLH.prototype = {
@@ -171,42 +169,16 @@ BrowserCLH.prototype = {
           name: "ActionBarHandler",
           options: {
             capture: true,
             mozSystemGroup: true,
           },
         });
         break;
       }
-
-      case "profile-after-change": {
-        EventDispatcher.instance.registerListener(this, "GeckoView:SetDefaultPrefs");
-        break;
-      }
-    }
-  },
-
-  onEvent(aEvent, aData, aCallback) {
-    switch (aEvent) {
-      case "GeckoView:SetDefaultPrefs": {
-        // While we want to allow setting certain preferences via GeckoView, we
-        // don't want to let it take over completely the management of those
-        // preferences. Therefore we don't handle the "ResetUserPrefs" message,
-        // and consequently we also apply any pref changes directly, i.e. *not*
-        // on the default branch.
-        const prefs = new Preferences();
-        for (const name of Object.keys(aData)) {
-          try {
-            prefs.set(name, aData[name]);
-          } catch (e) {
-            Cu.reportError(`Failed to set preference ${name}: ${e}`);
-          }
-        }
-        break;
-      }
     }
   },
 
   _initLoginManagerEvents: function(aWindow) {
     if (Services.prefs.getBoolPref("reftest.remote", false)) {
       // XXX known incompatibility between reftest harness and form-fill.
       return;
     }
--- a/mobile/android/components/MobileComponents.manifest
+++ b/mobile/android/components/MobileComponents.manifest
@@ -60,17 +60,16 @@ contract @mozilla.org/addons/web-install
 # HelperAppDialog.js
 component {e9d277a0-268a-4ec2-bb8c-10fdf3e44611} HelperAppDialog.js
 contract @mozilla.org/helperapplauncherdialog;1 {e9d277a0-268a-4ec2-bb8c-10fdf3e44611}
 
 # BrowserCLH.js
 component {be623d20-d305-11de-8a39-0800200c9a66} BrowserCLH.js application={aa3c5121-dab2-40e2-81ca-7ea25febc110}
 contract @mozilla.org/browser/browser-clh;1 {be623d20-d305-11de-8a39-0800200c9a66}
 category app-startup BrowserCLH service,@mozilla.org/browser/browser-clh;1
-category profile-after-change BrowserCLH @mozilla.org/browser/browser-clh;1
 
 # ContentDispatchChooser.js
 component {5a072a22-1e66-4100-afc1-07aed8b62fc5} ContentDispatchChooser.js
 contract @mozilla.org/content-dispatch-chooser;1 {5a072a22-1e66-4100-afc1-07aed8b62fc5}
 
 # AddonUpdateService.js
 component {93c8824c-9b87-45ae-bc90-5b82a1e4d877} AddonUpdateService.js
 contract @mozilla.org/browser/addon-update-service;1 {93c8824c-9b87-45ae-bc90-5b82a1e4d877}
--- a/mobile/android/geckoview/api.txt
+++ b/mobile/android/geckoview/api.txt
@@ -202,57 +202,48 @@ package org.mozilla.geckoview {
   }
 
   public static interface GeckoRuntime.Delegate {
     method @android.support.annotation.UiThread public void onShutdown();
   }
 
   @android.support.annotation.AnyThread public final class GeckoRuntimeSettings extends org.mozilla.geckoview.RuntimeSettings {
     method @android.support.annotation.NonNull public java.lang.String[] getArguments();
-    method public boolean getAutomaticFontSizeAdjustment();
     method public boolean getConsoleOutputEnabled();
     method @android.support.annotation.NonNull public org.mozilla.geckoview.ContentBlocking.Settings getContentBlocking();
     method @android.support.annotation.Nullable public java.lang.Class<?> getCrashHandler();
     method @android.support.annotation.Nullable public java.lang.Float getDisplayDensityOverride();
     method @android.support.annotation.Nullable public java.lang.Integer getDisplayDpiOverride();
     method @android.support.annotation.NonNull public android.os.Bundle getExtras();
-    method public boolean getFontInflationEnabled();
-    method public float getFontSizeFactor();
     method public boolean getJavaScriptEnabled();
     method @android.support.annotation.Nullable public java.lang.String[] getLocales();
     method public boolean getPauseForDebuggerEnabled();
     method public boolean getRemoteDebuggingEnabled();
     method @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoRuntime getRuntime();
     method @android.support.annotation.Nullable public android.graphics.Rect getScreenSizeOverride();
     method public boolean getUseContentProcessHint();
     method public boolean getUseMaxScreenDepth();
     method public boolean getWebFontsEnabled();
-    method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setAutomaticFontSizeAdjustment(boolean);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setConsoleOutputEnabled(boolean);
-    method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setFontInflationEnabled(boolean);
-    method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setFontSizeFactor(float);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setJavaScriptEnabled(boolean);
     method public void setLocales(@android.support.annotation.Nullable java.lang.String[]);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setRemoteDebuggingEnabled(boolean);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setWebFontsEnabled(boolean);
     field public static final android.os.Parcelable.Creator<org.mozilla.geckoview.GeckoRuntimeSettings> CREATOR;
   }
 
   @android.support.annotation.AnyThread public static final class GeckoRuntimeSettings.Builder extends org.mozilla.geckoview.RuntimeSettings.Builder<Settings extends org.mozilla.geckoview.RuntimeSettings> {
     ctor public Builder();
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder arguments(@android.support.annotation.NonNull java.lang.String[]);
-    method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder automaticFontSizeAdjustment(boolean);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder consoleOutput(boolean);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder contentBlocking(@android.support.annotation.NonNull org.mozilla.geckoview.ContentBlocking.Settings);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder crashHandler(java.lang.Class<?>);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder displayDensityOverride(float);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder displayDpiOverride(int);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder extras(@android.support.annotation.NonNull android.os.Bundle);
-    method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder fontInflation(boolean);
-    method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder fontSizeFactor(float);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder javaScriptEnabled(boolean);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder locales(java.lang.String[]);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder pauseForDebugger(boolean);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder remoteDebuggingEnabled(boolean);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder screenSizeOverride(int, int);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder useContentProcessHint(boolean);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean);
     method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder webFontsEnabled(boolean);
deleted file mode 100644
--- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/RuntimeSettingsTest.kt
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
- * Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-package org.mozilla.geckoview.test
-
-import android.provider.Settings
-import android.support.test.InstrumentationRegistry
-import android.support.test.filters.MediumTest
-import android.support.test.runner.AndroidJUnit4
-import org.hamcrest.Matchers.*
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mozilla.geckoview.test.rule.GeckoSessionTestRule.ReuseSession
-import org.mozilla.geckoview.test.rule.GeckoSessionTestRule.WithDevToolsAPI
-import kotlin.math.roundToInt
-
-@RunWith(AndroidJUnit4::class)
-@MediumTest
-@ReuseSession(false)
-class RuntimeSettingsTest : BaseSessionTest() {
-
-    @Test fun automaticFontSize() {
-        val settings = sessionRule.runtime.settings
-        var initialFontSize = 2.15f
-        var initialFontInflation = true
-        settings.fontSizeFactor = initialFontSize
-        assertThat("initial font scale $initialFontSize set",
-                settings.fontSizeFactor.toDouble(), closeTo(initialFontSize.toDouble(), 0.05))
-        settings.fontInflationEnabled = initialFontInflation
-        assertThat("font inflation initially set to $initialFontInflation",
-                settings.fontInflationEnabled, `is`(initialFontInflation))
-
-
-        settings.automaticFontSizeAdjustment = true
-        val contentResolver = InstrumentationRegistry.getTargetContext().contentResolver
-        val expectedFontSizeFactor = Settings.System.getFloat(contentResolver,
-                Settings.System.FONT_SCALE, 1.0f)
-        assertThat("Gecko font scale should match system font scale",
-                settings.fontSizeFactor.toDouble(), closeTo(expectedFontSizeFactor.toDouble(), 0.05))
-        assertThat("font inflation enabled",
-                settings.fontInflationEnabled, `is`(true))
-
-        settings.automaticFontSizeAdjustment = false
-        assertThat("Gecko font scale restored to previous value",
-                settings.fontSizeFactor.toDouble(), closeTo(initialFontSize.toDouble(), 0.05))
-        assertThat("font inflation restored to previous value",
-                settings.fontInflationEnabled, `is`(initialFontInflation))
-
-        // Now check with that with font inflation initially off, the initial state is still
-        // restored correctly after switching auto mode back off.
-        // Also reset font size factor back to its default value of 1.0f.
-        initialFontSize = 1.0f
-        initialFontInflation = false
-        settings.fontSizeFactor = initialFontSize
-        assertThat("initial font scale $initialFontSize set",
-                settings.fontSizeFactor.toDouble(), closeTo(initialFontSize.toDouble(), 0.05))
-        settings.fontInflationEnabled = initialFontInflation
-        assertThat("font inflation initially set to $initialFontInflation",
-                settings.fontInflationEnabled, `is`(initialFontInflation))
-
-        settings.automaticFontSizeAdjustment = true
-        assertThat("Gecko font scale should match system font scale",
-                settings.fontSizeFactor.toDouble(), closeTo(expectedFontSizeFactor.toDouble(), 0.05))
-        assertThat("font inflation enabled",
-                settings.fontInflationEnabled, `is`(true))
-
-        settings.automaticFontSizeAdjustment = false
-        assertThat("Gecko font scale restored to previous value",
-                settings.fontSizeFactor.toDouble(), closeTo(initialFontSize.toDouble(), 0.05))
-        assertThat("font inflation restored to previous value",
-                settings.fontInflationEnabled, `is`(initialFontInflation))
-    }
-
-    @WithDevToolsAPI
-    @Test fun fontSize() {
-        val settings = sessionRule.runtime.settings
-        settings.fontSizeFactor = 1.0f
-        sessionRule.session.loadTestPath(HELLO_HTML_PATH)
-        sessionRule.waitForPageStop()
-
-        val fontSizeJs = "parseFloat(window.getComputedStyle(document.querySelector('p')).fontSize)"
-        val initialFontSize = sessionRule.session.evaluateJS(fontSizeJs) as Double
-
-        val textSizeFactor = 2.0f
-        settings.fontSizeFactor = textSizeFactor
-        sessionRule.session.reload()
-        sessionRule.waitForPageStop()
-        var fontSize = sessionRule.session.evaluateJS(fontSizeJs) as Double
-        val expectedFontSize = initialFontSize * textSizeFactor
-        assertThat("old text size ${initialFontSize}px, new size should be ${expectedFontSize}px",
-                fontSize, closeTo(expectedFontSize, 0.1))
-
-        settings.fontSizeFactor = 1.0f
-        sessionRule.session.reload()
-        sessionRule.waitForPageStop()
-        fontSize = sessionRule.session.evaluateJS(fontSizeJs) as Double
-        assertThat("text size should be ${initialFontSize}px again",
-                fontSize, closeTo(initialFontSize, 0.1))
-    }
-
-    @WithDevToolsAPI
-    @Test fun fontInflation() {
-        val baseFontInflationMinTwips = 120
-        val settings = sessionRule.runtime.settings
-
-        settings.fontInflationEnabled = false;
-        settings.fontSizeFactor = 1.0f
-        val fontInflationPrefJs = "Services.prefs.getIntPref('font.size.inflation.minTwips')"
-        var prefValue = (sessionRule.evaluateChromeJS(fontInflationPrefJs) as Double).roundToInt()
-        assertThat("Gecko font inflation pref should be turned off",
-                prefValue, `is`(0))
-
-        settings.fontInflationEnabled = true;
-        prefValue = (sessionRule.evaluateChromeJS(fontInflationPrefJs) as Double).roundToInt()
-        assertThat("Gecko font inflation pref should be turned on",
-                prefValue, `is`(baseFontInflationMinTwips))
-
-        settings.fontSizeFactor = 2.0f
-        prefValue = (sessionRule.evaluateChromeJS(fontInflationPrefJs) as Double).roundToInt()
-        assertThat("Gecko font inflation pref should scale with increased font size factor",
-                prefValue, greaterThan(baseFontInflationMinTwips))
-
-        settings.fontSizeFactor = 0.5f
-        prefValue = (sessionRule.evaluateChromeJS(fontInflationPrefJs) as Double).roundToInt()
-        assertThat("Gecko font inflation pref should scale with decreased font size factor",
-                prefValue, lessThan(baseFontInflationMinTwips))
-
-        settings.fontSizeFactor = 0.0f
-        prefValue = (sessionRule.evaluateChromeJS(fontInflationPrefJs) as Double).roundToInt()
-        assertThat("setting font size factor to 0 turns off font inflation",
-                prefValue, `is`(0))
-        assertThat("GeckoRuntimeSettings returns new font inflation state, too",
-                settings.fontInflationEnabled, `is`(false))
-
-        settings.fontSizeFactor = 1.0f
-        prefValue = (sessionRule.evaluateChromeJS(fontInflationPrefJs) as Double).roundToInt()
-        assertThat("Gecko font inflation pref remains turned off",
-                prefValue, `is`(0))
-        assertThat("GeckoRuntimeSettings remains turned off",
-                settings.fontInflationEnabled, `is`(false))
-    }
-}
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
@@ -207,17 +207,16 @@ public final class GeckoRuntime implemen
             }
         }
 
         GeckoAppShell.useMaxScreenDepth(settings.getUseMaxScreenDepth());
         GeckoAppShell.setDisplayDensityOverride(settings.getDisplayDensityOverride());
         GeckoAppShell.setDisplayDpiOverride(settings.getDisplayDpiOverride());
         GeckoAppShell.setScreenSizeOverride(settings.getScreenSizeOverride());
         GeckoAppShell.setCrashHandlerService(settings.getCrashHandler());
-        GeckoFontScaleListener.getInstance().attachToContext(context, settings);
 
         final GeckoThread.InitInfo info = new GeckoThread.InitInfo();
         info.args = settings.getArguments();
         info.extras = settings.getExtras();
         info.flags = flags;
         info.prefs = settings.getPrefsMap();
 
         if (!GeckoThread.init(info)) {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
@@ -150,74 +150,16 @@ public final class GeckoRuntimeSettings 
          * @return The builder instance.
          */
         public @NonNull Builder consoleOutput(boolean enabled) {
             getSettings().mConsoleOutput.set(enabled);
             return this;
         }
 
         /**
-         * Set whether or not font sizes in web content should be automatically scaled according to
-         * the device's current system font scale setting.
-         *
-         * @param enabled A flag determining whether or not font sizes should be scaled automatically
-         *                to match the device's system font scale.
-         * @return The builder instance.
-         */
-        public @NonNull Builder automaticFontSizeAdjustment(boolean enabled) {
-            getSettings().setAutomaticFontSizeAdjustment(enabled);
-            return this;
-        }
-
-        /**
-         * Set a font size factor that will operate as a global text zoom. All font sizes will be
-         * multiplied by this factor.
-         *
-         * <p>The default factor is 1.0.
-         *
-         * <p>This setting cannot be modified if
-         * {@link Builder#automaticFontSizeAdjustment automatic font size adjustment}
-         * has already been enabled.
-         *
-         * @param fontSizeFactor The factor to be used for scaling all text. Setting a value of 0
-         *                       disables both this feature and
-         *                       {@link Builder#fontInflation font inflation}.
-         * @return The builder instance.
-         */
-        public @NonNull Builder fontSizeFactor(float fontSizeFactor) {
-            getSettings().setFontSizeFactor(fontSizeFactor);
-            return this;
-        }
-
-        /**
-         * Set whether or not font inflation for non mobile-friendly pages should be enabled. The
-         * default value of this setting is <code>false</code>.
-         *
-         * <p>When enabled, font sizes will be increased on all pages that are lacking a
-         * &lt;meta&gt; viewport tag and have been loaded in a session using
-         * {@link GeckoSessionSettings#VIEWPORT_MODE_MOBILE}. To improve readability, the font
-         * inflation logic will attempt to increase font sizes for the main text content of the page
-         * only.
-         *
-         * <p>The magnitude of font inflation applied depends on the
-         * {@link Builder#fontSizeFactor font size factor} currently in use.
-         *
-         * <p>This setting cannot be modified if
-         * {@link Builder#automaticFontSizeAdjustment automatic font size adjustment}
-         * has already been enabled.
-         *
-         * @param enabled A flag determining whether or not font inflation should be enabled.
-         * @return The builder instance.
-         */
-        public @NonNull Builder fontInflation(boolean enabled) {
-            getSettings().setFontInflationEnabled(enabled);
-            return this;
-        }
-
-        /**
          * Set the display density override.
          *
          * @param density The display density value to use for overriding the system default.
          * @return The builder instance.
          */
         public @NonNull Builder displayDensityOverride(float density) {
             getSettings().mDisplayDensityOverride = density;
             return this;
@@ -317,20 +259,16 @@ public final class GeckoRuntimeSettings 
     /* package */ final Pref<Boolean> mJavaScript = new Pref<Boolean>(
         "javascript.enabled", true);
     /* package */ final Pref<Boolean> mRemoteDebugging = new Pref<Boolean>(
         "devtools.debugger.remote-enabled", false);
     /* package */ final Pref<Integer> mWebFonts = new Pref<Integer>(
         "browser.display.use_document_fonts", 1);
     /* package */ final Pref<Boolean> mConsoleOutput = new Pref<Boolean>(
         "geckoview.console.enabled", false);
-    /* package */ final Pref<Integer> mFontSizeFactor = new Pref<>(
-        "font.size.systemFontScale", 100);
-    /* package */ final Pref<Integer> mFontInflationMinTwips = new Pref<>(
-        "font.size.inflation.minTwips", 0);
 
     /* package */ boolean mDebugPause;
     /* package */ boolean mUseMaxScreenDepth;
     /* package */ float mDisplayDensityOverride = -1.0f;
     /* package */ int mDisplayDpiOverride;
     /* package */ int mScreenWidthOverride;
     /* package */ int mScreenHeightOverride;
     /* package */ Class<? extends Service> mCrashHandler;
@@ -582,135 +520,16 @@ public final class GeckoRuntimeSettings 
      * Get whether or not web console messages are sent to logcat.
      *
      * @return True if console output is enabled.
      */
     public boolean getConsoleOutputEnabled() {
         return mConsoleOutput.get();
     }
 
-    /**
-     * Set whether or not font sizes in web content should be automatically scaled according to
-     * the device's current system font scale setting.
-     * Disabling this setting will restore the previously used values for
-     * {@link GeckoRuntimeSettings#getFontSizeFactor()} and
-     * {@link GeckoRuntimeSettings#getFontInflationEnabled()}.
-     *
-     * @param enabled A flag determining whether or not font sizes should be scaled automatically
-     *                to match the device's system font scale.
-     * @return This GeckoRuntimeSettings instance.
-     */
-    public @NonNull GeckoRuntimeSettings setAutomaticFontSizeAdjustment(boolean enabled) {
-        GeckoFontScaleListener.getInstance().setEnabled(enabled);
-        return this;
-    }
-
-    /**
-     * Get whether or not the font sizes for web content are automatically adjusted to match the
-     * device's system font scale setting.
-     *
-     * @return True if font sizes are automatically adjusted.
-     */
-    public boolean getAutomaticFontSizeAdjustment() {
-        return GeckoFontScaleListener.getInstance().getEnabled();
-    }
-
-    private static int FONT_INFLATION_BASE_VALUE = 120;
-
-    /**
-     * Set a font size factor that will operate as a global text zoom. All font sizes will be
-     * multiplied by this factor.
-     *
-     * <p>The default factor is 1.0.
-     *
-     * <p>Currently, any changes only take effect after a reload of the session.
-     *
-     * <p>This setting cannot be modified while
-     * {@link GeckoRuntimeSettings#setAutomaticFontSizeAdjustment automatic font size adjustment}
-     * is enabled.
-     *
-     * @param fontSizeFactor The factor to be used for scaling all text. Setting a value of 0
-     *                       disables both this feature and
-     *                       {@link GeckoRuntimeSettings#setFontInflationEnabled font inflation}.
-     * @return This GeckoRuntimeSettings instance.
-     */
-    public @NonNull GeckoRuntimeSettings setFontSizeFactor(float fontSizeFactor) {
-        if (getAutomaticFontSizeAdjustment()) {
-            throw new IllegalStateException("Not allowed when automatic font size adjustment is enabled");
-        }
-        return setFontSizeFactorInternal(fontSizeFactor);
-    }
-
-    /* package */ @NonNull GeckoRuntimeSettings setFontSizeFactorInternal(float fontSizeFactor) {
-        if (fontSizeFactor < 0) {
-            throw new IllegalArgumentException("fontSizeFactor cannot be < 0");
-        }
-
-        final int fontSizePercentage = Math.round(fontSizeFactor * 100);
-        mFontSizeFactor.commit(Math.round(fontSizePercentage));
-        if (getFontInflationEnabled()) {
-            final int scaledFontInflation = Math.round(FONT_INFLATION_BASE_VALUE * fontSizeFactor);
-            mFontInflationMinTwips.commit(scaledFontInflation);
-        }
-        return this;
-    }
-
-    /**
-     * Gets the currently applied font size factor.
-     *
-     * @return The currently applied font size factor.
-     */
-    public float getFontSizeFactor() {
-        return mFontSizeFactor.get() / 100f;
-    }
-
-    /**
-     * Set whether or not font inflation for non mobile-friendly pages should be enabled. The
-     * default value of this setting is <code>false</code>.
-     *
-     * <p>When enabled, font sizes will be increased on all pages that are lacking a &lt;meta&gt;
-     * viewport tag and have been loaded in a session using
-     * {@link GeckoSessionSettings#VIEWPORT_MODE_MOBILE}. To improve readability, the font inflation
-     * logic will attempt to increase font sizes for the main text content of the page only.
-     *
-     * <p>The magnitude of font inflation applied depends on the
-     * {@link GeckoRuntimeSettings#setFontSizeFactor font size factor} currently in use.
-     *
-     * <p>Currently, any changes only take effect after a reload of the session.
-     *
-     * <p>This setting cannot be modified while
-     * {@link GeckoRuntimeSettings#setAutomaticFontSizeAdjustment automatic font size adjustment}
-     * is enabled.
-     *
-     * @param enabled A flag determining whether or not font inflation should be enabled.
-     * @return This GeckoRuntimeSettings instance.
-     */
-    public @NonNull GeckoRuntimeSettings setFontInflationEnabled(boolean enabled) {
-        if (getAutomaticFontSizeAdjustment()) {
-            throw new IllegalStateException("Not allowed when automatic font size adjustment is enabled");
-        }
-        return setFontInflationEnabledInternal(enabled);
-    }
-
-    /* package */ @NonNull GeckoRuntimeSettings setFontInflationEnabledInternal(boolean enabled) {
-        final int minTwips =
-                enabled ? Math.round(FONT_INFLATION_BASE_VALUE * getFontSizeFactor()) : 0;
-        mFontInflationMinTwips.commit(minTwips);
-        return this;
-    }
-
-    /**
-     * Get whether or not font inflation for non mobile-friendly pages is currently enabled.
-     *
-     * @return True if font inflation is enabled.
-     */
-    public boolean getFontInflationEnabled() {
-        return mFontInflationMinTwips.get() > 0;
-    }
-
     @Override // Parcelable
     public void writeToParcel(Parcel out, int flags) {
         super.writeToParcel(out, flags);
 
         ParcelableUtils.writeBoolean(out, mUseContentProcess);
         out.writeStringArray(mArgs);
         mExtras.writeToParcel(out, flags);
         ParcelableUtils.writeBoolean(out, mDebugPause);
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
@@ -4,22 +4,16 @@ title: API Changelog
 description: GeckoView API Changelog.
 nav_exclude: true
 exclude: true
 ---
 
 <h1> GeckoView API Changelog. </h1>
 
 ## v67
-- Added GeckoRuntimeSetting for automatically adjusting font size settings
-  depending on the OS-level font size setting.
-
-- Added GeckoRuntimeSettings for setting a font size scaling factor, and for
-  enabling font inflation for non-mobile-friendly pages.
-
 - Change `ContentBlocking.AT_ALL` and `ContentBlocking.SB_ALL` values to mirror
   the actual constants they encompass.
 
 - Added nested `ContentBlocking` runtime settings.
 
 - Added `RuntimeSettings` base class to support nested settings.
 
 - Added `baseUri` to [`ContentDelegate.ContextElement`][65.21] and changed
@@ -129,9 +123,9 @@ exclude: true
 [65.23]: ../GeckoSession.FinderResult.html
 
 - Update [`CrashReporter#sendCrashReport`][65.24] to return the crash ID as a
   [`GeckoResult<String>`][65.25].
 
 [65.24]: ../CrashReporter.html#sendCrashReport-android.content.Context-android.os.Bundle-java.lang.String-
 [65.25]: ../GeckoResult.html
 
-[api-version]: fc7356566f3eb780127a4dbc135810a883a0e650
+[api-version]: 1a31e792d4802cb18219b7ac5281a63a89a1df75