Bug 1501804 - browser.display.use_document_fonts is integer, not boolean. r=snorp a=jcristau
☠☠ backed out by d74a918ff930 ☠ ☠
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 05 Nov 2018 16:04:26 +0000
changeset 501164 a691b474af0cac5d467179f06a9f07c37a3eba44
parent 501163 42b57103a046eea029cf9f8b6d80f694ce84c469
child 501165 4e6ab55cc0bee5450aca0a8c780657c9acc6e020
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp, jcristau
bugs1501804
milestone64.0
Bug 1501804 - browser.display.use_document_fonts is integer, not boolean. r=snorp a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D10873
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
@@ -114,17 +114,17 @@ public final class GeckoRuntimeSettings 
         /**
          * Set whether support for web fonts should be enabled.
          *
          * @param flag A flag determining whether web fonts should be enabled.
          *             Default is true.
          * @return This Builder instance.
          */
         public @NonNull Builder webFontsEnabled(final boolean flag) {
-            mSettings.mWebFonts.set(flag);
+            mSettings.mWebFonts.set(flag ? 1 : 0);
             return this;
         }
 
         /**
          * Set whether there should be a pause during startup. This is useful if you need to
          * wait for a debugger to attach.
          *
          * @param enabled A flag determining whether there will be a pause early in startup.
@@ -342,18 +342,18 @@ public final class GeckoRuntimeSettings 
             }
         }
     }
 
     /* package */ Pref<Boolean> mJavaScript = new Pref<Boolean>(
         "javascript.enabled", true);
     /* package */ Pref<Boolean> mRemoteDebugging = new Pref<Boolean>(
         "devtools.debugger.remote-enabled", false);
-    /* package */ Pref<Boolean> mWebFonts = new Pref<Boolean>(
-        "browser.display.use_document_fonts", true);
+    /* package */ Pref<Integer> mWebFonts = new Pref<Integer>(
+        "browser.display.use_document_fonts", 1);
     /* package */ Pref<Integer> mCookieBehavior = new Pref<Integer>(
         "network.cookie.cookieBehavior", COOKIE_ACCEPT_ALL);
     /* package */ Pref<Integer> mCookieLifetime = new Pref<Integer>(
         "network.cookie.lifetimePolicy", COOKIE_LIFETIME_NORMAL);
     /* package */ Pref<String> mTrackingProtection = new Pref<String>(
         "urlclassifier.trackingTable",
         TrackingProtection.buildPrefValue(
             TrackingProtectionDelegate.CATEGORY_TEST |
@@ -494,27 +494,27 @@ public final class GeckoRuntimeSettings 
     }
 
     /**
      * Get whether web fonts support is enabled.
      *
      * @return Whether web fonts support is enabled.
      */
     public boolean getWebFontsEnabled() {
-        return mWebFonts.get();
+        return mWebFonts.get() != 0 ? true : false;
     }
 
     /**
      * Set whether support for web fonts should be enabled.
      *
      * @param flag A flag determining whether web fonts should be enabled.
      * @return This GeckoRuntimeSettings instance.
      */
     public @NonNull GeckoRuntimeSettings setWebFontsEnabled(final boolean flag) {
-        mWebFonts.set(flag);
+        mWebFonts.set(flag ? 1 : 0);
         return this;
     }
 
     /**
      * Gets whether the pause-for-debugger is enabled or not.
      *
      * @return True if the pause is enabled.
      */