Bug 1550422 - P13. Add Skip, Once and Live cached preference policy. r?njn! draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 16 May 2019 20:32:32 +1000
changeset 2008590 ec0a38113cabe8476e9c3acc37f62c96cbbfb0a8
parent 2008589 0f5c7e2c981433e460b7afab96cfe4d1aa4f69ad
child 2008591 24a3cfcfbbf8f8c24bb97cf5e60d6879673fd00a
push id363925
push userjyavenard@mozilla.com
push dateSat, 18 May 2019 07:53:18 +0000
treeherdertry@5082cd581229 [default view] [failures only]
reviewersnjn
bugs1550422
milestone68.0a1
Bug 1550422 - P13. Add Skip, Once and Live cached preference policy. r?njn! This works identically to what gfxPrefs UpdatePolicy offers. Differential Revision: https://phabricator.services.mozilla.com/D31257
modules/libpref/Preferences.cpp
modules/libpref/Preferences.h
modules/libpref/StaticPrefs.h
modules/libpref/init/StaticPrefList.h
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -3059,25 +3059,58 @@ class PWRunnable : public Runnable {
     return rv;
   }
 
  protected:
   nsCOMPtr<nsIFile> mFile;
 };
 
 struct CacheData {
-  void* mCacheLocation;
+  CacheData(void* aCacheLocation, bool aValue)
+      : mCacheLocation(aCacheLocation), mDefaultValueBool(aValue) {}
+  CacheData(void* aCacheLocation, int32_t aValue)
+      : mCacheLocation(aCacheLocation), mDefaultValueInt(aValue) {}
+  CacheData(void* aCacheLocation, uint32_t aValue)
+      : mCacheLocation(aCacheLocation), mDefaultValueUint(aValue) {}
+  CacheData(void* aCacheLocation, float aValue)
+      : mCacheLocation(aCacheLocation), mDefaultValueFloat(aValue) {}
+
+  template <typename T>
+  T GetDefault() const;
+
+  void* const mCacheLocation;
+
+ private:
   union {
-    bool mDefaultValueBool;
-    int32_t mDefaultValueInt;
-    uint32_t mDefaultValueUint;
-    float mDefaultValueFloat;
+    const bool mDefaultValueBool;
+    const int32_t mDefaultValueInt;
+    const uint32_t mDefaultValueUint;
+    const float mDefaultValueFloat;
   };
 };
 
+// We specialise the CacheData::GetDefault() here, as somehow you can't do it
+// inline within CacheData definition.
+template <>
+bool CacheData::GetDefault() const {
+  return mDefaultValueBool;
+}
+template <>
+int32_t CacheData::GetDefault() const {
+  return mDefaultValueInt;
+}
+template <>
+uint32_t CacheData::GetDefault() const {
+  return mDefaultValueUint;
+}
+template <>
+float CacheData::GetDefault() const {
+  return mDefaultValueFloat;
+}
+
 // gCacheDataDesc holds information about prefs startup. It's being used for
 // diagnosing prefs startup problems in bug 1276488.
 static const char* gCacheDataDesc = "untouched";
 
 // gCacheData holds the CacheData objects used for VarCache prefs. It owns
 // those objects, and also is used to detect if multiple VarCaches get tied to
 // a single global variable.
 static nsTArray<nsAutoPtr<CacheData>>* gCacheData = nullptr;
@@ -4314,34 +4347,32 @@ static nsresult pref_ReadPrefFromJar(nsZ
 
 // These preference getter wrappers allow us to look up the value for static
 // preferences based on their native types, rather than manually mapping them to
 // the appropriate Preferences::Get* functions.
 template <typename T>
 static T GetPref(const char* aName, T aDefaultValue);
 
 template <>
-bool MOZ_MAYBE_UNUSED GetPref<bool>(const char* aName, bool aDefaultValue) {
+bool MOZ_MAYBE_UNUSED GetPref(const char* aName, bool aDefaultValue) {
   return Preferences::GetBool(aName, aDefaultValue);
 }
 
 template <>
-int32_t MOZ_MAYBE_UNUSED GetPref<int32_t>(const char* aName,
-                                          int32_t aDefaultValue) {
+int32_t MOZ_MAYBE_UNUSED GetPref(const char* aName, int32_t aDefaultValue) {
   return Preferences::GetInt(aName, aDefaultValue);
 }
 
 template <>
-uint32_t MOZ_MAYBE_UNUSED GetPref<uint32_t>(const char* aName,
-                                            uint32_t aDefaultValue) {
+uint32_t MOZ_MAYBE_UNUSED GetPref(const char* aName, uint32_t aDefaultValue) {
   return Preferences::GetInt(aName, aDefaultValue);
 }
 
 template <>
-float MOZ_MAYBE_UNUSED GetPref<float>(const char* aName, float aDefaultValue) {
+float MOZ_MAYBE_UNUSED GetPref(const char* aName, float aDefaultValue) {
   return Preferences::GetFloat(aName, aDefaultValue);
 }
 
 static nsresult pref_ReadDefaultPrefs(const RefPtr<nsZipArchive> jarReader,
                                       const char* path) {
   nsZipFind* findPtr;
   nsAutoPtr<nsZipFind> find;
   nsTArray<nsCString> prefEntries;
@@ -4385,26 +4416,34 @@ static nsresult pref_ReadDefaultPrefs(co
     // user values, of whose default values have changed since they were
     // initialized.
     for (auto& pref : gSharedMap->Iter()) {
       if (pref.HasUserValue() || pref.DefaultChanged()) {
         NotifyCallbacks(pref.Name(), PrefWrapper(pref));
       }
     }
 
+    if (aIsStartup) {
+      StaticPrefs::InitOncePrefs();
+    }
+
 #ifdef DEBUG
     // Check that all varcache preferences match their current values. This
     // can currently fail if the default value of a static varcache preference
     // is changed in a preference file or at runtime, rather than in
     // StaticPrefList.h.
+    // StaticPrefs with a Skip policy aren't updated with an overridden value,
+    // and shouldn't be checked.
 
 #  define PREF(name, cpp_type, value)
-#  define VARCACHE_PREF(name, id, cpp_type, value)                        \
-    MOZ_ASSERT(                                                           \
-        GetPref<StripAtomic<cpp_type>>(name, value) == StaticPrefs::id(), \
+#  define VARCACHE_PREF(policy, name, id, cpp_type, value)                    \
+    MOZ_ASSERT(                                                               \
+        StaticPrefs::UpdatePolicy::policy ==                                  \
+                StaticPrefs::UpdatePolicy::Skip ||                            \
+            GetPref<StripAtomic<cpp_type>>(name, value) == StaticPrefs::id(), \
         "Incorrect cached value for " name);
 #  include "mozilla/StaticPrefList.h"
 #  undef PREF
 #  undef VARCACHE_PREF
 #endif
 
     return Ok();
   }
@@ -4577,16 +4616,22 @@ static nsresult pref_ReadDefaultPrefs(co
         continue;
       }
 
       // Do we care if a file provided by this process fails to load?
       pref_LoadPrefsInDir(path, nullptr, 0);
     }
   }
 
+  if (aIsStartup) {
+    // Read the Once StaticPrefs, should the underlying preference value got
+    // overwritten when reading the preference file.
+    StaticPrefs::InitOncePrefs();
+  }
+
   if (XRE_IsParentProcess()) {
     SetupTelemetryPref();
   }
 
   NS_CreateServicesFromCategory(NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID, nullptr,
                                 NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID);
 
   nsCOMPtr<nsIObserverService> observerService =
@@ -5079,163 +5124,96 @@ nsresult Preferences::UnregisterCallback
 
 static void CacheDataAppendElement(CacheData* aData) {
   if (!gCacheData) {
     MOZ_CRASH_UNSAFE_PRINTF("!gCacheData: %s", gCacheDataDesc);
   }
   gCacheData->AppendElement(aData);
 }
 
-static void BoolVarChanged(const char* aPref, void* aClosure) {
+template <typename T>
+static void VarChanged(const char* aPref, void* aClosure) {
   CacheData* cache = static_cast<CacheData*>(aClosure);
-  *static_cast<bool*>(cache->mCacheLocation) =
-      Preferences::GetBool(aPref, cache->mDefaultValueBool);
+  *static_cast<T*>(cache->mCacheLocation) =
+      GetPref(aPref, cache->GetDefault<StripAtomic<T>>());
+}
+
+// We define this method in a struct which is made friend of Preferences in
+// order to access private members.
+struct RegisterCallbacksInternal {
+  template <typename T>
+  static nsresult RegisterCallback(CacheData* aCacheData,
+                                   const nsACString& aPref) {
+    return Preferences::RegisterCallback(VarChanged<T>, aPref, aCacheData,
+                                         Preferences::ExactMatch,
+                                         /* isPriority */ true);
+  }
+};
+
+template <typename T>
+static nsresult AddVarCache(T* aCache, const nsACString& aPref,
+                            StripAtomic<T> aDefault, bool aSkipAssignment) {
+  if (!aSkipAssignment) {
+    *aCache = GetPref(PromiseFlatCString(aPref).get(), aDefault);
+  }
+  CacheData* data = new CacheData(aCache, aDefault);
+  CacheDataAppendElement(data);
+  RegisterCallbacksInternal::RegisterCallback<T>(data, aPref);
+  return NS_OK;
 }
 
 /* static */
 nsresult Preferences::AddBoolVarCache(bool* aCache, const nsACString& aPref,
                                       bool aDefault, bool aSkipAssignment) {
   AssertNotAlreadyCached("bool", aPref, aCache);
-  if (!aSkipAssignment) {
-    *aCache = GetBool(PromiseFlatCString(aPref).get(), aDefault);
-  }
-  CacheData* data = new CacheData();
-  data->mCacheLocation = aCache;
-  data->mDefaultValueBool = aDefault;
-  CacheDataAppendElement(data);
-  Preferences::RegisterCallback(BoolVarChanged, aPref, data,
-                                Preferences::ExactMatch,
-                                /* isPriority */ true);
-  return NS_OK;
-}
-
-template <MemoryOrdering Order>
-static void AtomicBoolVarChanged(const char* aPref, void* aClosure) {
-  CacheData* cache = static_cast<CacheData*>(aClosure);
-  *static_cast<Atomic<bool, Order>*>(cache->mCacheLocation) =
-      Preferences::GetBool(aPref, cache->mDefaultValueBool);
+  return AddVarCache(aCache, aPref, aDefault, aSkipAssignment);
 }
 
 template <MemoryOrdering Order>
 /* static */
 nsresult Preferences::AddAtomicBoolVarCache(Atomic<bool, Order>* aCache,
                                             const nsACString& aPref,
                                             bool aDefault,
                                             bool aSkipAssignment) {
   AssertNotAlreadyCached("bool", aPref, aCache);
-  if (!aSkipAssignment) {
-    *aCache = GetBool(PromiseFlatCString(aPref).get(), aDefault);
-  }
-  CacheData* data = new CacheData();
-  data->mCacheLocation = aCache;
-  data->mDefaultValueBool = aDefault;
-  CacheDataAppendElement(data);
-  Preferences::RegisterCallback(AtomicBoolVarChanged<Order>, aPref, data,
-                                Preferences::ExactMatch,
-                                /* isPriority */ true);
-  return NS_OK;
-}
-
-static void IntVarChanged(const char* aPref, void* aClosure) {
-  CacheData* cache = static_cast<CacheData*>(aClosure);
-  *static_cast<int32_t*>(cache->mCacheLocation) =
-      Preferences::GetInt(aPref, cache->mDefaultValueInt);
+  return AddVarCache(aCache, aPref, aDefault, aSkipAssignment);
 }
 
 /* static */
 nsresult Preferences::AddIntVarCache(int32_t* aCache, const nsACString& aPref,
                                      int32_t aDefault, bool aSkipAssignment) {
   AssertNotAlreadyCached("int", aPref, aCache);
-  if (!aSkipAssignment) {
-    *aCache = GetInt(PromiseFlatCString(aPref).get(), aDefault);
-  }
-  CacheData* data = new CacheData();
-  data->mCacheLocation = aCache;
-  data->mDefaultValueInt = aDefault;
-  CacheDataAppendElement(data);
-  Preferences::RegisterCallback(IntVarChanged, aPref, data,
-                                Preferences::ExactMatch, /* isPriority */ true);
-  return NS_OK;
-}
-
-template <MemoryOrdering Order>
-static void AtomicIntVarChanged(const char* aPref, void* aClosure) {
-  CacheData* cache = static_cast<CacheData*>(aClosure);
-  *static_cast<Atomic<int32_t, Order>*>(cache->mCacheLocation) =
-      Preferences::GetInt(aPref, cache->mDefaultValueUint);
+  return AddVarCache(aCache, aPref, aDefault, aSkipAssignment);
 }
 
 template <MemoryOrdering Order>
 /* static */
 nsresult Preferences::AddAtomicIntVarCache(Atomic<int32_t, Order>* aCache,
                                            const nsACString& aPref,
                                            int32_t aDefault,
                                            bool aSkipAssignment) {
   AssertNotAlreadyCached("int", aPref, aCache);
-  if (!aSkipAssignment) {
-    *aCache = GetInt(PromiseFlatCString(aPref).get(), aDefault);
-  }
-  CacheData* data = new CacheData();
-  data->mCacheLocation = aCache;
-  data->mDefaultValueUint = aDefault;
-  CacheDataAppendElement(data);
-  Preferences::RegisterCallback(AtomicIntVarChanged<Order>, aPref, data,
-                                Preferences::ExactMatch,
-                                /* isPriority */ true);
-  return NS_OK;
-}
-
-static void UintVarChanged(const char* aPref, void* aClosure) {
-  CacheData* cache = static_cast<CacheData*>(aClosure);
-  *static_cast<uint32_t*>(cache->mCacheLocation) =
-      Preferences::GetUint(aPref, cache->mDefaultValueUint);
+  return AddVarCache(aCache, aPref, aDefault, aSkipAssignment);
 }
 
 /* static */
 nsresult Preferences::AddUintVarCache(uint32_t* aCache, const nsACString& aPref,
                                       uint32_t aDefault, bool aSkipAssignment) {
   AssertNotAlreadyCached("uint", aPref, aCache);
-  if (!aSkipAssignment) {
-    *aCache = GetUint(PromiseFlatCString(aPref).get(), aDefault);
-  }
-  CacheData* data = new CacheData();
-  data->mCacheLocation = aCache;
-  data->mDefaultValueUint = aDefault;
-  CacheDataAppendElement(data);
-  Preferences::RegisterCallback(UintVarChanged, aPref, data,
-                                Preferences::ExactMatch,
-                                /* isPriority */ true);
-  return NS_OK;
-}
-
-template <MemoryOrdering Order>
-static void AtomicUintVarChanged(const char* aPref, void* aClosure) {
-  CacheData* cache = static_cast<CacheData*>(aClosure);
-  *static_cast<Atomic<uint32_t, Order>*>(cache->mCacheLocation) =
-      Preferences::GetUint(aPref, cache->mDefaultValueUint);
+  return AddVarCache(aCache, aPref, aDefault, aSkipAssignment);
 }
 
 template <MemoryOrdering Order>
 /* static */
 nsresult Preferences::AddAtomicUintVarCache(Atomic<uint32_t, Order>* aCache,
                                             const nsACString& aPref,
                                             uint32_t aDefault,
                                             bool aSkipAssignment) {
   AssertNotAlreadyCached("uint", aPref, aCache);
-  if (!aSkipAssignment) {
-    *aCache = GetUint(PromiseFlatCString(aPref).get(), aDefault);
-  }
-  CacheData* data = new CacheData();
-  data->mCacheLocation = aCache;
-  data->mDefaultValueUint = aDefault;
-  CacheDataAppendElement(data);
-  Preferences::RegisterCallback(AtomicUintVarChanged<Order>, aPref, data,
-                                Preferences::ExactMatch,
-                                /* isPriority */ true);
-  return NS_OK;
+  return AddVarCache(aCache, aPref, aDefault, aSkipAssignment);
 }
 
 // Since the definition of template functions is not in a header file, we
 // need to explicitly specify the instantiations that are required. Currently
 // limited orders are needed and therefore implemented.
 template nsresult Preferences::AddAtomicBoolVarCache(Atomic<bool, Relaxed>*,
                                                      const nsACString&, bool,
                                                      bool);
@@ -5256,74 +5234,42 @@ template nsresult Preferences::AddAtomic
 
 template nsresult Preferences::AddAtomicUintVarCache(
     Atomic<uint32_t, ReleaseAcquire>*, const nsACString&, uint32_t, bool);
 
 template nsresult Preferences::AddAtomicUintVarCache(
     Atomic<uint32_t, SequentiallyConsistent>*, const nsACString&, uint32_t,
     bool);
 
-static void FloatVarChanged(const char* aPref, void* aClosure) {
-  CacheData* cache = static_cast<CacheData*>(aClosure);
-  *static_cast<float*>(cache->mCacheLocation) =
-      Preferences::GetFloat(aPref, cache->mDefaultValueFloat);
-}
-
 /* static */
 nsresult Preferences::AddFloatVarCache(float* aCache, const nsACString& aPref,
                                        float aDefault, bool aSkipAssignment) {
   AssertNotAlreadyCached("float", aPref, aCache);
-  if (!aSkipAssignment) {
-    *aCache = GetFloat(PromiseFlatCString(aPref).get(), aDefault);
-  }
-  CacheData* data = new CacheData();
-  data->mCacheLocation = aCache;
-  data->mDefaultValueFloat = aDefault;
-  CacheDataAppendElement(data);
-  Preferences::RegisterCallback(FloatVarChanged, aPref, data,
-                                Preferences::ExactMatch,
-                                /* isPriority */ true);
-  return NS_OK;
-}
-
-static void AtomicFloatVarChanged(const char* aPref, void* aClosure) {
-  CacheData* cache = static_cast<CacheData*>(aClosure);
-  *static_cast<std::atomic<float>*>(cache->mCacheLocation) =
-      Preferences::GetFloat(aPref, cache->mDefaultValueFloat);
+  return AddVarCache(aCache, aPref, aDefault, aSkipAssignment);
 }
 
 /* static */
 nsresult Preferences::AddAtomicFloatVarCache(std::atomic<float>* aCache,
                                              const nsACString& aPref,
                                              float aDefault,
                                              bool aSkipAssignment) {
   AssertNotAlreadyCached("float", aPref, aCache);
-  if (!aSkipAssignment) {
-    *aCache = GetFloat(PromiseFlatCString(aPref).get(), aDefault);
-  }
-  CacheData* data = new CacheData();
-  data->mCacheLocation = aCache;
-  data->mDefaultValueFloat = aDefault;
-  CacheDataAppendElement(data);
-  Preferences::RegisterCallback(AtomicFloatVarChanged, aPref, data,
-                                Preferences::ExactMatch,
-                                /* isPriority */ true);
-  return NS_OK;
+  return AddVarCache(aCache, aPref, aDefault, aSkipAssignment);
 }
 
 // For a VarCache pref like this:
 //
 //   VARCACHE_PREF("my.varcache", my_varcache, int32_t, 99)
 //
 // we generate a static variable definition:
 //
 //   int32_t StaticPrefs::sVarCache_my_varcache(99);
 //
 #define PREF(name, cpp_type, value)
-#define VARCACHE_PREF(name, id, cpp_type, value) \
+#define VARCACHE_PREF(policy, name, id, cpp_type, value) \
   cpp_type StaticPrefs::sVarCache_##id(value);
 #include "mozilla/StaticPrefList.h"
 #undef PREF
 #undef VARCACHE_PREF
 
 // The SetPref_*() functions below end in a `_<type>` suffix because they are
 // used by the PREF macro definition in InitAll() below.
 
@@ -5363,153 +5309,108 @@ MOZ_MAYBE_UNUSED static void SetPref_Str
   PrefValue value;
   value.mStringVal = aDefaultValue;
   pref_SetPref(aName, PrefType::String, PrefValueKind::Default, value,
                /* isSticky */ false,
                /* isLocked */ false,
                /* fromInit */ true);
 }
 
-static void InitVarCachePref(const nsACString& aName, bool* aCache,
-                             bool aDefaultValue, bool aIsStartup,
-                             bool aSetValue) {
-  if (aSetValue) {
-    SetPref_bool(PromiseFlatCString(aName).get(), aDefaultValue);
-  }
-  *aCache = aDefaultValue;
-  if (aIsStartup) {
-    Preferences::AddBoolVarCache(aCache, aName, aDefaultValue, true);
-  }
+static void SetPref(const char* aName, bool aDefaultValue) {
+  SetPref_bool(aName, aDefaultValue);
+}
+static void SetPref(const char* aName, int32_t aDefaultValue) {
+  SetPref_int32_t(aName, aDefaultValue);
+}
+static void SetPref(const char* aName, uint32_t aDefaultValue) {
+  SetPref_int32_t(aName, aDefaultValue);
 }
-
-template <MemoryOrdering Order>
-static void InitVarCachePref(const nsACString& aName,
-                             Atomic<bool, Order>* aCache, bool aDefaultValue,
-                             bool aIsStartup, bool aSetValue) {
-  if (aSetValue) {
-    SetPref_bool(PromiseFlatCString(aName).get(), aDefaultValue);
-  }
-  *aCache = aDefaultValue;
-  if (aIsStartup) {
-    Preferences::AddAtomicBoolVarCache(aCache, aName, aDefaultValue, true);
-  }
+static void SetPref(const char* aName, float aDefaultValue) {
+  SetPref_float(aName, aDefaultValue);
 }
-
-// XXX: this will eventually become used
-MOZ_MAYBE_UNUSED static void InitVarCachePref(const nsACString& aName,
-                                              int32_t* aCache,
-                                              int32_t aDefaultValue,
-                                              bool aIsStartup, bool aSetValue) {
-  if (aSetValue) {
-    SetPref_int32_t(PromiseFlatCString(aName).get(), aDefaultValue);
-  }
-  *aCache = aDefaultValue;
-  if (aIsStartup) {
-    Preferences::AddIntVarCache(aCache, aName, aDefaultValue, true);
-  }
+MOZ_MAYBE_UNUSED static void SetPref(const char* aName,
+                                     const char* aDefaultValue) {
+  SetPref_String(aName, aDefaultValue);
 }
 
-template <MemoryOrdering Order>
-static void InitVarCachePref(const nsACString& aName,
-                             Atomic<int32_t, Order>* aCache,
-                             int32_t aDefaultValue, bool aIsStartup,
+template <typename T>
+static void InitVarCachePref(StaticPrefs::UpdatePolicy aPolicy,
+                             const nsACString& aName, T* aCache,
+                             StripAtomic<T> aDefaultValue, bool aIsStartup,
                              bool aSetValue) {
   if (aSetValue) {
-    SetPref_int32_t(PromiseFlatCString(aName).get(), aDefaultValue);
-  }
-  *aCache = aDefaultValue;
-  if (aIsStartup) {
-    Preferences::AddAtomicIntVarCache(aCache, aName, aDefaultValue, true);
-  }
-}
-
-static void InitVarCachePref(const nsACString& aName, uint32_t* aCache,
-                             uint32_t aDefaultValue, bool aIsStartup,
-                             bool aSetValue) {
-  if (aSetValue) {
-    SetPref_int32_t(PromiseFlatCString(aName).get(),
-                    static_cast<int32_t>(aDefaultValue));
-  }
+    SetPref(PromiseFlatCString(aName).get(), aDefaultValue);
+  }
+
   *aCache = aDefaultValue;
-  if (aIsStartup) {
-    Preferences::AddUintVarCache(aCache, aName, aDefaultValue, true);
-  }
-}
-
-template <MemoryOrdering Order>
-static void InitVarCachePref(const nsACString& aName,
-                             Atomic<uint32_t, Order>* aCache,
-                             uint32_t aDefaultValue, bool aIsStartup,
-                             bool aSetValue) {
-  if (aSetValue) {
-    SetPref_int32_t(PromiseFlatCString(aName).get(),
-                    static_cast<int32_t>(aDefaultValue));
-  }
-  *aCache = aDefaultValue;
-  if (aIsStartup) {
-    Preferences::AddAtomicUintVarCache(aCache, aName, aDefaultValue, true);
-  }
-}
-
-static void InitVarCachePref(const nsACString& aName, float* aCache,
-                             float aDefaultValue, bool aIsStartup,
-                             bool aSetValue) {
-  if (aSetValue) {
-    SetPref_float(PromiseFlatCString(aName).get(), aDefaultValue);
-  }
-  *aCache = aDefaultValue;
-  if (aIsStartup) {
-    Preferences::AddFloatVarCache(aCache, aName, aDefaultValue, true);
-  }
-}
-
-static void InitVarCachePref(const nsACString& aName,
-                             std::atomic<float>* aCache, float aDefaultValue,
-                             bool aIsStartup, bool aSetValue) {
-  if (aSetValue) {
-    SetPref_float(PromiseFlatCString(aName).get(), aDefaultValue);
-  }
-  *aCache = aDefaultValue;
-  if (aIsStartup) {
-    Preferences::AddAtomicFloatVarCache(aCache, aName, aDefaultValue, true);
+  if (MOZ_LIKELY(aIsStartup) &&
+      MOZ_LIKELY(aPolicy == StaticPrefs::UpdatePolicy::Live)) {
+    AddVarCache(aCache, aName, aDefaultValue, true);
   }
 }
 
 /* static */
 void StaticPrefs::InitAll(bool aIsStartup) {
   // For prefs like these:
   //
   //   PREF("foo.bar.baz", bool, true)
-  //   VARCACHE_PREF("my.varcache", my_varcache, int32_t, 99)
+  //   VARCACHE_PREF(Live, "my.varcache", my_varcache, int32_t, 99)
   //
   // we generate registration calls:
   //
   //   if (isParent)
   //     SetPref_bool("foo.bar.baz", true);
-  //   InitVarCachePref("my.varcache", &StaticPrefs::sVarCache_my_varcache, 99,
-  //                    aIsStartup);
+  //   InitVarCachePref(StaticPrefs::UpdatePolicy::Live, "my.varcache",
+  //                    &StaticPrefs::sVarCache_my_varcache, 99, aIsStartup,
+  //                    isParent);
   //
   // The SetPref_*() functions have a type suffix to avoid ambiguity between
   // prefs having int32_t and float default values. That suffix is not needed
   // for the InitVarCachePref() functions because they take a pointer parameter,
   // which prevents automatic int-to-float coercion.
   //
   // In content processes, we rely on the parent to send us the correct initial
   // values via shared memory, so we do not re-initialize them here.
   bool isParent = XRE_IsParentProcess();
 #define PREF(name, cpp_type, value) \
   if (isParent) SetPref_##cpp_type(name, value);
-#define VARCACHE_PREF(name, id, cpp_type, value)                           \
-  InitVarCachePref(NS_LITERAL_CSTRING(name), &StaticPrefs::sVarCache_##id, \
+#define VARCACHE_PREF(policy, name, id, cpp_type, value)                   \
+  InitVarCachePref(StaticPrefs::UpdatePolicy::policy,                      \
+                   NS_LITERAL_CSTRING(name), &StaticPrefs::sVarCache_##id, \
                    value, aIsStartup, isParent);
 #include "mozilla/StaticPrefList.h"
 #undef PREF
 #undef VARCACHE_PREF
 }
 
+/* static */
+void StaticPrefs::InitOncePrefs() {
+  // For prefs like these:
+  //
+  //   VARCACHE_PREF(Skip, "my.varcache", my_varcache, int32_t, 99)
+  //
+  // we generate registration calls:
+  //
+  //   if (UpdatePolicy::Skip == UpdatePolicy::Once) {
+  //     StaticPrefs::sVarCache_my_varcache =
+  //         GetPref("my.varcache", StripAtomic<int32_t>(99));
+  //   }
+  //
+  // This is done to get the potentially updated Preference value as we didn't
+  // register a callback method for the Once policy.
+#define PREF(name, cpp_type, value)
+#define VARCACHE_PREF(policy, name, id, cpp_type, value)                       \
+  if (UpdatePolicy::policy == UpdatePolicy::Once) {                            \
+    StaticPrefs::sVarCache_##id = GetPref(name, StripAtomic<cpp_type>(value)); \
+  }
+#include "mozilla/StaticPrefList.h"
+#undef PREF
+#undef VARCACHE_PREF
+}
+
 }  // namespace mozilla
 
 #undef ENSURE_PARENT_PROCESS
 
 //===========================================================================
 // Module and factory stuff
 //===========================================================================
 
--- a/modules/libpref/Preferences.h
+++ b/modules/libpref/Preferences.h
@@ -29,16 +29,18 @@ class nsIFile;
 // The callback function will get passed the pref name which triggered the call
 // and the void* data which was passed to the registered callback function.
 typedef void (*PrefChangedFunc)(const char* aPref, void* aData);
 
 class nsPrefBranch;
 
 namespace mozilla {
 
+struct RegisterCallbacksInternal;
+
 void UnloadPrefsModule();
 
 // A typesafe version of PrefChangeFunc, with its data argument type deduced
 // from the type of the argument passed to RegisterCallback.
 //
 // Note: We specify this as a dependent type TypedPrefChangeFunc<T>::SelfType so
 // that it does not participate in argument type deduction. This allows us to
 // use its implicit conversion constructor, and also allows our Register and
@@ -635,16 +637,17 @@ class Preferences final : public nsIPref
     ExactMatch,
   };
 
  private:
   static void SetupTelemetryPref();
   static mozilla::Result<mozilla::Ok, const char*> InitInitialObjects(
       bool aIsStartup);
 
+  friend struct RegisterCallbacksInternal;
   static nsresult RegisterCallback(PrefChangedFunc aCallback,
                                    const nsACString& aPref, void* aClosure,
                                    MatchKind aMatchKind,
                                    bool aIsPriority = false);
   static nsresult UnregisterCallback(PrefChangedFunc aCallback,
                                      const nsACString& aPref, void* aClosure,
                                      MatchKind aMatchKind);
   static nsresult RegisterCallbackAndCall(PrefChangedFunc aCallback,
--- a/modules/libpref/StaticPrefs.h
+++ b/modules/libpref/StaticPrefs.h
@@ -61,57 +61,68 @@ struct IsAtomic : FalseType {};
 
 template <typename T, MemoryOrdering Order>
 struct IsAtomic<Atomic<T, Order>> : TrueType {};
 
 template <typename T>
 struct IsAtomic<std::atomic<T>> : TrueType {};
 
 class StaticPrefs {
-// For a VarCache pref like this:
-//
-//   VARCACHE_PREF("my.varcache", my_varcache, int32_t, 99)
-//
-// we generate a static variable declaration, a getter and a setter definition.
-// A StaticPref can be set by using the corresponding Set method. For
-// example, if the accessor is Foo() then calling SetFoo(...) will update
-// the preference and also change the return value of subsequent Foo() calls.
-// Changing StaticPrefs values in one process will not affect the result in
-// other processes.
-// Important Note: The use of the Setter is strongly discouraged.
-//
-//   private:
-//     static int32_t sVarCache_my_varcache;
-//   public:
-//     static int32_t my_varcache() { return sVarCache_my_varcache; }
-//     static void Setmy_varcache(int32_t aValue) {
-//	     sVarCache_my_varcache = aValue;
-//     }
-//
+  // For a VarCache pref like this:
+  //
+  //   VARCACHE_PREF("my.varcache", my_varcache, int32_t, 99)
+  //
+  // we generate a static variable declaration, a getter and a setter
+  // definition. A StaticPref can be set by using the corresponding Set method.
+  // For example, if the accessor is Foo() then calling SetFoo(...) will update
+  // the preference and also change the return value of subsequent Foo() calls.
+  // Changing StaticPrefs values in one process will not affect the result in
+  // other processes.
+  // Important Note: The use of the Setter is strongly discouraged.
+  //
+  //   private:
+  //     static int32_t sVarCache_my_varcache;
+  //   public:
+  //     static int32_t my_varcache() { return sVarCache_my_varcache; }
+  //     static void Setmy_varcache(int32_t aValue) {
+  //	     sVarCache_my_varcache = aValue;
+  //     }
+  //
+
+ public:
+  // Enums for the update policy.
+  enum class UpdatePolicy {
+    Skip,  // Set the value to default, skip any Preferences calls.
+    Once,  // Evaluate the preference once, unchanged during the session.
+    Live   // Evaluate the preference and set callback so it stays current/live.
+  };
+
 #define PREF(str, cpp_type, default_value)
-#define VARCACHE_PREF(str, id, cpp_type, default_value)            \
+#define VARCACHE_PREF(policy, str, id, cpp_type, default_value)    \
  private:                                                          \
   static cpp_type sVarCache_##id;                                  \
                                                                    \
  public:                                                           \
   static StripAtomic<cpp_type> id() {                              \
-    MOZ_ASSERT(IsAtomic<cpp_type>::value || NS_IsMainThread(),     \
+    MOZ_ASSERT(UpdatePolicy::policy != UpdatePolicy::Live ||       \
+                   IsAtomic<cpp_type>::value || NS_IsMainThread(), \
                "Non-atomic static pref '" str                      \
                "' being accessed on background thread by getter"); \
     return sVarCache_##id;                                         \
   }                                                                \
   static void Set##id(StripAtomic<cpp_type> aValue) {              \
     MOZ_ASSERT(IsAtomic<cpp_type>::value || NS_IsMainThread(),     \
-               "Non-atomic static set pref '" str                  \
+               "Non-atomic static pref '" str                      \
                "' being accessed on background thread by setter"); \
     sVarCache_##id = aValue;                                       \
   }
 #include "mozilla/StaticPrefList.h"
 #undef PREF
 #undef VARCACHE_PREF
 
  public:
   static void InitAll(bool aIsStartup);
+  static void InitOncePrefs();
 };
 
 }  // namespace mozilla
 
 #endif  // mozilla_StaticPrefs_h
--- a/modules/libpref/init/StaticPrefList.h
+++ b/modules/libpref/init/StaticPrefList.h
@@ -46,21 +46,30 @@
 // - A global variable can be accessed off the main thread. If a pref *is*
 //   accessed off the main thread, it should use an atomic type. (But note that
 //   many VarCaches that should be atomic are not, in particular because
 //   Atomic<float> is not available, alas.)
 //
 // Definitions of VarCache prefs in this file has the following form.
 //
 //   VARCACHE_PREF(
+//     <update-policy>,
 //     <pref-name-string>,
 //     <pref-name-id>,
 //     <cpp-type>, <default-value>
 //   )
 //
+// - <update-policy> is one of the following: Skip, Once, Live
+//      Skip: Set the value to <default-value>, skip any Preferences calls.
+//            This policy should be rarely used and its used is discouraged.
+//      Once: Evaluate the pref once, unchanged during the session.
+//            This is useful for features where you want to ignore any pref
+//            changes until the start of the next browser session.
+//      Live: Evaluate the pref and set callback so it stays current/live.
+//
 // - <pref-name-string> is the same as for normal prefs.
 //
 // - <pref-name-id> is the name of the static getter function generated within
 //   the StaticPrefs class. For consistency, the identifier for every pref
 //   should be created by starting with <pref-name-string> and converting any
 //   '.' or '-' chars to '_'. For example, "foo.bar_baz" becomes
 //   |foo_bar_baz|. This is arguably ugly, but clear, and you can search for
 //   both using the regexp /foo.bar.baz/.
@@ -77,51 +86,55 @@
 
 // clang-format off
 
 //---------------------------------------------------------------------------
 // Accessibility prefs
 //---------------------------------------------------------------------------
 
 VARCACHE_PREF(
+  Live,
   "accessibility.monoaudio.enable",
    accessibility_monoaudio_enable,
   RelaxedAtomicBool, false
 )
 
 //---------------------------------------------------------------------------
 // Fuzzing prefs. It's important that these can only be checked in fuzzing
 // builds (when FUZZING is defined), otherwise you could enable the fuzzing
 // stuff on your regular build which would be bad :)
 //---------------------------------------------------------------------------
 
 #ifdef FUZZING
 VARCACHE_PREF(
+  Live,
   "fuzzing.enabled",
    fuzzing_enabled,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "fuzzing.necko.enabled",
    fuzzing_necko_enabled,
   RelaxedAtomicBool, false
 )
 #endif
 
 //---------------------------------------------------------------------------
 // Clipboard prefs
 //---------------------------------------------------------------------------
 
 #if !defined(ANDROID) && !defined(XP_MACOSX) && defined(XP_UNIX)
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "clipboard.autocopy",
    clipboard_autocopy,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 //---------------------------------------------------------------------------
 // DOM prefs
@@ -129,24 +142,26 @@ VARCACHE_PREF(
 
 // Is support for composite operations from the Web Animations API enabled?
 #ifdef RELEASE_OR_BETA
 # define PREF_VALUE false
 #else
 # define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.animations-api.compositing.enabled",
    dom_animations_api_compositing_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Is support for the core interfaces of Web Animations API enabled?
 VARCACHE_PREF(
+  Live,
   "dom.animations-api.core.enabled",
    dom_animations_api_core_enabled,
   bool, true
 )
 
 // Is support for Document.getAnimations() and Element.getAnimations()
 // supported?
 //
@@ -154,394 +169,439 @@ VARCACHE_PREF(
 // has been spec'ed properly, or we should add a separate pref for
 // CSSPseudoElement interface. See Bug 1174575 for further details.
 #ifdef RELEASE_OR_BETA
 # define PREF_VALUE false
 #else
 # define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.animations-api.getAnimations.enabled",
    dom_animations_api_getAnimations_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Is support for animations from the Web Animations API without 0%/100%
 // keyframes enabled?
 #ifdef RELEASE_OR_BETA
 # define PREF_VALUE false
 #else
 # define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.animations-api.implicit-keyframes.enabled",
    dom_animations_api_implicit_keyframes_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Is support for timelines from the Web Animations API enabled?
 #ifdef RELEASE_OR_BETA
 # define PREF_VALUE false
 #else
 # define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.animations-api.timelines.enabled",
    dom_animations_api_timelines_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Whether Mozilla specific "text" event should be dispatched only in the
 // system group or not in content.
 VARCACHE_PREF(
+  Live,
   "dom.compositionevent.text.dispatch_only_system_group_in_content",
    dom_compositionevent_text_dispatch_only_system_group_in_content,
    bool, true
 )
 
 // How long a content process can take before closing its IPC channel
 // after shutdown is initiated.  If the process exceeds the timeout,
 // we fear the worst and kill it.
 #if !defined(DEBUG) && !defined(MOZ_ASAN) && !defined(MOZ_VALGRIND) && \
     !defined(MOZ_TSAN)
 # define PREF_VALUE 5
 #else
 # define PREF_VALUE 0
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.ipc.tabs.shutdownTimeoutSecs",
    dom_ipc_tabs_shutdownTimeoutSecs,
   RelaxedAtomicUint32, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // If this is true, it's allowed to fire "cut", "copy" and "paste" events.
 // Additionally, "input" events may expose clipboard content when inputType
 // is "insertFromPaste" or something.
 VARCACHE_PREF(
+  Live,
   "dom.event.clipboardevents.enabled",
    dom_event_clipboardevents_enabled,
   bool, true
 )
 
 // If this is true, "keypress" event's keyCode value and charCode value always
 // become same if the event is not created/initialized by JS.
 VARCACHE_PREF(
+  Live,
   "dom.keyboardevent.keypress.set_keycode_and_charcode_to_same_value",
    dom_keyboardevent_keypress_set_keycode_and_charcode_to_same_value,
   bool, true
 )
 
 // Whether we conform to Input Events Level 1 or Input Events Level 2.
 // true:  conforming to Level 1
 // false: conforming to Level 2
 VARCACHE_PREF(
+  Live,
   "dom.input_events.conform_to_level_1",
    dom_input_events_conform_to_level_1,
   bool, true
 )
 
 // Enable not moving the cursor to end when a text input or textarea has .value
 // set to the value it already has.  By default, enabled.
 VARCACHE_PREF(
+  Live,
   "dom.input.skip_cursor_move_for_same_value_set",
    dom_input_skip_cursor_move_for_same_value_set,
   bool, true
 )
 
 // NOTE: This preference is used in unit tests. If it is removed or its default
 // value changes, please update test_sharedMap_var_caches.js accordingly.
 VARCACHE_PREF(
+  Live,
   "dom.webcomponents.shadowdom.report_usage",
    dom_webcomponents_shadowdom_report_usage,
   bool, false
 )
 
 // Whether we disable triggering mutation events for changes to style
 // attribute via CSSOM.
 // NOTE: This preference is used in unit tests. If it is removed or its default
 // value changes, please update test_sharedMap_var_caches.js accordingly.
 VARCACHE_PREF(
+  Live,
   "dom.mutation-events.cssom.disabled",
    dom_mutation_events_cssom_disabled,
   bool, true
 )
 
 // Whether the disabled attribute in HTMLLinkElement disables the sheet loading
 // altogether, or forwards to the inner stylesheet method without attribute
 // reflection.
 //
 // Historical behavior is the second, the first is being discussed at:
 // https://github.com/whatwg/html/issues/3840
 VARCACHE_PREF(
+  Live,
   "dom.link.disabled_attribute.enabled",
    dom_link_disabled_attribute_enabled,
   bool, true
 )
 
 // Should we defer timeouts and intervals while loading a page.  Released
 // on Idle or when the page is loaded.
 VARCACHE_PREF(
+  Live,
   "dom.timeout.defer_during_load",
   dom_timeout_defer_during_load,
   bool, true
 )
 
 // Maximum deferral time for setTimeout/Interval in milliseconds
 VARCACHE_PREF(
+  Live,
   "dom.timeout.max_idle_defer_ms",
   dom_timeout_max_idle_defer_ms,
   uint32_t, 10*1000
 )
 
 VARCACHE_PREF(
+  Live,
   "dom.performance.children_results_ipc_timeout",
   dom_performance_children_results_ipc_timeout,
   uint32_t, 1000
 )
 
 // If true. then the service worker interception and the ServiceWorkerManager
 // will live in the parent process.  This only takes effect on browser start.
 // Note, this is not currently safe to use for normal browsing yet.
 PREF("dom.serviceWorkers.parent_intercept", bool, false)
 
 // Enable/disable the PaymentRequest API
 VARCACHE_PREF(
+  Live,
   "dom.payments.request.enabled",
    dom_payments_request_enabled,
   bool, false
 )
 
 // Whether a user gesture is required to call PaymentRequest.prototype.show().
 VARCACHE_PREF(
+  Live,
   "dom.payments.request.user_interaction_required",
   dom_payments_request_user_interaction_required,
   bool, true
 )
 
 // Time in milliseconds for PaymentResponse to wait for
 // the Web page to call complete().
 VARCACHE_PREF(
+  Live,
   "dom.payments.response.timeout",
    dom_payments_response_timeout,
   uint32_t, 5000
 )
 
 // SW Cache API
 VARCACHE_PREF(
+  Live,
   "dom.caches.enabled",
    dom_caches_enabled,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "dom.caches.testing.enabled",
    dom_caches_testing_enabled,
   RelaxedAtomicBool, false
 )
 
 // Enable printing performance marks/measures to log
 VARCACHE_PREF(
+  Live,
   "dom.performance.enable_user_timing_logging",
    dom_performance_enable_user_timing_logging,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "dom.webnotifications.enabled",
    dom_webnotifications_enabled,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "dom.webnotifications.allowinsecure",
    dom_webnotifications_allowinsecure,
   RelaxedAtomicBool, false
 )
 
 #ifdef EARLY_BETA_OR_EARLIER
 # define PREF_VALUE  true
 #else
 # define PREF_VALUE  false
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.webnotifications.requireuserinteraction",
    dom_webnotifications_requireuserinteraction,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "dom.webnotifications.serviceworker.enabled",
    dom_webnotifications_serviceworker_enabled,
   RelaxedAtomicBool, true
 )
 
 #ifdef NIGHTLY_BUILD
 # define PREF_VALUE  true
 #else
 # define PREF_VALUE  false
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.webnotifications.requireinteraction.enabled",
    dom_webnotifications_requireinteraction_enabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "dom.serviceWorkers.enabled",
    dom_serviceWorkers_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "dom.serviceWorkers.testing.enabled",
    dom_serviceWorkers_testing_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "dom.testing.structuredclonetester.enabled",
   dom_testing_structuredclonetester_enabled,
   RelaxedAtomicBool, false
 )
 
 // Enable Storage API for all platforms except Android.
 #if !defined(MOZ_WIDGET_ANDROID)
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.storageManager.enabled",
    dom_storageManager_enabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // WHATWG promise rejection events. See
 // https://html.spec.whatwg.org/multipage/webappapis.html#promiserejectionevent
 // TODO: Enable the event interface once actually firing it (bug 1362272).
 VARCACHE_PREF(
+  Live,
   "dom.promise_rejection_events.enabled",
    dom_promise_rejection_events_enabled,
   RelaxedAtomicBool, false
 )
 
 // Push
 VARCACHE_PREF(
+  Live,
   "dom.push.enabled",
    dom_push_enabled,
   RelaxedAtomicBool, false
 )
 
 #if !defined(MOZ_WIDGET_ANDROID)
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.webkitBlink.dirPicker.enabled",
    dom_webkitBlink_dirPicker_enabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Network Information API
 #if defined(MOZ_WIDGET_ANDROID)
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.netinfo.enabled",
    dom_netinfo_enabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "dom.fetchObserver.enabled",
    dom_fetchObserver_enabled,
   RelaxedAtomicBool, false
 )
 
 // Enable Performance API
 // Whether nonzero values can be returned from performance.timing.*
 VARCACHE_PREF(
+  Live,
   "dom.enable_performance",
    dom_enable_performance,
   RelaxedAtomicBool, true
 )
 
 // Enable Performance Observer API
 VARCACHE_PREF(
+  Live,
   "dom.enable_performance_observer",
    dom_enable_performance_observer,
   RelaxedAtomicBool, true
 )
 
 // Whether resource timing will be gathered and returned by performance.GetEntries*
 VARCACHE_PREF(
+  Live,
   "dom.enable_resource_timing",
    dom_enable_resource_timing,
   bool, true
 )
 
 // Whether performance.GetEntries* will contain an entry for the active document
 VARCACHE_PREF(
+  Live,
   "dom.enable_performance_navigation_timing",
    dom_enable_performance_navigation_timing,
   bool, true
 )
 
 // Enable notification of performance timing
 VARCACHE_PREF(
+  Live,
   "dom.performance.enable_notify_performance_timing",
    dom_performance_enable_notify_performance_timing,
   bool, false
 )
 
 // Render animations and videos as a solid color
 VARCACHE_PREF(
+  Live,
   "browser.measurement.render_anims_and_video_solid",
   browser_measurement_render_anims_and_video_solid,
   RelaxedAtomicBool, false
 )
 
 // Enable passing the "storage" option to indexedDB.open.
 VARCACHE_PREF(
+  Live,
   "dom.indexedDB.storageOption.enabled",
    dom_indexedDB_storageOption_enabled,
   RelaxedAtomicBool, false
 )
 
 #ifdef JS_BUILD_BINAST
 VARCACHE_PREF(
+  Live,
   "dom.script_loader.binast_encoding.enabled",
    dom_script_loader_binast_encoding_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "dom.script_loader.binast_encoding.domain.restrict",
    dom_script_loader_binast_encoding_domain_restrict,
   bool, true
 )
 #endif
 
 // Whether to enable the JavaScript start-up cache. This causes one of the first
 // execution to record the bytecode of the JavaScript function used, and save it
 // in the existing cache entry. On the following loads of the same script, the
 // bytecode would be loaded from the cache instead of being generated once more.
 VARCACHE_PREF(
+  Live,
   "dom.script_loader.bytecode_cache.enabled",
    dom_script_loader_bytecode_cache_enabled,
   bool, true
 )
 
 // Ignore the heuristics of the bytecode cache, and always record on the first
 // visit. (used for testing purposes).
 
@@ -553,276 +613,311 @@ VARCACHE_PREF(
 //          seen for the first time, independently of the size or last access
 //          time.
 //   *  0 : (default) The bytecode would be saved in order to minimize the
 //          page-load time.
 //
 // Other values might lead to experimental strategies. For more details, have a
 // look at: ScriptLoader::ShouldCacheBytecode function.
 VARCACHE_PREF(
+  Live,
   "dom.script_loader.bytecode_cache.strategy",
    dom_script_loader_bytecode_cache_strategy,
   int32_t, 0
 )
 
 // IMPORTANT: Keep this in condition in sync with all.js. The value
 // of MOZILLA_OFFICIAL is different between full and artifact builds, so without
 // it being specified there, dump is disabled in artifact builds (see Bug 1490412).
 #ifdef MOZILLA_OFFICIAL
 # define PREF_VALUE false
 #else
 # define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "browser.dom.window.dump.enabled",
    browser_dom_window_dump_enabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "dom.worker.canceling.timeoutMilliseconds",
    dom_worker_canceling_timeoutMilliseconds,
   RelaxedAtomicUint32, 30000 /* 30 seconds */
 )
 
 VARCACHE_PREF(
+  Live,
   "dom.worker.use_medium_high_event_queue",
    dom_worker_use_medium_high_event_queue,
   RelaxedAtomicBool, true
 )
 
 // Enable content type normalization of XHR uploads via MIME Sniffing standard
 VARCACHE_PREF(
+  Live,
   "dom.xhr.standard_content_type_normalization",
    dom_xhr_standard_content_type_normalization,
   RelaxedAtomicBool, true
 )
 
 // Block multiple external protocol URLs in iframes per single event.
 VARCACHE_PREF(
+  Live,
   "dom.block_external_protocol_in_iframes",
    dom_block_external_protocol_in_iframes,
   bool, true
 )
 
 // Any how many seconds we allow external protocol URLs in iframe when not in
 // single events
 VARCACHE_PREF(
+  Live,
   "dom.delay.block_external_protocol_in_iframes",
    dom_delay_block_external_protocol_in_iframes,
   uint32_t, 10 // in seconds
 )
 
 // Block multiple window.open() per single event.
 VARCACHE_PREF(
+  Live,
   "dom.block_multiple_popups",
    dom_block_multiple_popups,
   bool, true
 )
 
 // For area and anchor elements with target=_blank and no rel set to
 // opener/noopener.
 #ifdef EARLY_BETA_OR_EARLIER
 #define PREF_VALUE true
 #else
 #define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.targetBlankNoOpener.enabled",
    dom_targetBlankNoOpener_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "dom.disable_open_during_load",
    dom_disable_open_during_load,
   bool, false
 )
 
 // Storage-access API.
 VARCACHE_PREF(
+  Live,
   "dom.storage_access.enabled",
    dom_storage_access_enabled,
   bool, false
 )
 
 // This currently only affects XHTML. For XUL the cache is always allowed.
 VARCACHE_PREF(
+  Live,
   "dom.prototype_document_cache.enabled",
    dom_prototype_document_cache_enabled,
   bool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "dom.storage_access.auto_grants.delayed",
    dom_storage_access_auto_grants_delayed,
   bool, true
 )
 
 // Enable the "noreferrer" feature argument for window.open()
 VARCACHE_PREF(
+  Live,
   "dom.window.open.noreferrer.enabled",
    dom_window_open_noreferrer_enabled,
   bool, true
 )
 
 // Allow the content process to create a File from a path. This is allowed just
 // on parent process, on 'file' Content process, or for testing.
 VARCACHE_PREF(
+  Live,
   "dom.file.createInChild",
    dom_file_createInChild,
   RelaxedAtomicBool, false
 )
 
 // Allow cut/copy
 VARCACHE_PREF(
+  Live,
   "dom.allow_cut_copy",
    dom_allow_cut_copy,
   bool, true
 )
 
 // Support @autocomplete values for form autofill feature.
 VARCACHE_PREF(
+  Live,
   "dom.forms.autocomplete.formautofill",
    dom_forms_autocomplete_formautofill,
   bool, false
 )
 
 // Enable requestIdleCallback API
 VARCACHE_PREF(
+  Live,
   "dom.requestIdleCallback.enabled",
    dom_requestIdleCallback_enabled,
   bool, true
 )
 
 // Whether we should show the placeholder when the element is focused but empty.
 VARCACHE_PREF(
+  Live,
   "dom.placeholder.show_on_focus",
    dom_placeholder_show_on_focus,
   bool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "dom.presentation.testing.simulate-receiver",
    dom_presentation_testing_simulate_receiver,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "dom.largeAllocation.forceEnable",
    dom_largeAllocation_forceEnable,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "dom.metaElement.setCookie.allowed",
    dom_metaElement_setCookie_allowed,
   bool, false
 )
 
 //---------------------------------------------------------------------------
 // Extension prefs
 //---------------------------------------------------------------------------
 
 #ifdef ANDROID
 // Private browsing opt-in is only supported on Firefox desktop.
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "extensions.allowPrivateBrowsingByDefault",
    extensions_allowPrivateBrowsingByDefault,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // This pref should be set to true only in case of regression related to the
 // changes applied in Bug 152591 (to be removed as part of Bug 1537753).
 VARCACHE_PREF(
+  Live,
   "extensions.cookiesBehavior.overrideOnTopLevel",
    extensions_cookiesBehavior_overrideOnTopLevel,
   bool, false
 )
 
 //---------------------------------------------------------------------------
 // Full-screen prefs
 //---------------------------------------------------------------------------
 
 VARCACHE_PREF(
+  Live,
   "full-screen-api.enabled",
    full_screen_api_enabled,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "full-screen-api.unprefix.enabled",
    full_screen_api_unprefix_enabled,
   bool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "full-screen-api.allow-trusted-requests-only",
    full_screen_api_allow_trusted_requests_only,
   bool, true
 )
 
 //---------------------------------------------------------------------------
 // Preference stylesheet prefs.
 //---------------------------------------------------------------------------
 
 VARCACHE_PREF(
+  Live,
   "browser.display.focus_ring_on_anything",
    browser_display_focus_ring_on_anything,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "browser.display.focus_ring_width",
    browser_display_focus_ring_width,
   uint32_t, 1
 )
 
 // 0=solid, 1=dotted
 VARCACHE_PREF(
+  Live,
   "browser.display.focus_ring_style",
    browser_display_focus_ring_style,
   uint32_t, 1
 )
 
 VARCACHE_PREF(
+  Live,
   "browser.display.use_system_colors",
    browser_display_use_system_colors,
   bool, true
 )
 
 // 0 = default: always, except in high contrast mode
 // 1 = always
 // 2 = never
 VARCACHE_PREF(
+  Live,
   "browser.display.document_color_use",
    browser_display_document_color_use,
   uint32_t, 0
 )
 VARCACHE_PREF(
+  Live,
   "browser.display.use_focus_colors",
    browser_display_use_focus_colors,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "browser.underline_anchors",
    browser_underline_anchors,
   bool, true
 )
 
 // See http://dev.w3.org/html5/spec/forms.html#attr-fe-autofocus
 VARCACHE_PREF(
+  Live,
   "browser.autofocus",
    browser_autofocus,
   bool, true
 )
 
 PREF("browser.display.foreground_color", String, "")
 PREF("browser.display.background_color", String, "")
 PREF("browser.display.focus_background_color", String, "")
@@ -833,514 +928,574 @@ PREF("browser.visited_color", String, ""
 
 //---------------------------------------------------------------------------
 // Graphics prefs
 //---------------------------------------------------------------------------
 
 // In theory: 0 = never, 1 = quick, 2 = always, though we always just use it as
 // a bool!
 VARCACHE_PREF(
+  Live,
   "browser.display.use_document_fonts",
    browser_display_use_document_fonts,
   RelaxedAtomicInt32, 1
 )
 
 VARCACHE_PREF(
+  Live,
   "gfx.font_rendering.opentype_svg.enabled",
    gfx_font_rendering_opentype_svg_enabled,
   bool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "gfx.offscreencanvas.enabled",
    gfx_offscreencanvas_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "gfx.font_ahem_antialias_none",
    gfx_font_ahem_antialias_none,
   RelaxedAtomicBool, false
 )
 
 #ifdef RELEASE_OR_BETA
 # define PREF_VALUE false
 #else
 # define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "gfx.omta.background-color",
    gfx_omta_background_color,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 //---------------------------------------------------------------------------
 // HTML5 parser prefs
 //---------------------------------------------------------------------------
 
 // Toggle which thread the HTML5 parser uses for stream parsing.
 VARCACHE_PREF(
+  Live,
   "html5.offmainthread",
    html5_offmainthread,
   bool, true
 )
 
 // Time in milliseconds between the time a network buffer is seen and the timer
 // firing when the timer hasn't fired previously in this parse in the
 // off-the-main-thread HTML5 parser.
 VARCACHE_PREF(
+  Live,
   "html5.flushtimer.initialdelay",
    html5_flushtimer_initialdelay,
   RelaxedAtomicInt32, 16
 )
 
 // Time in milliseconds between the time a network buffer is seen and the timer
 // firing when the timer has already fired previously in this parse.
 VARCACHE_PREF(
+  Live,
   "html5.flushtimer.subsequentdelay",
    html5_flushtimer_subsequentdelay,
   RelaxedAtomicInt32, 16
 )
 
 //---------------------------------------------------------------------------
 // Layout prefs
 //---------------------------------------------------------------------------
 
 // Whether to block large cursors intersecting UI.
 VARCACHE_PREF(
+  Live,
   "layout.cursor.block.enabled",
    layout_cursor_block_enabled,
   bool, true
 )
 
 // The maximum width or height of the cursor we should allow when intersecting
 // the UI, in CSS pixels.
 VARCACHE_PREF(
+  Live,
   "layout.cursor.block.max-size",
    layout_cursor_block_max_size,
   uint32_t, 32
 )
 
 // Debug-only pref to force enable the AccessibleCaret. If you want to
 // control AccessibleCaret by mouse, you'll need to set
 // "layout.accessiblecaret.hide_carets_for_mouse_input" to false.
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.enabled",
    layout_accessiblecaret_enabled,
   bool, false
 )
 
 // Enable the accessible caret on platforms/devices
 // that we detect have touch support. Note that this pref is an
 // additional way to enable the accessible carets, rather than
 // overriding the layout.accessiblecaret.enabled pref.
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.enabled_on_touch",
    layout_accessiblecaret_enabled_on_touch,
   bool, true
 )
 
 // By default, carets become tilt only when they are overlapping.
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.always_tilt",
    layout_accessiblecaret_always_tilt,
   bool, false
 )
 
 // Show caret in cursor mode when long tapping on an empty content. This
 // also changes the default update behavior in cursor mode, which is based
 // on the emptiness of the content, into something more heuristic. See
 // AccessibleCaretManager::UpdateCaretsForCursorMode() for the details.
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.caret_shown_when_long_tapping_on_empty_content",
    layout_accessiblecaret_caret_shown_when_long_tapping_on_empty_content,
   bool, false
 )
 
 // 0 = by default, always hide carets for selection changes due to JS calls.
 // 1 = update any visible carets for selection changes due to JS calls,
 //     but don't show carets if carets are hidden.
 // 2 = always show carets for selection changes due to JS calls.
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.script_change_update_mode",
    layout_accessiblecaret_script_change_update_mode,
   int32_t, 0
 )
 
 // Allow one caret to be dragged across the other caret without any limitation.
 // This matches the built-in convention for all desktop platforms.
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.allow_dragging_across_other_caret",
    layout_accessiblecaret_allow_dragging_across_other_caret,
   bool, true
 )
 
 // Optionally provide haptic feedback on long-press selection events.
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.hapticfeedback",
    layout_accessiblecaret_hapticfeedback,
   bool, false
 )
 
 // Smart phone-number selection on long-press is not enabled by default.
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.extend_selection_for_phone_number",
    layout_accessiblecaret_extend_selection_for_phone_number,
   bool, false
 )
 
 // Keep the accessible carets hidden when the user is using mouse input (as
 // opposed to touch/pen/etc.).
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.hide_carets_for_mouse_input",
    layout_accessiblecaret_hide_carets_for_mouse_input,
   bool, true
 )
 
 // CSS attributes (width, height, margin-left) of the AccessibleCaret in CSS
 // pixels.
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.width",
    layout_accessiblecaret_width,
   float, 34.0f
 )
 
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.height",
    layout_accessiblecaret_height,
   float, 36.0f
 )
 
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.margin-left",
    layout_accessiblecaret_margin_left,
   float, -18.5f
 )
 
 // Simulate long tap events to select words. Mainly used in manual testing
 // with mouse.
 VARCACHE_PREF(
+  Live,
   "layout.accessiblecaret.use_long_tap_injector",
    layout_accessiblecaret_use_long_tap_injector,
   bool, false
 )
 
 // Is parallel CSS parsing enabled?
 VARCACHE_PREF(
+  Live,
   "layout.css.parsing.parallel",
    layout_css_parsing_parallel,
   bool, true
 )
 
 // Are style system use counters enabled?
 #ifdef RELEASE_OR_BETA
 #define PREF_VALUE false
 #else
 #define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "layout.css.use-counters.enabled",
    layout_css_use_counters_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Is CSS error reporting enabled?
 VARCACHE_PREF(
+  Live,
   "layout.css.report_errors",
   layout_css_report_errors,
   bool, true
 )
 
 // Is support for the font-display @font-face descriptor enabled?
 VARCACHE_PREF(
+  Live,
   "layout.css.font-display.enabled",
    layout_css_font_display_enabled,
   bool, true
 )
 
 // Are webkit-prefixed properties & property-values supported?
 VARCACHE_PREF(
+  Live,
   "layout.css.prefixes.webkit",
    layout_css_prefixes_webkit,
   bool, true
 )
 
 // Are "-webkit-{min|max}-device-pixel-ratio" media queries supported? (Note:
 // this pref has no effect if the master 'layout.css.prefixes.webkit' pref is
 // set to false.)
 VARCACHE_PREF(
+  Live,
   "layout.css.prefixes.device-pixel-ratio-webkit",
    layout_css_prefixes_device_pixel_ratio_webkit,
   bool, true
 )
 
 // Are -moz-prefixed gradients restricted to a simpler syntax? (with an optional
 // <angle> or <position>, but not both)?
 VARCACHE_PREF(
+  Live,
   "layout.css.simple-moz-gradient.enabled",
    layout_css_simple_moz_gradient_enabled,
   bool, true
 )
 
 // Whether the offset-* logical property aliases are enabled.
 VARCACHE_PREF(
+  Live,
   "layout.css.offset-logical-properties.enabled",
    layout_css_offset_logical_properties_enabled,
   bool, false
 )
 
 // Should stray control characters be rendered visibly?
 #ifdef RELEASE_OR_BETA
 # define PREF_VALUE false
 #else
 # define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "layout.css.control-characters.visible",
    layout_css_control_characters_visible,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Should the :visited selector ever match (otherwise :link matches instead)?
 VARCACHE_PREF(
+  Live,
   "layout.css.visited_links_enabled",
    layout_css_visited_links_enabled,
   bool, true
 )
 
 // Is the '-webkit-appearance' alias for '-moz-appearance' enabled?
 VARCACHE_PREF(
+  Live,
   "layout.css.webkit-appearance.enabled",
    layout_css_webkit_appearance_enabled,
   bool, true
 )
 
 // Pref to control whether @-moz-document rules are enabled in content pages.
 VARCACHE_PREF(
+  Live,
   "layout.css.moz-document.content.enabled",
    layout_css_moz_document_content_enabled,
   bool, false
 )
 
 #ifdef NIGHTLY_BUILD
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "layout.css.supports-selector.enabled",
    layout_css_supports_selector_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Pref to control whether @-moz-document url-prefix() is parsed in content
 // pages. Only effective when layout.css.moz-document.content.enabled is false.
 #ifdef EARLY_BETA_OR_EARLIER
 #define PREF_VALUE false
 #else
 #define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "layout.css.moz-document.url-prefix-hack.enabled",
    layout_css_moz_document_url_prefix_hack_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "layout.css.xul-display-values.content.enabled",
    layout_css_xul_display_values_content_enabled,
   bool, false
 )
 
 // Pref to control whether display: -moz-box and display: -moz-inline-box are
 // parsed in content pages.
 VARCACHE_PREF(
+  Live,
   "layout.css.xul-box-display-values.content.enabled",
    layout_css_xul_box_display_values_content_enabled,
   bool, false
 )
 
 // Pref to control whether XUL ::-tree-* pseudo-elements are parsed in content
 // pages.
 VARCACHE_PREF(
+  Live,
   "layout.css.xul-tree-pseudos.content.enabled",
    layout_css_xul_tree_pseudos_content_enabled,
   bool, false
 )
 
 // Is support for CSS "grid-template-{columns,rows}: subgrid X" enabled?
 VARCACHE_PREF(
+  Live,
   "layout.css.grid-template-subgrid-value.enabled",
    layout_css_grid_template_subgrid_value_enabled,
   bool, false
 )
 
 // Pref to control whether line-height: -moz-block-height is exposed to content.
 VARCACHE_PREF(
+  Live,
   "layout.css.line-height-moz-block-height.content.enabled",
    layout_css_line_height_moz_block_height_content_enabled,
   bool, false
 )
 
 // Is support for variation fonts enabled?
 VARCACHE_PREF(
+  Live,
   "layout.css.font-variations.enabled",
    layout_css_font_variations_enabled,
   RelaxedAtomicBool, true
 )
 
 // Are we emulating -moz-{inline}-box layout using CSS flexbox?
 VARCACHE_PREF(
+  Live,
   "layout.css.emulate-moz-box-with-flex",
    layout_css_emulate_moz_box_with_flex,
   bool, false
 )
 
 // Does arbitrary ::-webkit-* pseudo-element parsed?
 VARCACHE_PREF(
+  Live,
   "layout.css.unknown-webkit-pseudo-element",
    layout_css_unknown_webkit_pseudo_element,
   bool, true
 )
 
 // Is path() supported in clip-path?
 VARCACHE_PREF(
+  Live,
   "layout.css.clip-path-path.enabled",
    layout_css_clip_path_path_enabled,
   bool, false
 )
 
 // Is support for CSS column-span enabled?
 VARCACHE_PREF(
+  Live,
   "layout.css.column-span.enabled",
    layout_css_column_span_enabled,
   bool, false
 )
 
 // Is support for CSS contain enabled?
 #ifdef EARLY_BETA_OR_EARLIER
 #define PREF_VALUE true
 #else
 #define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "layout.css.contain.enabled",
    layout_css_contain_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Is steps(jump-*) supported in easing functions?
 VARCACHE_PREF(
+  Live,
   "layout.css.step-position-jump.enabled",
    layout_css_step_position_jump_enabled,
   bool, true
 )
 
 // Are dynamic reflow roots enabled?
 #ifdef EARLY_BETA_OR_EARLIER
 #define PREF_VALUE true
 #else
 #define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
    "layout.dynamic-reflow-roots.enabled",
    layout_dynamic_reflow_roots_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
    "layout.lower_priority_refresh_driver_during_load",
    layout_lower_priority_refresh_driver_during_load,
   bool, true
 )
 
 // Pref to control enabling scroll anchoring.
 VARCACHE_PREF(
+  Live,
   "layout.css.scroll-anchoring.enabled",
    layout_css_scroll_anchoring_enabled,
   bool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "layout.css.scroll-anchoring.highlight",
    layout_css_scroll_anchoring_highlight,
   bool, false
 )
 
 // Is the CSS Scroll Snap Module Level 1 enabled?
 VARCACHE_PREF(
+  Live,
   "layout.css.scroll-snap-v1.enabled",
    layout_css_scroll_snap_v1_enabled,
   RelaxedAtomicBool, true
 )
 
 // Is support for the old unspecced scroll-snap enabled?
 // E.g. scroll-snap-points-{x,y}, scroll-snap-coordinate, etc.
 VARCACHE_PREF(
+  Live,
   "layout.css.scroll-snap.enabled",
    layout_css_scroll_snap_enabled,
   bool, false
 )
 
 // Are shared memory User Agent style sheets enabled?
 VARCACHE_PREF(
+  Live,
   "layout.css.shared-memory-ua-sheets.enabled",
    layout_css_shared_memory_ua_sheets_enabled,
   bool, false
 )
 
 #ifdef NIGHTLY_BUILD
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "layout.css.resizeobserver.enabled",
    layout_css_resizeobserver_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Is support for GeometryUtils.getBoxQuads enabled?
 #ifdef RELEASE_OR_BETA
 # define PREF_VALUE false
 #else
 # define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "layout.css.getBoxQuads.enabled",
    layout_css_getBoxQuads_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Pref to control whether arrow-panel animations are enabled or not.
 // Transitions are currently disabled on Linux due to rendering issues on
 // certain configurations.
 #ifdef MOZ_WIDGET_GTK
 #define PREF_VALUE false
 #else
 #define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "xul.panel-animations.enabled",
    xul_panel_animations_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Is support for -webkit-line-clamp enabled?
 VARCACHE_PREF(
+  Live,
   "layout.css.webkit-line-clamp.enabled",
   layout_css_webkit_line_clamp_enabled,
   bool, true
 )
 
 //---------------------------------------------------------------------------
 // JavaScript prefs
 //---------------------------------------------------------------------------
@@ -1353,187 +1508,209 @@ VARCACHE_PREF(
   // mobile browser (bug 669346).
   // XXX: this value possibly should be changed, or the pref removed entirely.
   //      See bug 1450787.
 # define PREF_VALUE false
 #else
 # define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "javascript.options.gc_on_memory_pressure",
    javascript_options_gc_on_memory_pressure,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "javascript.options.compact_on_user_inactive",
    javascript_options_compact_on_user_inactive,
   bool, true
 )
 
 // The default amount of time to wait from the user being idle to starting a
 // shrinking GC.
 #ifdef NIGHTLY_BUILD
 # define PREF_VALUE  15000  // ms
 #else
 # define PREF_VALUE 300000  // ms
 #endif
 VARCACHE_PREF(
+  Live,
   "javascript.options.compact_on_user_inactive_delay",
    javascript_options_compact_on_user_inactive_delay,
    uint32_t, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "javascript.options.mem.log",
    javascript_options_mem_log,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "javascript.options.mem.notify",
    javascript_options_mem_notify,
   bool, false
 )
 
 // Streams API
 VARCACHE_PREF(
+  Live,
   "javascript.options.streams",
    javascript_options_streams,
   RelaxedAtomicBool, false
 )
 
 // BigInt API
 VARCACHE_PREF(
+  Live,
   "javascript.options.bigint",
    javascript_options_bigint,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "javascript.options.experimental.fields",
    javascript_options_experimental_fields,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "javascript.options.experimental.await_fix",
    javascript_options_experimental_await_fix,
   RelaxedAtomicBool, false
 )
 
 #ifdef NIGHTLY_BUILD
 # define PREF_VALUE  true
 #else
 # define PREF_VALUE  false
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.ipc.cancel_content_js_when_navigating",
    dom_ipc_cancel_content_js_when_navigating,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 //---------------------------------------------------------------------------
 // Media prefs
 //---------------------------------------------------------------------------
 
 // These prefs use camel case instead of snake case for the getter because one
 // reviewer had an unshakeable preference for that.
 
 // File-backed MediaCache size.
 VARCACHE_PREF(
+  Live,
   "media.cache_size",
    MediaCacheSize,
   RelaxedAtomicUint32, 512000 // Measured in KiB
 )
 // Size of file backed MediaCache while on a connection which is cellular (3G, etc),
 // and thus assumed to be "expensive".
 VARCACHE_PREF(
+  Live,
   "media.cache_size.cellular",
    MediaCacheCellularSize,
   RelaxedAtomicUint32, 32768 // Measured in KiB
 )
 
 // If a resource is known to be smaller than this size (in kilobytes), a
 // memory-backed MediaCache may be used; otherwise the (single shared global)
 // file-backed MediaCache is used.
 VARCACHE_PREF(
+  Live,
   "media.memory_cache_max_size",
    MediaMemoryCacheMaxSize,
   uint32_t, 8192      // Measured in KiB
 )
 
 // Don't create more memory-backed MediaCaches if their combined size would go
 // above this absolute size limit.
 VARCACHE_PREF(
+  Live,
   "media.memory_caches_combined_limit_kb",
    MediaMemoryCachesCombinedLimitKb,
   uint32_t, 524288
 )
 
 // Don't create more memory-backed MediaCaches if their combined size would go
 // above this relative size limit (a percentage of physical memory).
 VARCACHE_PREF(
+  Live,
   "media.memory_caches_combined_limit_pc_sysmem",
    MediaMemoryCachesCombinedLimitPcSysmem,
   uint32_t, 5         // A percentage
 )
 
 // When a network connection is suspended, don't resume it until the amount of
 // buffered data falls below this threshold (in seconds).
 VARCACHE_PREF(
+  Live,
   "media.cache_resume_threshold",
    MediaCacheResumeThreshold,
   RelaxedAtomicUint32, 30
 )
 VARCACHE_PREF(
+  Live,
   "media.cache_resume_threshold.cellular",
    MediaCacheCellularResumeThreshold,
   RelaxedAtomicUint32, 10
 )
 
 // Stop reading ahead when our buffered data is this many seconds ahead of the
 // current playback position. This limit can stop us from using arbitrary
 // amounts of network bandwidth prefetching huge videos.
 VARCACHE_PREF(
+  Live,
   "media.cache_readahead_limit",
    MediaCacheReadaheadLimit,
   RelaxedAtomicUint32, 60
 )
 VARCACHE_PREF(
+  Live,
   "media.cache_readahead_limit.cellular",
    MediaCacheCellularReadaheadLimit,
   RelaxedAtomicUint32, 30
 )
 
 // AudioSink
 VARCACHE_PREF(
+  Live,
   "media.resampling.enabled",
    MediaResamplingEnabled,
   RelaxedAtomicBool, false
 )
 
 #if defined(XP_WIN) || defined(XP_DARWIN) || defined(MOZ_PULSEAUDIO)
 // libcubeb backend implement .get_preferred_channel_layout
 # define PREF_VALUE false
 #else
 # define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "media.forcestereo.enabled",
    MediaForcestereoEnabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // VideoSink
 VARCACHE_PREF(
+  Live,
   "media.ruin-av-sync.enabled",
    MediaRuinAvSyncEnabled,
   RelaxedAtomicBool, false
 )
 
 // Encrypted Media Extensions
 #if defined(ANDROID)
 # if defined(NIGHTLY_BUILD)
@@ -1549,150 +1726,165 @@ VARCACHE_PREF(
   // using EME is encountered, the user will be prompted to enable DRM,
   // whereupon the EME plugin binaries will be downloaded if permission is
   // granted.
 # define PREF_VALUE false
 #else
 # define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "media.eme.enabled",
    MediaEmeEnabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "media.clearkey.persistent-license.enabled",
    MediaClearkeyPersistentLicenseEnabled,
   bool, false
 )
 
 #if defined(XP_LINUX) && defined(MOZ_SANDBOX)
 // Whether to allow, on a Linux system that doesn't support the necessary
 // sandboxing features, loading Gecko Media Plugins unsandboxed.  However, EME
 // CDMs will not be loaded without sandboxing even if this pref is changed.
 VARCACHE_PREF(
+  Live,
   "media.gmp.insecure.allow",
    MediaGmpInsecureAllow,
   RelaxedAtomicBool, false
 )
 #endif
 
 // Specifies whether the PDMFactory can create a test decoder that just outputs
 // blank frames/audio instead of actually decoding. The blank decoder works on
 // all platforms.
 VARCACHE_PREF(
+  Live,
   "media.use-blank-decoder",
    MediaUseBlankDecoder,
   RelaxedAtomicBool, false
 )
 
 #if defined(XP_WIN)
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "media.gpu-process-decoder",
    MediaGpuProcessDecoder,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 #if defined(XP_WIN) && !defined(_ARM64_)
 # define PREF_VALUE true
 #elif defined(XP_MACOSX)
 # define PREF_VALUE true
 #elif defined(XP_LINUX) && !defined(ANDROID)
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "media.rdd-process.enabled",
    MediaRddProcessEnabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "media.rdd-process.startup_timeout_ms",
    MediaRddProcessStartupTimeoutMs,
   RelaxedAtomicInt32, 5000
 )
 
 VARCACHE_PREF(
+  Live,
   "media.rdd-vorbis.enabled",
    MediaRddVorbisEnabled,
   RelaxedAtomicBool, false
 )
 
 #ifdef ANDROID
 
 // Enable the MediaCodec PlatformDecoderModule by default.
 VARCACHE_PREF(
+  Live,
   "media.android-media-codec.enabled",
    MediaAndroidMediaCodecEnabled,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "media.android-media-codec.preferred",
    MediaAndroidMediaCodecPreferred,
   RelaxedAtomicBool, true
 )
 
 #endif // ANDROID
 
 //---------------------------------------------------------------------------
 // MediaCapture prefs
 //---------------------------------------------------------------------------
 
 // Enables navigator.mediaDevices and getUserMedia() support. See also
 // media.peerconnection.enabled
 VARCACHE_PREF(
+  Live,
               "media.navigator.enabled",
               media_navigator_enabled,
               bool, true
               )
 
 // This pref turns off [SecureContext] on the navigator.mediaDevices object, for
 // more compatible legacy behavior.
 VARCACHE_PREF(
+  Live,
               "media.devices.insecure.enabled",
               media_devices_insecure_enabled,
               bool, true
               )
 
 // If the above pref is also enabled, this pref enabled getUserMedia() support
 // in http, bypassing the instant NotAllowedError you get otherwise.
 VARCACHE_PREF(
+  Live,
               "media.getusermedia.insecure.enabled",
               media_getusermedia_insecure_enabled,
               bool, false
               )
 
 //---------------------------------------------------------------------------
 // WebRTC prefs
 //---------------------------------------------------------------------------
 
 // Enables RTCPeerConnection support. Note that, when true, this pref enables
 // navigator.mediaDevices and getUserMedia() support as well.
 // See also media.navigator.enabled
 VARCACHE_PREF(
+  Live,
               "media.peerconnection.enabled",
               media_peerconnection_enabled,
               bool, true
               )
 
 #ifdef MOZ_WEBRTC
 #ifdef ANDROID
 
 VARCACHE_PREF(
+  Live,
   "media.navigator.hardware.vp8_encode.acceleration_remote_enabled",
    MediaNavigatorHardwareVp8encodeAccelerationRemoteEnabled,
   bool, true
 )
 
 PREF("media.navigator.hardware.vp8_encode.acceleration_enabled", bool, true)
 
 PREF("media.navigator.hardware.vp8_decode.acceleration_enabled", bool, false)
@@ -1703,671 +1895,756 @@ PREF("media.navigator.hardware.vp8_decod
 // acceleration for decoding.
 // disable on android bug 1509316
 #if defined(NIGHTLY_BUILD) && !defined(ANDROID)
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "media.navigator.mediadatadecoder_vpx_enabled",
    MediaNavigatorMediadatadecoderVPXEnabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Use MediaDataDecoder API for H264 in WebRTC. This includes hardware
 // acceleration for decoding.
 # if defined(ANDROID)
 #  define PREF_VALUE false // Bug 1509316
 # else
 #  define PREF_VALUE true
 # endif
 
 VARCACHE_PREF(
+  Live,
   "media.navigator.mediadatadecoder_h264_enabled",
    MediaNavigatorMediadatadecoderH264Enabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 #endif // MOZ_WEBRTC
 
 #ifdef MOZ_OMX
 VARCACHE_PREF(
+  Live,
   "media.omx.enabled",
    MediaOmxEnabled,
   bool, false
 )
 #endif
 
 #ifdef MOZ_FFMPEG
 
 # if defined(XP_MACOSX)
 #  define PREF_VALUE false
 # else
 #  define PREF_VALUE true
 # endif
 VARCACHE_PREF(
+  Live,
   "media.ffmpeg.enabled",
    MediaFfmpegEnabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "media.libavcodec.allow-obsolete",
    MediaLibavcodecAllowObsolete,
   bool, false
 )
 
 #endif // MOZ_FFMPEG
 
 #ifdef MOZ_FFVPX
 VARCACHE_PREF(
+  Live,
   "media.ffvpx.enabled",
    MediaFfvpxEnabled,
   RelaxedAtomicBool, true
 )
 #endif
 
 #if defined(MOZ_FFMPEG) || defined(MOZ_FFVPX)
 VARCACHE_PREF(
+  Live,
   "media.ffmpeg.low-latency.enabled",
    MediaFfmpegLowLatencyEnabled,
   RelaxedAtomicBool, false
 )
 #endif
 
 #ifdef MOZ_WMF
 
 VARCACHE_PREF(
+  Live,
   "media.wmf.enabled",
    MediaWmfEnabled,
   RelaxedAtomicBool, true
 )
 
 // Whether DD should consider WMF-disabled a WMF failure, useful for testing.
 VARCACHE_PREF(
+  Live,
   "media.decoder-doctor.wmf-disabled-is-failure",
    MediaDecoderDoctorWmfDisabledIsFailure,
   bool, false
 )
 
 #endif // MOZ_WMF
 
 // Whether to check the decoder supports recycling.
 #ifdef ANDROID
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "media.decoder.recycle.enabled",
    MediaDecoderRecycleEnabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Should MFR try to skip to the next key frame?
 VARCACHE_PREF(
+  Live,
   "media.decoder.skip-to-next-key-frame.enabled",
    MediaDecoderSkipToNextKeyFrameEnabled,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "media.gmp.decoder.enabled",
    MediaGmpDecoderEnabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "media.eme.audio.blank",
    MediaEmeAudioBlank,
   RelaxedAtomicBool, false
 )
 VARCACHE_PREF(
+  Live,
   "media.eme.video.blank",
    MediaEmeVideoBlank,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "media.eme.chromium-api.video-shmems",
    MediaEmeChromiumApiVideoShmems,
   RelaxedAtomicUint32, 6
 )
 
 // Whether to suspend decoding of videos in background tabs.
 VARCACHE_PREF(
+  Live,
   "media.suspend-bkgnd-video.enabled",
    MediaSuspendBkgndVideoEnabled,
   RelaxedAtomicBool, true
 )
 
 // Delay, in ms, from time window goes to background to suspending
 // video decoders. Defaults to 10 seconds.
 VARCACHE_PREF(
+  Live,
   "media.suspend-bkgnd-video.delay-ms",
    MediaSuspendBkgndVideoDelayMs,
   RelaxedAtomicUint32, 10000
 )
 
 VARCACHE_PREF(
+  Live,
   "media.dormant-on-pause-timeout-ms",
    MediaDormantOnPauseTimeoutMs,
   RelaxedAtomicInt32, 5000
 )
 
 VARCACHE_PREF(
+  Live,
   "media.webspeech.synth.force_global_queue",
    MediaWebspeechSynthForceGlobalQueue,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "media.webspeech.test.enable",
    MediaWebspeechTestEnable,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "media.webspeech.test.fake_fsm_events",
    MediaWebspeechTextFakeFsmEvents,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "media.webspeech.test.fake_recognition_service",
    MediaWebspeechTextFakeRecognitionService,
   bool, false
 )
 
 #ifdef MOZ_WEBSPEECH
 VARCACHE_PREF(
+  Live,
   "media.webspeech.recognition.enable",
    MediaWebspeechRecognitionEnable,
   bool, false
 )
 #endif
 
 VARCACHE_PREF(
+  Live,
   "media.webspeech.recognition.force_enable",
    MediaWebspeechRecognitionForceEnable,
   bool, false
 )
 
 #if defined(MOZ_WEBM_ENCODER)
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "media.encoder.webm.enabled",
    MediaEncoderWebMEnabled,
   RelaxedAtomicBool, true
 )
 #undef PREF_VALUE
 
 #if defined(RELEASE_OR_BETA)
 # define PREF_VALUE 3
 #else
   // Zero tolerance in pre-release builds to detect any decoder regression.
 # define PREF_VALUE 0
 #endif
 VARCACHE_PREF(
+  Live,
   "media.audio-max-decode-error",
    MediaAudioMaxDecodeError,
   uint32_t, PREF_VALUE
 )
 #undef PREF_VALUE
 
 #if defined(RELEASE_OR_BETA)
 # define PREF_VALUE 2
 #else
   // Zero tolerance in pre-release builds to detect any decoder regression.
 # define PREF_VALUE 0
 #endif
 VARCACHE_PREF(
+  Live,
   "media.video-max-decode-error",
    MediaVideoMaxDecodeError,
   uint32_t, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Opus
 VARCACHE_PREF(
+  Live,
   "media.opus.enabled",
    MediaOpusEnabled,
   RelaxedAtomicBool, true
 )
 
 // Wave
 VARCACHE_PREF(
+  Live,
   "media.wave.enabled",
    MediaWaveEnabled,
   RelaxedAtomicBool, true
 )
 
 // Ogg
 VARCACHE_PREF(
+  Live,
   "media.ogg.enabled",
    MediaOggEnabled,
   RelaxedAtomicBool, true
 )
 
 // WebM
 VARCACHE_PREF(
+  Live,
   "media.webm.enabled",
    MediaWebMEnabled,
   RelaxedAtomicBool, true
 )
 
 // AV1
 #if defined(XP_WIN) && !defined(_ARM64_)
 # define PREF_VALUE true
 #elif defined(XP_MACOSX)
 # define PREF_VALUE true
 #elif defined(XP_UNIX) && !defined(Android)
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "media.av1.enabled",
    MediaAv1Enabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "media.av1.use-dav1d",
    MediaAv1UseDav1d,
 #if defined(XP_WIN) && !defined(_ARM64_)
   RelaxedAtomicBool, true
 #elif defined(XP_MACOSX)
   RelaxedAtomicBool, true
 #elif defined(XP_UNIX) && !defined(Android)
   RelaxedAtomicBool, true
 #else
   RelaxedAtomicBool, false
 #endif
 )
 
 VARCACHE_PREF(
+  Live,
   "media.flac.enabled",
    MediaFlacEnabled,
   bool, true
 )
 
 // Hls
 #ifdef ANDROID
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "media.hls.enabled",
    MediaHlsEnabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Max number of HLS players that can be created concurrently. Used only on
 // Android and when "media.hls.enabled" is true.
 #ifdef ANDROID
 VARCACHE_PREF(
+  Live,
   "media.hls.max-allocations",
    MediaHlsMaxAllocations,
   uint32_t, 20
 )
 #endif
 
 #ifdef MOZ_FMP4
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "media.mp4.enabled",
    MediaMp4Enabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Error/warning handling, Decoder Doctor.
 //
 // Set to true to force demux/decode warnings to be treated as errors.
 VARCACHE_PREF(
+  Live,
   "media.playback.warnings-as-errors",
    MediaPlaybackWarningsAsErrors,
   RelaxedAtomicBool, false
 )
 
 // Resume video decoding when the cursor is hovering on a background tab to
 // reduce the resume latency and improve the user experience.
 VARCACHE_PREF(
+  Live,
   "media.resume-bkgnd-video-on-tabhover",
    MediaResumeBkgndVideoOnTabhover,
   bool, true
 )
 
 #ifdef ANDROID
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "media.videocontrols.lock-video-orientation",
    MediaVideocontrolsLockVideoOrientation,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Media Seamless Looping
 VARCACHE_PREF(
+  Live,
   "media.seamless-looping",
    MediaSeamlessLooping,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "media.autoplay.block-event.enabled",
    MediaBlockEventEnabled,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "media.media-capabilities.enabled",
    MediaCapabilitiesEnabled,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "media.media-capabilities.screen.enabled",
    MediaCapabilitiesScreenEnabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "media.benchmark.vp9.fps",
    MediaBenchmarkVp9Fps,
   RelaxedAtomicUint32, 0
 )
 
 VARCACHE_PREF(
+  Live,
   "media.benchmark.vp9.threshold",
    MediaBenchmarkVp9Threshold,
   RelaxedAtomicUint32, 150
 )
 
 VARCACHE_PREF(
+  Live,
   "media.benchmark.vp9.versioncheck",
    MediaBenchmarkVp9Versioncheck,
   RelaxedAtomicUint32, 0
 )
 
 VARCACHE_PREF(
+  Live,
   "media.benchmark.frames",
    MediaBenchmarkFrames,
   RelaxedAtomicUint32, 300
 )
 
 VARCACHE_PREF(
+  Live,
   "media.benchmark.timeout",
    MediaBenchmarkTimeout,
   RelaxedAtomicUint32, 1000
 )
 
 VARCACHE_PREF(
+  Live,
   "media.test.video-suspend",
    MediaTestVideoSuspend,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "media.autoplay.allow-muted",
    MediaAutoplayAllowMuted,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "media.autoplay.blackList-override-default",
    MediaAutoplayBlackListOverrideDefault,
   RelaxedAtomicBool, true
 )
 
 //---------------------------------------------------------------------------
 // Network prefs
 //---------------------------------------------------------------------------
 
 // Sub-resources HTTP-authentication:
 //   0 - don't allow sub-resources to open HTTP authentication credentials
 //       dialogs
 //   1 - allow sub-resources to open HTTP authentication credentials dialogs,
 //       but don't allow it for cross-origin sub-resources
 //   2 - allow the cross-origin authentication as well.
 VARCACHE_PREF(
+  Live,
   "network.auth.subresource-http-auth-allow",
    network_auth_subresource_http_auth_allow,
   uint32_t, 2
 )
 
 // Sub-resources HTTP-authentication for cross-origin images:
 // - true: It is allowed to present http auth. dialog for cross-origin images.
 // - false: It is not allowed.
 // If network.auth.subresource-http-auth-allow has values 0 or 1 this pref does
 // not have any effect.
 VARCACHE_PREF(
+  Live,
   "network.auth.subresource-img-cross-origin-http-auth-allow",
    network_auth_subresource_img_cross_origin_http_auth_allow,
   bool, false
 )
 
 // Resources that are triggered by some non-web-content:
 // - true: They are allow to present http auth. dialog
 // - false: They are not allow to present http auth. dialog.
 VARCACHE_PREF(
+  Live,
   "network.auth.non-web-content-triggered-resources-http-auth-allow",
    network_auth_non_web_content_triggered_resources_http_auth_allow,
   bool, false
 )
 
 // 0-Accept, 1-dontAcceptForeign, 2-dontAcceptAny, 3-limitForeign,
 // 4-rejectTracker
 // Keep the old default of accepting all cookies
 VARCACHE_PREF(
+  Live,
   "network.cookie.cookieBehavior",
   network_cookie_cookieBehavior,
   RelaxedAtomicInt32, 0
 )
 
 // Stale threshold for cookies in seconds.
 VARCACHE_PREF(
+  Live,
   "network.cookie.staleThreshold",
    network_cookie_staleThreshold,
   uint32_t, 60
 )
 
 // Cookie lifetime policy. Possible values:
 // 0 - accept all cookies
 // 1 - deprecated. don't use it.
 // 2 - accept as session cookies
 // 3 - deprecated. don't use it.
 VARCACHE_PREF(
+  Live,
   "network.cookie.lifetimePolicy",
   network_cookie_lifetimePolicy,
   RelaxedAtomicInt32, 0
 )
 
 // Enables the predictive service.
 VARCACHE_PREF(
+  Live,
   "network.predictor.enabled",
    network_predictor_enabled,
   bool, true
 )
 
 // Allow CookieSettings to be unblocked for channels without a document.
 // This is for testing only.
 VARCACHE_PREF(
+  Live,
   "network.cookieSettings.unblocked_for_testing",
    network_cookieSettings_unblocked_for_testing,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "network.predictor.enable-hover-on-ssl",
    network_predictor_enable_hover_on_ssl,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "network.predictor.enable-prefetch",
    network_predictor_enable_prefetch,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "network.predictor.page-degradation.day",
    network_predictor_page_degradation_day,
   int32_t, 0
 )
 VARCACHE_PREF(
+  Live,
   "network.predictor.page-degradation.week",
    network_predictor_page_degradation_week,
   int32_t, 5
 )
 VARCACHE_PREF(
+  Live,
   "network.predictor.page-degradation.month",
    network_predictor_page_degradation_month,
   int32_t, 10
 )
 VARCACHE_PREF(
+  Live,
   "network.predictor.page-degradation.year",
    network_predictor_page_degradation_year,
   int32_t, 25
 )
 VARCACHE_PREF(
+  Live,
   "network.predictor.page-degradation.max",
    network_predictor_page_degradation_max,
   int32_t, 50
 )
 
 VARCACHE_PREF(
+  Live,
   "network.predictor.subresource-degradation.day",
    network_predictor_subresource_degradation_day,
   int32_t, 1
 )
 VARCACHE_PREF(
+  Live,
   "network.predictor.subresource-degradation.week",
    network_predictor_subresource_degradation_week,
   int32_t, 10
 )
 VARCACHE_PREF(
+  Live,
   "network.predictor.subresource-degradation.month",
    network_predictor_subresource_degradation_month,
   int32_t, 25
 )
 VARCACHE_PREF(
+  Live,
   "network.predictor.subresource-degradation.year",
    network_predictor_subresource_degradation_year,
   int32_t, 50
 )
 VARCACHE_PREF(
+  Live,
   "network.predictor.subresource-degradation.max",
    network_predictor_subresource_degradation_max,
   int32_t, 100
 )
 
 VARCACHE_PREF(
+  Live,
   "network.predictor.prefetch-rolling-load-count",
    network_predictor_prefetch_rolling_load_count,
   int32_t, 10
 )
 
 VARCACHE_PREF(
+  Live,
   "network.predictor.prefetch-min-confidence",
    network_predictor_prefetch_min_confidence,
   int32_t, 100
 )
 VARCACHE_PREF(
+  Live,
   "network.predictor.preconnect-min-confidence",
    network_predictor_preconnect_min_confidence,
   int32_t, 90
 )
 VARCACHE_PREF(
+  Live,
   "network.predictor.preresolve-min-confidence",
    network_predictor_preresolve_min_confidence,
   int32_t, 60
 )
 
 VARCACHE_PREF(
+  Live,
   "network.predictor.prefetch-force-valid-for",
    network_predictor_prefetch_force_valid_for,
   int32_t, 10
 )
 
 VARCACHE_PREF(
+  Live,
   "network.predictor.max-resources-per-entry",
    network_predictor_max_resources_per_entry,
   int32_t, 100
 )
 
 // This is selected in concert with max-resources-per-entry to keep memory
 // usage low-ish. The default of the combo of the two is ~50k.
 VARCACHE_PREF(
+  Live,
   "network.predictor.max-uri-length",
    network_predictor_max_uri_length,
   uint32_t, 500
 )
 
 PREF("network.predictor.cleaned-up", bool, false)
 
 // A testing flag.
 VARCACHE_PREF(
+  Live,
   "network.predictor.doing-tests",
    network_predictor_doing_tests,
   bool, false
 )
 
 // Telemetry of traffic categories
 VARCACHE_PREF(
+  Live,
   "network.traffic_analyzer.enabled",
   network_traffic_analyzer_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "network.delay.tracking.load",
    network_delay_tracking_load,
    uint32_t, 0
 )
 
 // Max time to shutdown the resolver threads
 VARCACHE_PREF(
+  Live,
   "network.dns.resolver_shutdown_timeout_ms",
    network_dns_resolver_shutdown_timeout_ms,
    uint32_t, 2000
 )
 
 // Some requests during a page load are marked as "tail", mainly trackers, but not only.
 // This pref controls whether such requests are put to the tail, behind other requests
 // emerging during page loading process.
 VARCACHE_PREF(
+  Live,
   "network.http.tailing.enabled",
    network_http_tailing_enabled,
    bool, true
 )
 
 //---------------------------------------------------------------------------
 // ContentSessionStore prefs
 //---------------------------------------------------------------------------
 // Maximum number of bytes of DOMSessionStorage data we collect per origin.
 VARCACHE_PREF(
+  Live,
   "browser.sessionstore.dom_storage_limit",
   browser_sessionstore_dom_storage_limit,
   uint32_t, 2048
 )
 
 //---------------------------------------------------------------------------
 // Preferences prefs
 //---------------------------------------------------------------------------
@@ -2375,315 +2652,355 @@ VARCACHE_PREF(
 PREF("preferences.allow.omt-write", bool, true)
 
 //---------------------------------------------------------------------------
 // Privacy prefs
 //---------------------------------------------------------------------------
 
 // Whether Content Blocking Third-Party Cookies UI has been enabled.
 VARCACHE_PREF(
+  Live,
   "browser.contentblocking.allowlist.storage.enabled",
    browser_contentblocking_allowlist_storage_enabled,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "browser.contentblocking.allowlist.annotations.enabled",
    browser_contentblocking_allowlist_annotations_enabled,
   bool, true
 )
 
 // How many recent block/unblock actions per origins we remember in the
 // Content Blocking log for each top-level window.
 VARCACHE_PREF(
+  Live,
   "browser.contentblocking.originlog.length",
    browser_contentblocking_originlog_length,
   uint32_t, 32
 )
 
 VARCACHE_PREF(
+  Live,
   "browser.contentblocking.rejecttrackers.control-center.ui.enabled",
    browser_contentblocking_rejecttrackers_control_center_ui_enabled,
   bool, false
 )
 
 // Annotate trackers using the strict list. If set to false, the basic list will
 // be used instead.
 #ifdef EARLY_BETA_OR_EARLIER
 #define PREF_VALUE true
 #else
 #define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "privacy.annotate_channels.strict_list.enabled",
    privacy_annotate_channels_strict_list_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Annotate channels based on the tracking protection list in all modes
 VARCACHE_PREF(
+  Live,
   "privacy.trackingprotection.annotate_channels",
    privacy_trackingprotection_annotate_channels,
   bool, true
 )
 
 // Block 3rd party fingerprinting resources.
 VARCACHE_PREF(
+  Live,
   "privacy.trackingprotection.fingerprinting.enabled",
    privacy_trackingprotection_fingerprinting_enabled,
   bool, false
 )
 
 // Annotate fingerprinting resources.
 VARCACHE_PREF(
+  Live,
   "privacy.trackingprotection.fingerprinting.annotate.enabled",
    privacy_trackingprotection_fingerprinting_annotate_enabled,
   bool, true
 )
 
 // Block 3rd party cryptomining resources.
 VARCACHE_PREF(
+  Live,
   "privacy.trackingprotection.cryptomining.enabled",
    privacy_trackingprotection_cryptomining_enabled,
   bool, false
 )
 
 // Annotate cryptomining resources.
 VARCACHE_PREF(
+  Live,
   "privacy.trackingprotection.cryptomining.annotate.enabled",
    privacy_trackingprotection_cryptomining_annotate_enabled,
   bool, true
 )
 
 // Spoof user locale to English
 VARCACHE_PREF(
+  Live,
   "privacy.spoof_english",
    privacy_spoof_english,
   RelaxedAtomicUint32, 0
 )
 
 // send "do not track" HTTP header, disabled by default
 VARCACHE_PREF(
+  Live,
   "privacy.donottrackheader.enabled",
    privacy_donottrackheader_enabled,
   bool, false
 )
 
 // Lower the priority of network loads for resources on the tracking protection
 // list.  Note that this requires the
 // privacy.trackingprotection.annotate_channels pref to be on in order to have
 // any effect.
 #ifdef NIGHTLY_BUILD
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "privacy.trackingprotection.lower_network_priority",
    privacy_trackingprotection_lower_network_priority,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 // Anti-tracking permission expiration
 VARCACHE_PREF(
+  Live,
   "privacy.restrict3rdpartystorage.expiration",
    privacy_restrict3rdpartystorage_expiration,
   uint32_t, 2592000 // 30 days (in seconds)
 )
 
 // Anti-tracking user-interaction expiration
 VARCACHE_PREF(
+  Live,
   "privacy.userInteraction.expiration",
    privacy_userInteraction_expiration,
   uint32_t, 2592000 // 30 days (in seconds)
 )
 
 // Anti-tracking user-interaction document interval
 VARCACHE_PREF(
+  Live,
   "privacy.userInteraction.document.interval",
    privacy_userInteraction_document_interval,
   uint32_t, 1800 // 30 minutes (in seconds)
 )
 
 // Maximum client-side cookie life-time cap
 #ifdef NIGHTLY_BUILD
 # define PREF_VALUE 604800 // 7 days
 #else
 # define PREF_VALUE 0
 #endif
 VARCACHE_PREF(
+  Live,
   "privacy.documentCookies.maxage",
    privacy_documentCookies_maxage,
   uint32_t, PREF_VALUE // (in seconds, set to 0 to disable)
 )
 #undef PREF_VALUE
 
 // Anti-fingerprinting, disabled by default
 VARCACHE_PREF(
+  Live,
   "privacy.resistFingerprinting",
    privacy_resistFingerprinting,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts",
    privacy_resistFingerprinting_autoDeclineNoUserInputCanvasPrompts,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "privacy.storagePrincipal.enabledForTrackers",
    privacy_storagePrincipal_enabledForTrackers,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "privacy.window.maxInnerWidth",
    privacy_window_maxInnerWidth,
   int32_t, 1000
 )
 
 VARCACHE_PREF(
+  Live,
   "privacy.window.maxInnerHeight",
    privacy_window_maxInnerHeight,
   int32_t, 1000
 )
 
 // Time limit, in milliseconds, for EventStateManager::IsHandlingUserInput().
 // Used to detect long running handlers of user-generated events.
 VARCACHE_PREF(
+  Live,
   "dom.event.handling-user-input-time-limit",
    dom_event_handling_user_input_time_limit,
   uint32_t, 1000
 )
 
 // Password protection
 VARCACHE_PREF(
+  Live,
   "browser.safebrowsing.passwords.enabled",
    browser_safebrowsing_passwords_enabled,
   bool, false
 )
 
 // Malware protection
 VARCACHE_PREF(
+  Live,
   "browser.safebrowsing.malware.enabled",
    browser_safebrowsing_malware_enabled,
   bool, true
 )
 
 // Phishing protection
 VARCACHE_PREF(
+  Live,
   "browser.safebrowsing.phishing.enabled",
    browser_safebrowsing_phishing_enabled,
   bool, true
 )
 
 // Blocked plugin content
 VARCACHE_PREF(
+  Live,
   "browser.safebrowsing.blockedURIs.enabled",
    browser_safebrowsing_blockedURIs_enabled,
   bool, true
 )
 
 // Maximum size for an array to store the safebrowsing prefixset.
 VARCACHE_PREF(
+  Live,
   "browser.safebrowsing.prefixset_max_array_size",
    browser_safebrowsing_prefixset_max_array_size,
   RelaxedAtomicUint32, 512*1024
 )
 
 // When this pref is enabled document loads with a mismatched
 // Cross-Origin header will fail to load
-VARCACHE_PREF("browser.tabs.remote.useCrossOriginPolicy",
-              browser_tabs_remote_useCrossOriginPolicy,
-              bool, false
+VARCACHE_PREF(
+  Live,
+  "browser.tabs.remote.useCrossOriginPolicy",
+  browser_tabs_remote_useCrossOriginPolicy,
+  bool, false
 )
 
 // Prevent system colors from being exposed to CSS or canvas.
 VARCACHE_PREF(
+  Live,
   "ui.use_standins_for_native_colors",
    ui_use_standins_for_native_colors,
    RelaxedAtomicBool, false
 )
 
 // Disable page loading activity cursor by default.
 VARCACHE_PREF(
+  Live,
   "ui.use_activity_cursor",
    ui_use_activity_cursor,
    bool, false
 )
 
 //---------------------------------------------------------------------------
 // ChannelClassifier prefs
 //---------------------------------------------------------------------------
 
 VARCACHE_PREF(
+  Live,
   "channelclassifier.allowlist_example",
    channelclassifier_allowlist_example,
   bool, false
 )
 
 //---------------------------------------------------------------------------
 // Security prefs
 //---------------------------------------------------------------------------
 
 VARCACHE_PREF(
+  Live,
   "security.csp.enable",
    security_csp_enable,
   bool, true
 )
 
 
 VARCACHE_PREF(
+  Live,
   "security.csp.enableStrictDynamic",
    security_csp_enableStrictDynamic,
   bool, true
 )
 
 VARCACHE_PREF(
+  Live,
   "security.csp.reporting.script-sample.max-length",
    security_csp_reporting_script_sample_max_length,
   int32_t, 40
 )
 
 //---------------------------------------------------------------------------
 // View source prefs
 //---------------------------------------------------------------------------
 
 VARCACHE_PREF(
+  Live,
   "view_source.editor.external",
    view_source_editor_external,
   bool, false
 )
 
 //---------------------------------------------------------------------------
 // DevTools prefs
 //---------------------------------------------------------------------------
 
 VARCACHE_PREF(
+  Live,
   "devtools.enabled",
    devtools_enabled,
   RelaxedAtomicBool, false
 )
 
 #ifdef MOZILLA_OFFICIAL
 # define PREF_VALUE false
 #else
 # define PREF_VALUE true
 #endif
 VARCACHE_PREF(
+  Live,
   "devtools.console.stdout.chrome",
    devtools_console_stdout_chrome,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "devtools.console.stdout.content",
    devtools_console_stdout_content,
   RelaxedAtomicBool, false
 )
 
 //---------------------------------------------------------------------------
 // Feature-Policy prefs
 //---------------------------------------------------------------------------
@@ -2691,571 +3008,589 @@ VARCACHE_PREF(
 #ifdef NIGHTLY_BUILD
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 // This pref enables FeaturePolicy logic and the parsing of 'allow' attribute in
 // HTMLIFrameElement objects.
 VARCACHE_PREF(
+  Live,
   "dom.security.featurePolicy.enabled",
    dom_security_featurePolicy_enabled,
   bool, PREF_VALUE
 )
 
 // This pref enables the featurePolicy header support.
 VARCACHE_PREF(
+  Live,
   "dom.security.featurePolicy.header.enabled",
    dom_security_featurePolicy_header_enabled,
   bool, PREF_VALUE
 )
 
 // Expose the 'policy' attribute in document and HTMLIFrameElement
 VARCACHE_PREF(
+  Live,
   "dom.security.featurePolicy.webidl.enabled",
    dom_security_featurePolicy_webidl_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 //---------------------------------------------------------------------------
 // Plugins prefs
 //---------------------------------------------------------------------------
 
 VARCACHE_PREF(
+  Live,
   "plugins.flashBlock.enabled",
    plugins_flashBlock_enabled,
   bool, false
 )
 
 VARCACHE_PREF(
+  Live,
   "plugins.http_https_only",
    plugins_http_https_only,
   bool, true
 )
 
 //---------------------------------------------------------------------------
 // Reporting API
 //---------------------------------------------------------------------------
 
 #ifdef NIGHTLY_BUILD
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.reporting.enabled",
    dom_reporting_enabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "dom.reporting.testing.enabled",
    dom_reporting_testing_enabled,
   RelaxedAtomicBool, false
 )
 
 #ifdef NIGHTLY_BUILD
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.reporting.featurePolicy.enabled",
    dom_reporting_featurePolicy_enabled,
   RelaxedAtomicBool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "dom.reporting.header.enabled",
    dom_reporting_header_enabled,
   RelaxedAtomicBool, false
 )
 
 // In seconds. The timeout to remove not-active report-to endpoints.
 VARCACHE_PREF(
+  Live,
   "dom.reporting.cleanup.timeout",
    dom_reporting_cleanup_timeout,
   uint32_t, 3600
 )
 
 // Any X seconds the reports are dispatched to endpoints.
 VARCACHE_PREF(
+  Live,
   "dom.reporting.delivering.timeout",
    dom_reporting_delivering_timeout,
   uint32_t, 5
 )
 
 // How many times the delivering of a report should be tried.
 VARCACHE_PREF(
+  Live,
   "dom.reporting.delivering.maxFailures",
    dom_reporting_delivering_maxFailures,
   uint32_t, 3
 )
 
 // How many reports should be stored in the report queue before being delivered.
 VARCACHE_PREF(
+  Live,
   "dom.reporting.delivering.maxReports",
    dom_reporting_delivering_maxReports,
   uint32_t, 100
 )
 
 // In case Touch API is enabled, this pref controls whether to support
 // ontouch* event handlers, document.createTouch, document.createTouchList and
 // document.createEvent("TouchEvent").
 #ifdef ANDROID
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
+  Live,
   "dom.w3c_touch_events.legacy_apis.enabled",
    dom_w3c_touch_events_legacy_apis_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
+  Live,
   "medium_high_event_queue.enabled",
    medium_high_event_queue_enabled,
   RelaxedAtomicBool, true
 )
 
 // Whether strict file origin policy is in effect.
 VARCACHE_PREF(
+  Live,
   "security.fileuri.strict_origin_policy",
    security_fileuri_strict_origin_policy,
   RelaxedAtomicBool, true
 )
 
 // Whether origin telemetry should be enabled
 // NOTE: if telemetry.origin_telemetry_test_mode.enabled is enabled, this pref
 //       won't have any effect.
 VARCACHE_PREF(
+  Live,
   "privacy.trackingprotection.origin_telemetry.enabled",
    privacy_trackingprotection_origin_telemetry_enabled,
   RelaxedAtomicBool, false
 )
 
 // Enable origin telemetry test mode or not
 // NOTE: turning this on will override the
 //       privacy.trackingprotection.origin_telemetry.enabled pref.
 VARCACHE_PREF(
+  Live,
   "telemetry.origin_telemetry_test_mode.enabled",
    telemetry_origin_telemetry_test_mode_enabled,
   RelaxedAtomicBool, false
 )
 
 //---------------------------------------------------------------------------
 // Start of previous gfxPrefs
 //---------------------------------------------------------------------------
 
   // The apz prefs are explained in AsyncPanZoomController.cpp
-VARCACHE_PREF("accessibility.browsewithcaret", AccessibilityBrowseWithCaret, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "accessibility.browsewithcaret", AccessibilityBrowseWithCaret, RelaxedAtomicBool, false);
 
   // The apz prefs are explained in AsyncPanZoomController.cpp
-VARCACHE_PREF("apz.allow_double_tap_zooming",          APZAllowDoubleTapZooming, RelaxedAtomicBool, true);
-VARCACHE_PREF("apz.allow_immediate_handoff",           APZAllowImmediateHandoff, RelaxedAtomicBool, true);
-VARCACHE_PREF("apz.allow_zooming",                     APZAllowZooming, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.android.chrome_fling_physics.enabled", APZUseChromeFlingPhysics, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.android.chrome_fling_physics.friction", APZChromeFlingPhysicsFriction, AtomicFloat, 0.015f);
-VARCACHE_PREF("apz.android.chrome_fling_physics.inflexion", APZChromeFlingPhysicsInflexion, AtomicFloat, 0.35f);
-VARCACHE_PREF("apz.android.chrome_fling_physics.stop_threshold", APZChromeFlingPhysicsStopThreshold, AtomicFloat, 0.1f);
-VARCACHE_PREF("apz.autoscroll.enabled",                APZAutoscrollEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.axis_lock.breakout_angle",          APZAxisBreakoutAngle, AtomicFloat, float(M_PI / 8.0) /* 22.5 degrees */);
-VARCACHE_PREF("apz.axis_lock.breakout_threshold",      APZAxisBreakoutThreshold, AtomicFloat, 1.0f / 32.0f);
-VARCACHE_PREF("apz.axis_lock.direct_pan_angle",        APZAllowedDirectPanAngle, AtomicFloat, float(M_PI / 3.0) /* 60 degrees */);
-VARCACHE_PREF("apz.axis_lock.lock_angle",              APZAxisLockAngle, AtomicFloat, float(M_PI / 6.0) /* 30 degrees */);
-VARCACHE_PREF("apz.axis_lock.mode",                    APZAxisLockMode, RelaxedAtomicInt32, 0);
-VARCACHE_PREF("apz.content_response_timeout",          APZContentResponseTimeout, RelaxedAtomicInt32, 400);
-VARCACHE_PREF("apz.danger_zone_x",                     APZDangerZoneX, RelaxedAtomicInt32, 50);
-VARCACHE_PREF("apz.danger_zone_y",                     APZDangerZoneY, RelaxedAtomicInt32, 100);
-VARCACHE_PREF("apz.disable_for_scroll_linked_effects", APZDisableForScrollLinkedEffects, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.displayport_expiry_ms",             APZDisplayPortExpiryTime, RelaxedAtomicUint32, 15000);
-VARCACHE_PREF("apz.drag.enabled",                      APZDragEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.drag.initial.enabled",              APZDragInitiationEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.drag.touch.enabled",                APZTouchDragEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.enlarge_displayport_when_clipped",  APZEnlargeDisplayPortWhenClipped, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.fixed-margin-override.enabled",     APZFixedMarginOverrideEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.fixed-margin-override.bottom",      APZFixedMarginOverrideBottom, RelaxedAtomicInt32, 0);
-VARCACHE_PREF("apz.fixed-margin-override.top",         APZFixedMarginOverrideTop, RelaxedAtomicInt32, 0);
-VARCACHE_PREF("apz.fling_accel_base_mult",             APZFlingAccelBaseMultiplier, AtomicFloat, 1.0f);
-VARCACHE_PREF("apz.fling_accel_interval_ms",           APZFlingAccelInterval, RelaxedAtomicInt32, 500);
-VARCACHE_PREF("apz.fling_accel_supplemental_mult",     APZFlingAccelSupplementalMultiplier, AtomicFloat, 1.0f);
-VARCACHE_PREF("apz.fling_accel_min_velocity",          APZFlingAccelMinVelocity, AtomicFloat, 1.5f);
-VARCACHE_PREF("apz.fling_curve_threshold_inches_per_ms", APZCurveThreshold, AtomicFloat, -1.0f);
-VARCACHE_PREF("apz.fling_friction",                    APZFlingFriction, AtomicFloat, 0.002f);
-VARCACHE_PREF("apz.fling_min_velocity_threshold",      APZFlingMinVelocityThreshold, AtomicFloat, 0.5f);
-VARCACHE_PREF("apz.fling_stop_on_tap_threshold",       APZFlingStopOnTapThreshold, AtomicFloat, 0.05f);
-VARCACHE_PREF("apz.fling_stopped_threshold",           APZFlingStoppedThreshold, AtomicFloat, 0.01f);
-VARCACHE_PREF("apz.frame_delay.enabled",               APZFrameDelayEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.keyboard.passive-listeners",        APZKeyboardPassiveListeners, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.max_tap_time",                      APZMaxTapTime, RelaxedAtomicInt32, 300);
-VARCACHE_PREF("apz.max_velocity_inches_per_ms",        APZMaxVelocity, AtomicFloat, -1.0f);
-VARCACHE_PREF("apz.min_skate_speed",                   APZMinSkateSpeed, AtomicFloat, 1.0f);
-VARCACHE_PREF("apz.minimap.enabled",                   APZMinimap, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.one_touch_pinch.enabled",           APZOneTouchPinchEnabled, RelaxedAtomicBool, true);
-VARCACHE_PREF("apz.overscroll.enabled",                APZOverscrollEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.overscroll.min_pan_distance_ratio", APZMinPanDistanceRatio, AtomicFloat, 1.0f);
-VARCACHE_PREF("apz.overscroll.spring_stiffness",       APZOverscrollSpringStiffness, AtomicFloat, 0.001f);
-VARCACHE_PREF("apz.overscroll.stop_distance_threshold", APZOverscrollStopDistanceThreshold, AtomicFloat, 5.0f);
-VARCACHE_PREF("apz.paint_skipping.enabled",            APZPaintSkipping, RelaxedAtomicBool, true);
-VARCACHE_PREF("apz.peek_messages.enabled",             APZPeekMessages, RelaxedAtomicBool, true);
-VARCACHE_PREF("apz.pinch_lock.mode",                   APZPinchLockMode, RelaxedAtomicInt32, 1);
-VARCACHE_PREF("apz.pinch_lock.scroll_lock_threshold",  APZPinchLockScrollLockThreshold, AtomicFloat, 1.0f / 32.0f);
-VARCACHE_PREF("apz.pinch_lock.span_breakout_threshold", APZPinchLockSpanBreakoutThreshold, AtomicFloat, 1.0f / 32.0f);
-VARCACHE_PREF("apz.pinch_lock.span_lock_threshold",    APZPinchLockSpanLockThreshold, AtomicFloat, 1.0f / 32.0f);
-VARCACHE_PREF("apz.popups.enabled",                    APZPopupsEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.printtree",                         APZPrintTree, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.record_checkerboarding",            APZRecordCheckerboarding, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.second_tap_tolerance",              APZSecondTapTolerance, AtomicFloat, 0.5f);
-VARCACHE_PREF("apz.test.fails_with_native_injection",  APZTestFailsWithNativeInjection, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.test.logging_enabled",              APZTestLoggingEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("apz.touch_move_tolerance",              APZTouchMoveTolerance, AtomicFloat, 0.1f);
-VARCACHE_PREF("apz.touch_start_tolerance",             APZTouchStartTolerance, AtomicFloat, 1.0f/4.5f);
-VARCACHE_PREF("apz.velocity_bias",                     APZVelocityBias, AtomicFloat, 0.0f);
-VARCACHE_PREF("apz.velocity_relevance_time_ms",        APZVelocityRelevanceTime, RelaxedAtomicUint32, 150);
-VARCACHE_PREF("apz.x_skate_highmem_adjust",            APZXSkateHighMemAdjust, AtomicFloat, 0.0f);
-VARCACHE_PREF("apz.x_skate_size_multiplier",           APZXSkateSizeMultiplier, AtomicFloat, 1.5f);
-VARCACHE_PREF("apz.x_stationary_size_multiplier",      APZXStationarySizeMultiplier, AtomicFloat, 3.0f);
-VARCACHE_PREF("apz.y_skate_highmem_adjust",            APZYSkateHighMemAdjust, AtomicFloat, 0.0f);
-VARCACHE_PREF("apz.y_skate_size_multiplier",           APZYSkateSizeMultiplier, AtomicFloat, 2.5f);
-VARCACHE_PREF("apz.y_stationary_size_multiplier",      APZYStationarySizeMultiplier, AtomicFloat, 3.5f);
-VARCACHE_PREF("apz.zoom_animation_duration_ms",        APZZoomAnimationDuration, RelaxedAtomicInt32, 250);
-VARCACHE_PREF("apz.scale_repaint_delay_ms",            APZScaleRepaintDelay, RelaxedAtomicInt32, 500);
-VARCACHE_PREF("apz.relative-update.enabled",           APZRelativeUpdate, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("browser.ui.scroll-toolbar-threshold",   ToolbarScrollThreshold, RelaxedAtomicInt32, 10);
-VARCACHE_PREF("browser.ui.zoom.force-user-scalable",   ForceUserScalable, RelaxedAtomicBool, false);
-VARCACHE_PREF("browser.viewport.desktopWidth",         DesktopViewportWidth, RelaxedAtomicInt32, 980);
-
-VARCACHE_PREF("dom.ipc.plugins.asyncdrawing.enabled",  PluginAsyncDrawingEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("dom.meta-viewport.enabled",             MetaViewportEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("dom.vr.autoactivate.enabled",           VRAutoActivateEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("dom.vr.controller_trigger_threshold",   VRControllerTriggerThreshold, AtomicFloat, 0.1f);
-VARCACHE_PREF("dom.vr.external.notdetected.timeout",   VRExternalNotDetectedTimeout, RelaxedAtomicInt32, 60000);
-VARCACHE_PREF("dom.vr.external.quit.timeout",          VRExternalQuitTimeout, RelaxedAtomicInt32, 10000);
-VARCACHE_PREF("dom.vr.navigation.timeout",             VRNavigationTimeout, RelaxedAtomicInt32, 1000);
-VARCACHE_PREF("dom.vr.oculus.invisible.enabled",       VROculusInvisibleEnabled, RelaxedAtomicBool, true);
-VARCACHE_PREF("dom.vr.oculus.present.timeout",         VROculusPresentTimeout, RelaxedAtomicInt32, 500);
-VARCACHE_PREF("dom.vr.oculus.quit.timeout",            VROculusQuitTimeout, RelaxedAtomicInt32, 10000);
-VARCACHE_PREF("dom.vr.controller.enumerate.interval",  VRControllerEnumerateInterval, RelaxedAtomicInt32, 1000);
-VARCACHE_PREF("dom.vr.display.enumerate.interval",     VRDisplayEnumerateInterval, RelaxedAtomicInt32, 5000);
-VARCACHE_PREF("dom.vr.inactive.timeout",               VRInactiveTimeout, RelaxedAtomicInt32, 5000);
-VARCACHE_PREF("dom.vr.poseprediction.enabled",         VRPosePredictionEnabled, RelaxedAtomicBool, true);
-VARCACHE_PREF("dom.vr.require-gesture",                VRRequireGesture, RelaxedAtomicBool, true);
-VARCACHE_PREF("dom.vr.puppet.enabled",                 VRPuppetEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("dom.vr.puppet.submitframe",             VRPuppetSubmitFrame, RelaxedAtomicUint32, 0);
-VARCACHE_PREF("dom.vr.display.rafMaxDuration",         VRDisplayRafMaxDuration, RelaxedAtomicUint32, 50);
-VARCACHE_PREF("dom.w3c_pointer_events.enabled",        PointerEventsEnabled, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("general.smoothScroll",                  SmoothScrollEnabled, RelaxedAtomicBool, true);
-VARCACHE_PREF("general.smoothScroll.currentVelocityWeighting",
-                SmoothScrollCurrentVelocityWeighting, AtomicFloat, 0.25);
-VARCACHE_PREF("general.smoothScroll.durationToIntervalRatio",
+VARCACHE_PREF(Live, "apz.allow_double_tap_zooming",          APZAllowDoubleTapZooming, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "apz.allow_immediate_handoff",           APZAllowImmediateHandoff, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "apz.allow_zooming",                     APZAllowZooming, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.android.chrome_fling_physics.enabled", APZUseChromeFlingPhysics, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.android.chrome_fling_physics.friction", APZChromeFlingPhysicsFriction, AtomicFloat,  0.015f);
+VARCACHE_PREF(Live, "apz.android.chrome_fling_physics.inflexion", APZChromeFlingPhysicsInflexion, AtomicFloat,  0.35f);
+VARCACHE_PREF(Live, "apz.android.chrome_fling_physics.stop_threshold", APZChromeFlingPhysicsStopThreshold, AtomicFloat,  0.1f);
+VARCACHE_PREF(Live, "apz.autoscroll.enabled",                APZAutoscrollEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.axis_lock.breakout_angle",          APZAxisBreakoutAngle, AtomicFloat,  float(M_PI / 8.0) /* 22.5 degrees */);
+VARCACHE_PREF(Live, "apz.axis_lock.breakout_threshold",      APZAxisBreakoutThreshold, AtomicFloat,  1.0f / 32.0f);
+VARCACHE_PREF(Live, "apz.axis_lock.direct_pan_angle",        APZAllowedDirectPanAngle, AtomicFloat,  float(M_PI / 3.0) /* 60 degrees */);
+VARCACHE_PREF(Live, "apz.axis_lock.lock_angle",              APZAxisLockAngle, AtomicFloat,  float(M_PI / 6.0) /* 30 degrees */);
+VARCACHE_PREF(Live, "apz.axis_lock.mode",                    APZAxisLockMode, RelaxedAtomicInt32, 0);
+VARCACHE_PREF(Live, "apz.content_response_timeout",          APZContentResponseTimeout, RelaxedAtomicInt32, 400);
+VARCACHE_PREF(Live, "apz.danger_zone_x",                     APZDangerZoneX, RelaxedAtomicInt32, 50);
+VARCACHE_PREF(Live, "apz.danger_zone_y",                     APZDangerZoneY, RelaxedAtomicInt32, 100);
+VARCACHE_PREF(Live, "apz.disable_for_scroll_linked_effects", APZDisableForScrollLinkedEffects, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.displayport_expiry_ms",             APZDisplayPortExpiryTime, RelaxedAtomicUint32, 15000);
+VARCACHE_PREF(Live, "apz.drag.enabled",                      APZDragEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.drag.initial.enabled",              APZDragInitiationEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.drag.touch.enabled",                APZTouchDragEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.enlarge_displayport_when_clipped",  APZEnlargeDisplayPortWhenClipped, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.fixed-margin-override.enabled",     APZFixedMarginOverrideEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.fixed-margin-override.bottom",      APZFixedMarginOverrideBottom, RelaxedAtomicInt32, 0);
+VARCACHE_PREF(Live, "apz.fixed-margin-override.top",         APZFixedMarginOverrideTop, RelaxedAtomicInt32, 0);
+VARCACHE_PREF(Live, "apz.fling_accel_base_mult",             APZFlingAccelBaseMultiplier, AtomicFloat,  1.0f);
+VARCACHE_PREF(Live, "apz.fling_accel_interval_ms",           APZFlingAccelInterval, RelaxedAtomicInt32, 500);
+VARCACHE_PREF(Live, "apz.fling_accel_supplemental_mult",     APZFlingAccelSupplementalMultiplier, AtomicFloat,  1.0f);
+VARCACHE_PREF(Live, "apz.fling_accel_min_velocity",          APZFlingAccelMinVelocity, AtomicFloat,  1.5f);
+VARCACHE_PREF(Live, "apz.fling_curve_threshold_inches_per_ms", APZCurveThreshold, AtomicFloat,  -1.0f);
+VARCACHE_PREF(Live, "apz.fling_friction",                    APZFlingFriction, AtomicFloat,  0.002f);
+VARCACHE_PREF(Live, "apz.fling_min_velocity_threshold",      APZFlingMinVelocityThreshold, AtomicFloat,  0.5f);
+VARCACHE_PREF(Live, "apz.fling_stop_on_tap_threshold",       APZFlingStopOnTapThreshold, AtomicFloat,  0.05f);
+VARCACHE_PREF(Live, "apz.fling_stopped_threshold",           APZFlingStoppedThreshold, AtomicFloat,  0.01f);
+VARCACHE_PREF(Live, "apz.frame_delay.enabled",               APZFrameDelayEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.keyboard.passive-listeners",        APZKeyboardPassiveListeners, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.max_tap_time",                      APZMaxTapTime, RelaxedAtomicInt32, 300);
+VARCACHE_PREF(Live, "apz.max_velocity_inches_per_ms",        APZMaxVelocity, AtomicFloat,  -1.0f);
+VARCACHE_PREF(Live, "apz.min_skate_speed",                   APZMinSkateSpeed, AtomicFloat,  1.0f);
+VARCACHE_PREF(Live, "apz.minimap.enabled",                   APZMinimap, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.one_touch_pinch.enabled",           APZOneTouchPinchEnabled, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "apz.overscroll.enabled",                APZOverscrollEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.overscroll.min_pan_distance_ratio", APZMinPanDistanceRatio, AtomicFloat,  1.0f);
+VARCACHE_PREF(Live, "apz.overscroll.spring_stiffness",       APZOverscrollSpringStiffness, AtomicFloat,  0.001f);
+VARCACHE_PREF(Live, "apz.overscroll.stop_distance_threshold", APZOverscrollStopDistanceThreshold, AtomicFloat,  5.0f);
+VARCACHE_PREF(Live, "apz.paint_skipping.enabled",            APZPaintSkipping, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "apz.peek_messages.enabled",             APZPeekMessages, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "apz.pinch_lock.mode",                   APZPinchLockMode, RelaxedAtomicInt32, 1);
+VARCACHE_PREF(Live, "apz.pinch_lock.scroll_lock_threshold",  APZPinchLockScrollLockThreshold, AtomicFloat,  1.0f / 32.0f);
+VARCACHE_PREF(Live, "apz.pinch_lock.span_breakout_threshold", APZPinchLockSpanBreakoutThreshold, AtomicFloat,  1.0f / 32.0f);
+VARCACHE_PREF(Live, "apz.pinch_lock.span_lock_threshold",    APZPinchLockSpanLockThreshold, AtomicFloat,  1.0f / 32.0f);
+VARCACHE_PREF(Live, "apz.popups.enabled",                    APZPopupsEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.printtree",                         APZPrintTree, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.record_checkerboarding",            APZRecordCheckerboarding, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.second_tap_tolerance",              APZSecondTapTolerance, AtomicFloat,  0.5f);
+VARCACHE_PREF(Live, "apz.test.fails_with_native_injection",  APZTestFailsWithNativeInjection, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.test.logging_enabled",              APZTestLoggingEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "apz.touch_move_tolerance",              APZTouchMoveTolerance, AtomicFloat,  0.1f);
+VARCACHE_PREF(Live, "apz.touch_start_tolerance",             APZTouchStartTolerance, AtomicFloat,  1.0f/4.5f);
+VARCACHE_PREF(Live, "apz.velocity_bias",                     APZVelocityBias, AtomicFloat,  0.0f);
+VARCACHE_PREF(Live, "apz.velocity_relevance_time_ms",        APZVelocityRelevanceTime, RelaxedAtomicUint32, 150);
+VARCACHE_PREF(Live, "apz.x_skate_highmem_adjust",            APZXSkateHighMemAdjust, AtomicFloat,  0.0f);
+VARCACHE_PREF(Live, "apz.x_skate_size_multiplier",           APZXSkateSizeMultiplier, AtomicFloat,  1.5f);
+VARCACHE_PREF(Live, "apz.x_stationary_size_multiplier",      APZXStationarySizeMultiplier, AtomicFloat,  3.0f);
+VARCACHE_PREF(Live, "apz.y_skate_highmem_adjust",            APZYSkateHighMemAdjust, AtomicFloat,  0.0f);
+VARCACHE_PREF(Live, "apz.y_skate_size_multiplier",           APZYSkateSizeMultiplier, AtomicFloat,  2.5f);
+VARCACHE_PREF(Live, "apz.y_stationary_size_multiplier",      APZYStationarySizeMultiplier, AtomicFloat,  3.5f);
+VARCACHE_PREF(Live, "apz.zoom_animation_duration_ms",        APZZoomAnimationDuration, RelaxedAtomicInt32, 250);
+VARCACHE_PREF(Live, "apz.scale_repaint_delay_ms",            APZScaleRepaintDelay, RelaxedAtomicInt32, 500);
+VARCACHE_PREF(Live, "apz.relative-update.enabled",           APZRelativeUpdate, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "browser.ui.scroll-toolbar-threshold",   ToolbarScrollThreshold, RelaxedAtomicInt32, 10);
+VARCACHE_PREF(Live, "browser.ui.zoom.force-user-scalable",   ForceUserScalable, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "browser.viewport.desktopWidth",         DesktopViewportWidth, RelaxedAtomicInt32, 980);
+
+VARCACHE_PREF(Live, "dom.ipc.plugins.asyncdrawing.enabled",  PluginAsyncDrawingEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "dom.meta-viewport.enabled",             MetaViewportEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "dom.vr.autoactivate.enabled",           VRAutoActivateEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "dom.vr.controller_trigger_threshold",   VRControllerTriggerThreshold, AtomicFloat,  0.1f);
+VARCACHE_PREF(Live, "dom.vr.external.notdetected.timeout",   VRExternalNotDetectedTimeout, RelaxedAtomicInt32, 60000);
+VARCACHE_PREF(Live, "dom.vr.external.quit.timeout",          VRExternalQuitTimeout, RelaxedAtomicInt32, 10000);
+VARCACHE_PREF(Live, "dom.vr.navigation.timeout",             VRNavigationTimeout, RelaxedAtomicInt32, 1000);
+VARCACHE_PREF(Live, "dom.vr.oculus.invisible.enabled",       VROculusInvisibleEnabled, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "dom.vr.oculus.present.timeout",         VROculusPresentTimeout, RelaxedAtomicInt32, 500);
+VARCACHE_PREF(Live, "dom.vr.oculus.quit.timeout",            VROculusQuitTimeout, RelaxedAtomicInt32, 10000);
+VARCACHE_PREF(Live, "dom.vr.controller.enumerate.interval",  VRControllerEnumerateInterval, RelaxedAtomicInt32, 1000);
+VARCACHE_PREF(Live, "dom.vr.display.enumerate.interval",     VRDisplayEnumerateInterval, RelaxedAtomicInt32, 5000);
+VARCACHE_PREF(Live, "dom.vr.inactive.timeout",               VRInactiveTimeout, RelaxedAtomicInt32, 5000);
+VARCACHE_PREF(Live, "dom.vr.poseprediction.enabled",         VRPosePredictionEnabled, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "dom.vr.require-gesture",                VRRequireGesture, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "dom.vr.puppet.enabled",                 VRPuppetEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "dom.vr.puppet.submitframe",             VRPuppetSubmitFrame, RelaxedAtomicUint32, 0);
+VARCACHE_PREF(Live, "dom.vr.display.rafMaxDuration",         VRDisplayRafMaxDuration, RelaxedAtomicUint32, 50);
+VARCACHE_PREF(Live, "dom.w3c_pointer_events.enabled",        PointerEventsEnabled, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "general.smoothScroll",                  SmoothScrollEnabled, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "general.smoothScroll.currentVelocityWeighting",
+                SmoothScrollCurrentVelocityWeighting, AtomicFloat,  0.25);
+VARCACHE_PREF(Live, "general.smoothScroll.durationToIntervalRatio",
                 SmoothScrollDurationToIntervalRatio, RelaxedAtomicInt32, 200);
-VARCACHE_PREF("general.smoothScroll.lines.durationMaxMS",
+VARCACHE_PREF(Live, "general.smoothScroll.lines.durationMaxMS",
                 LineSmoothScrollMaxDurationMs, RelaxedAtomicInt32, 150);
-VARCACHE_PREF("general.smoothScroll.lines.durationMinMS",
+VARCACHE_PREF(Live, "general.smoothScroll.lines.durationMinMS",
                 LineSmoothScrollMinDurationMs, RelaxedAtomicInt32, 150);
-VARCACHE_PREF("general.smoothScroll.mouseWheel",       WheelSmoothScrollEnabled, RelaxedAtomicBool, true);
-VARCACHE_PREF("general.smoothScroll.mouseWheel.durationMaxMS",
+VARCACHE_PREF(Live, "general.smoothScroll.mouseWheel",       WheelSmoothScrollEnabled, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "general.smoothScroll.mouseWheel.durationMaxMS",
                 WheelSmoothScrollMaxDurationMs, RelaxedAtomicInt32, 400);
-VARCACHE_PREF("general.smoothScroll.mouseWheel.durationMinMS",
+VARCACHE_PREF(Live, "general.smoothScroll.mouseWheel.durationMinMS",
                 WheelSmoothScrollMinDurationMs, RelaxedAtomicInt32, 200);
-VARCACHE_PREF("general.smoothScroll.other.durationMaxMS",
+VARCACHE_PREF(Live, "general.smoothScroll.other.durationMaxMS",
                 OtherSmoothScrollMaxDurationMs, RelaxedAtomicInt32, 150);
-VARCACHE_PREF("general.smoothScroll.other.durationMinMS",
+VARCACHE_PREF(Live, "general.smoothScroll.other.durationMinMS",
                 OtherSmoothScrollMinDurationMs, RelaxedAtomicInt32, 150);
-VARCACHE_PREF("general.smoothScroll.pages",            PageSmoothScrollEnabled, RelaxedAtomicBool, true);
-VARCACHE_PREF("general.smoothScroll.pages.durationMaxMS",
+VARCACHE_PREF(Live, "general.smoothScroll.pages",            PageSmoothScrollEnabled, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "general.smoothScroll.pages.durationMaxMS",
                 PageSmoothScrollMaxDurationMs, RelaxedAtomicInt32, 150);
-VARCACHE_PREF("general.smoothScroll.pages.durationMinMS",
+VARCACHE_PREF(Live, "general.smoothScroll.pages.durationMinMS",
                 PageSmoothScrollMinDurationMs, RelaxedAtomicInt32, 150);
-VARCACHE_PREF("general.smoothScroll.pixels.durationMaxMS",
+VARCACHE_PREF(Live, "general.smoothScroll.pixels.durationMaxMS",
                 PixelSmoothScrollMaxDurationMs, RelaxedAtomicInt32, 150);
-VARCACHE_PREF("general.smoothScroll.pixels.durationMinMS",
+VARCACHE_PREF(Live, "general.smoothScroll.pixels.durationMinMS",
                 PixelSmoothScrollMinDurationMs, RelaxedAtomicInt32, 150);
-VARCACHE_PREF("general.smoothScroll.stopDecelerationWeighting",
+VARCACHE_PREF(Live, "general.smoothScroll.stopDecelerationWeighting",
                 SmoothScrollStopDecelerationWeighting, AtomicFloat, 0.4f);
 
-VARCACHE_PREF("general.smoothScroll.msdPhysics.enabled",
+VARCACHE_PREF(Live, "general.smoothScroll.msdPhysics.enabled",
                 SmoothScrollMSDPhysicsEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS",
+VARCACHE_PREF(Live, "general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS",
                 SmoothScrollMSDPhysicsContinuousMotionMaxDeltaMS, RelaxedAtomicInt32, 120);
-VARCACHE_PREF("general.smoothScroll.msdPhysics.motionBeginSpringConstant",
+VARCACHE_PREF(Live, "general.smoothScroll.msdPhysics.motionBeginSpringConstant",
                 SmoothScrollMSDPhysicsMotionBeginSpringConstant, RelaxedAtomicInt32, 1250);
-VARCACHE_PREF("general.smoothScroll.msdPhysics.slowdownMinDeltaMS",
+VARCACHE_PREF(Live, "general.smoothScroll.msdPhysics.slowdownMinDeltaMS",
                 SmoothScrollMSDPhysicsSlowdownMinDeltaMS, RelaxedAtomicInt32, 12);
-VARCACHE_PREF("general.smoothScroll.msdPhysics.slowdownMinDeltaRatio",
+VARCACHE_PREF(Live, "general.smoothScroll.msdPhysics.slowdownMinDeltaRatio",
                 SmoothScrollMSDPhysicsSlowdownMinDeltaRatio, AtomicFloat, 1.3f);
-VARCACHE_PREF("general.smoothScroll.msdPhysics.slowdownSpringConstant",
+VARCACHE_PREF(Live, "general.smoothScroll.msdPhysics.slowdownSpringConstant",
                 SmoothScrollMSDPhysicsSlowdownSpringConstant, RelaxedAtomicInt32, 2000);
-VARCACHE_PREF("general.smoothScroll.msdPhysics.regularSpringConstant",
+VARCACHE_PREF(Live, "general.smoothScroll.msdPhysics.regularSpringConstant",
                 SmoothScrollMSDPhysicsRegularSpringConstant, RelaxedAtomicInt32, 1000);
 
 #if defined(MOZ_WIDGET_ANDROID)
   // Overrides the glClear color used when the surface origin is not (0, 0)
   // Used for drawing a border around the content.
-VARCACHE_PREF("gfx.compositor.override.clear-color.r", CompositorOverrideClearColorR, AtomicFloat, 0.0f);
-VARCACHE_PREF("gfx.compositor.override.clear-color.g", CompositorOverrideClearColorG, AtomicFloat, 0.0f);
-VARCACHE_PREF("gfx.compositor.override.clear-color.b", CompositorOverrideClearColorB, AtomicFloat, 0.0f);
-VARCACHE_PREF("gfx.compositor.override.clear-color.a", CompositorOverrideClearColorA, AtomicFloat, 0.0f);
+VARCACHE_PREF(Live, "gfx.compositor.override.clear-color.r", CompositorOverrideClearColorR, AtomicFloat, 0.0f);
+VARCACHE_PREF(Live, "gfx.compositor.override.clear-color.g", CompositorOverrideClearColorG, AtomicFloat, 0.0f);
+VARCACHE_PREF(Live, "gfx.compositor.override.clear-color.b", CompositorOverrideClearColorB, AtomicFloat, 0.0f);
+VARCACHE_PREF(Live, "gfx.compositor.override.clear-color.a", CompositorOverrideClearColorA, AtomicFloat, 0.0f);
 #endif // defined(MOZ_WIDGET_ANDROID)
-VARCACHE_PREF("gfx.compositor.clearstate",             CompositorClearState, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.compositor.glcontext.opaque",       CompositorGLContextOpaque, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.compositor.clearstate",             CompositorClearState, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.compositor.glcontext.opaque",       CompositorGLContextOpaque, RelaxedAtomicBool, false);
   // 0x7fff is the maximum supported xlib surface size and is more than enough for canvases.
-VARCACHE_PREF("gfx.canvas.max-size",                   MaxCanvasSize, RelaxedAtomicInt32, 0x7fff);
-
-VARCACHE_PREF("gfx.color_management.enablev4",         CMSEnableV4, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.color_management.mode",             CMSMode, RelaxedAtomicInt32,-1);
+VARCACHE_PREF(Live, "gfx.canvas.max-size",                   MaxCanvasSize, RelaxedAtomicInt32, 0x7fff);
+
+VARCACHE_PREF(Live, "gfx.color_management.enablev4",         CMSEnableV4, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.color_management.mode",             CMSMode, RelaxedAtomicInt32,-1);
   // The zero default here should match QCMS_INTENT_DEFAULT from qcms.h
-VARCACHE_PREF("gfx.color_management.rendering_intent", CMSRenderingIntent, RelaxedAtomicInt32, 0);
-VARCACHE_PREF("gfx.content.always-paint",              AlwaysPaint, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.color_management.rendering_intent", CMSRenderingIntent, RelaxedAtomicInt32, 0);
+VARCACHE_PREF(Live, "gfx.content.always-paint",              AlwaysPaint, RelaxedAtomicBool, false);
   // Size in megabytes
-VARCACHE_PREF("gfx.direct2d.destroy-dt-on-paintthread",Direct2DDestroyDTOnPaintThread, RelaxedAtomicBool, true);
-VARCACHE_PREF("gfx.direct3d11.reuse-decoder-device",   Direct3D11ReuseDecoderDevice, RelaxedAtomicInt32, -1);
-VARCACHE_PREF("gfx.direct3d11.allow-keyed-mutex",      Direct3D11AllowKeyedMutex, RelaxedAtomicBool, true);
-VARCACHE_PREF("gfx.direct3d11.use-double-buffering",   Direct3D11UseDoubleBuffering, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.downloadable_fonts.keep_color_bitmaps", KeepColorBitmaps, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.downloadable_fonts.validate_variation_tables", ValidateVariationTables, RelaxedAtomicBool, true);
-VARCACHE_PREF("gfx.downloadable_fonts.otl_validation", ValidateOTLTables, RelaxedAtomicBool, true);
-VARCACHE_PREF("gfx.draw-color-bars",                   CompositorDrawColorBars, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.layerscope.enabled",                LayerScopeEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.layerscope.port",                   LayerScopePort, RelaxedAtomicInt32, 23456);
-VARCACHE_PREF("gfx.logging.painted-pixel-count.enabled",GfxLoggingPaintedPixelCountEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.partialpresent.force",              PartialPresent, RelaxedAtomicInt32, 0);
-VARCACHE_PREF("gfx.perf-warnings.enabled",             PerfWarnings, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.testing.device-reset",              DeviceResetForTesting, RelaxedAtomicInt32, 0);
-VARCACHE_PREF("gfx.testing.device-fail",               DeviceFailForTesting, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.ycbcr.accurate-conversion",         YCbCrAccurateConversion, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.direct2d.destroy-dt-on-paintthread",Direct2DDestroyDTOnPaintThread, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "gfx.direct3d11.reuse-decoder-device",   Direct3D11ReuseDecoderDevice, RelaxedAtomicInt32, -1);
+VARCACHE_PREF(Live, "gfx.direct3d11.allow-keyed-mutex",      Direct3D11AllowKeyedMutex, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "gfx.direct3d11.use-double-buffering",   Direct3D11UseDoubleBuffering, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.downloadable_fonts.keep_color_bitmaps", KeepColorBitmaps, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.downloadable_fonts.validate_variation_tables", ValidateVariationTables, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "gfx.downloadable_fonts.otl_validation", ValidateOTLTables, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "gfx.draw-color-bars",                   CompositorDrawColorBars, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.layerscope.enabled",                LayerScopeEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.layerscope.port",                   LayerScopePort, RelaxedAtomicInt32, 23456);
+VARCACHE_PREF(Live, "gfx.logging.painted-pixel-count.enabled",GfxLoggingPaintedPixelCountEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.partialpresent.force",              PartialPresent, RelaxedAtomicInt32, 0);
+VARCACHE_PREF(Live, "gfx.perf-warnings.enabled",             PerfWarnings, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.testing.device-reset",              DeviceResetForTesting, RelaxedAtomicInt32, 0);
+VARCACHE_PREF(Live, "gfx.testing.device-fail",               DeviceFailForTesting, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.ycbcr.accurate-conversion",         YCbCrAccurateConversion, RelaxedAtomicBool, false);
 
   // Disable surface sharing due to issues with compatible FBConfigs on
   // NVIDIA drivers as described in bug 1193015.
-VARCACHE_PREF("gfx.use-glx-texture-from-pixmap",       UseGLXTextureFromPixmap, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.vsync.collect-scroll-transforms",   CollectScrollTransforms, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("gfx.webrender.blob-images",             WebRenderBlobImages, RelaxedAtomicBool, true);
-VARCACHE_PREF("gfx.webrender.blob.invalidation",       WebRenderBlobInvalidation, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.webrender.blob.paint-flashing",     WebRenderBlobPaintFlashing, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.webrender.dl.dump-parent",          WebRenderDLDumpParent, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.webrender.dl.dump-content",         WebRenderDLDumpContent, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.webrender.highlight-painted-layers",WebRenderHighlightPaintedLayers, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.webrender.late-scenebuild-threshold", WebRenderLateSceneBuildThreshold, RelaxedAtomicInt32, 4);
-VARCACHE_PREF("gfx.webrender.max-filter-ops-per-chain", WebRenderMaxFilterOpsPerChain, RelaxedAtomicUint32, 64);
-VARCACHE_PREF("gfx.webrender.picture-caching",         WebRenderPictureCaching, RelaxedAtomicBool, false);
-VARCACHE_PREF("gfx.webrender.start-debug-server",      WebRenderStartDebugServer, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("gl.allow-high-power",                   GLAllowHighPower, RelaxedAtomicBool, true);
-VARCACHE_PREF("gl.ignore-dx-interop2-blacklist",       IgnoreDXInterop2Blacklist, RelaxedAtomicBool, false);
-VARCACHE_PREF("gl.msaa-level",                         MSAALevel, RelaxedAtomicUint32, 2);
+VARCACHE_PREF(Live, "gfx.use-glx-texture-from-pixmap",       UseGLXTextureFromPixmap, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.vsync.collect-scroll-transforms",   CollectScrollTransforms, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "gfx.webrender.blob-images",             WebRenderBlobImages, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "gfx.webrender.blob.invalidation",       WebRenderBlobInvalidation, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.webrender.blob.paint-flashing",     WebRenderBlobPaintFlashing, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.webrender.dl.dump-parent",          WebRenderDLDumpParent, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.webrender.dl.dump-content",         WebRenderDLDumpContent, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.webrender.highlight-painted-layers",WebRenderHighlightPaintedLayers, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.webrender.late-scenebuild-threshold", WebRenderLateSceneBuildThreshold, RelaxedAtomicInt32, 4);
+VARCACHE_PREF(Live, "gfx.webrender.max-filter-ops-per-chain", WebRenderMaxFilterOpsPerChain, RelaxedAtomicUint32, 64);
+VARCACHE_PREF(Live, "gfx.webrender.picture-caching",         WebRenderPictureCaching, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gfx.webrender.start-debug-server",      WebRenderStartDebugServer, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "gl.allow-high-power",                   GLAllowHighPower, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "gl.ignore-dx-interop2-blacklist",       IgnoreDXInterop2Blacklist, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gl.msaa-level",                         MSAALevel, RelaxedAtomicUint32, 2);
 #if defined(XP_MACOSX)
-VARCACHE_PREF("gl.multithreaded",                      GLMultithreaded, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gl.multithreaded",                      GLMultithreaded, RelaxedAtomicBool, false);
 #endif
-VARCACHE_PREF("gl.require-hardware",                   RequireHardwareGL, RelaxedAtomicBool, false);
-VARCACHE_PREF("gl.use-tls-is-current",                 UseTLSIsCurrent, RelaxedAtomicInt32, 0);
-
-VARCACHE_PREF("image.animated.decode-on-demand.threshold-kb", ImageAnimatedDecodeOnDemandThresholdKB, RelaxedAtomicUint32, 20480);
-VARCACHE_PREF("image.animated.decode-on-demand.batch-size", ImageAnimatedDecodeOnDemandBatchSize, RelaxedAtomicUint32, 6);
-VARCACHE_PREF("image.animated.decode-on-demand.recycle", ImageAnimatedDecodeOnDemandRecycle, RelaxedAtomicBool, false);
-VARCACHE_PREF("image.animated.resume-from-last-displayed", ImageAnimatedResumeFromLastDisplayed, RelaxedAtomicBool, false);
-VARCACHE_PREF("image.cache.factor2.threshold-surfaces", ImageCacheFactor2ThresholdSurfaces, RelaxedAtomicInt32, -1);
-VARCACHE_PREF("image.cache.max-rasterized-svg-threshold-kb", ImageCacheMaxRasterizedSVGThresholdKB, RelaxedAtomicInt32, 90*1024);
-VARCACHE_PREF("image.decode-immediately.enabled",      ImageDecodeImmediatelyEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("image.downscale-during-decode.enabled", ImageDownscaleDuringDecodeEnabled, RelaxedAtomicBool, true);
-VARCACHE_PREF("image.infer-src-animation.threshold-ms", ImageInferSrcAnimationThresholdMS, RelaxedAtomicUint32, 2000);
-VARCACHE_PREF("image.layout_network_priority",         ImageLayoutNetworkPriority, RelaxedAtomicBool, true);
-VARCACHE_PREF("image.mem.discardable",                 ImageMemDiscardable, RelaxedAtomicBool, false);
-VARCACHE_PREF("image.mem.animated.use_heap",           ImageMemAnimatedUseHeap, RelaxedAtomicBool, false);
-VARCACHE_PREF("image.mem.debug-reporting",             ImageMemDebugReporting, RelaxedAtomicBool, false);
-VARCACHE_PREF("image.mem.shared",                      ImageMemShared, RelaxedAtomicBool, true);
-VARCACHE_PREF("image.mem.volatile.min_threshold_kb",   ImageMemVolatileMinThresholdKB, RelaxedAtomicInt32, -1);
-VARCACHE_PREF("image.webp.enabled",                    ImageWebPEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gl.require-hardware",                   RequireHardwareGL, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "gl.use-tls-is-current",                 UseTLSIsCurrent, RelaxedAtomicInt32, 0);
+
+VARCACHE_PREF(Live, "image.animated.decode-on-demand.threshold-kb", ImageAnimatedDecodeOnDemandThresholdKB, RelaxedAtomicUint32, 20480);
+VARCACHE_PREF(Live, "image.animated.decode-on-demand.batch-size", ImageAnimatedDecodeOnDemandBatchSize, RelaxedAtomicUint32, 6);
+VARCACHE_PREF(Live, "image.animated.decode-on-demand.recycle", ImageAnimatedDecodeOnDemandRecycle, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "image.animated.resume-from-last-displayed", ImageAnimatedResumeFromLastDisplayed, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "image.cache.factor2.threshold-surfaces", ImageCacheFactor2ThresholdSurfaces, RelaxedAtomicInt32, -1);
+VARCACHE_PREF(Live, "image.cache.max-rasterized-svg-threshold-kb", ImageCacheMaxRasterizedSVGThresholdKB, RelaxedAtomicInt32, 90*1024);
+VARCACHE_PREF(Live, "image.decode-immediately.enabled",      ImageDecodeImmediatelyEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "image.downscale-during-decode.enabled", ImageDownscaleDuringDecodeEnabled, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "image.infer-src-animation.threshold-ms", ImageInferSrcAnimationThresholdMS, RelaxedAtomicUint32, 2000);
+VARCACHE_PREF(Live, "image.layout_network_priority",         ImageLayoutNetworkPriority, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "image.mem.discardable",                 ImageMemDiscardable, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "image.mem.animated.use_heap",           ImageMemAnimatedUseHeap, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "image.mem.debug-reporting",             ImageMemDebugReporting, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "image.mem.shared",                      ImageMemShared, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "image.mem.volatile.min_threshold_kb",   ImageMemVolatileMinThresholdKB, RelaxedAtomicInt32, -1);
+VARCACHE_PREF(Live, "image.webp.enabled",                    ImageWebPEnabled, RelaxedAtomicBool, false);
 
   // Instead, use gfxConfig::IsEnabled(Feature::HW_COMPOSITING).
 
-VARCACHE_PREF("layers.acceleration.draw-fps",          LayersDrawFPS, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.acceleration.draw-fps.print-histogram",  FPSPrintHistogram, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.acceleration.draw-fps.write-to-file", WriteFPSToFile, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.advanced.basic-layer.enabled",          LayersAdvancedBasicLayerEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.bench.enabled",                  LayersBenchEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.child-process-shutdown",         ChildProcessShutdown, RelaxedAtomicBool, true);
-VARCACHE_PREF("layers.deaa.enabled",                   LayersDEAAEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.draw-bigimage-borders",          DrawBigImageBorders, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.draw-borders",                   DrawLayerBorders, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.draw-tile-borders",              DrawTileBorders, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.draw-layer-info",                DrawLayerInfo, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.dump",                           LayersDump, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.dump-texture",                   LayersDumpTexture, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.acceleration.draw-fps",          LayersDrawFPS, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.acceleration.draw-fps.print-histogram",  FPSPrintHistogram, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.acceleration.draw-fps.write-to-file", WriteFPSToFile, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.advanced.basic-layer.enabled",          LayersAdvancedBasicLayerEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.bench.enabled",                  LayersBenchEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.child-process-shutdown",         ChildProcessShutdown, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "layers.deaa.enabled",                   LayersDEAAEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.draw-bigimage-borders",          DrawBigImageBorders, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.draw-borders",                   DrawLayerBorders, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.draw-tile-borders",              DrawTileBorders, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.draw-layer-info",                DrawLayerInfo, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.dump",                           LayersDump, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.dump-texture",                   LayersDumpTexture, RelaxedAtomicBool, false);
 #ifdef MOZ_DUMP_PAINTING
-VARCACHE_PREF("layers.dump-client-layers",             DumpClientLayers, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.dump-decision",                  LayersDumpDecision, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.dump-host-layers",               DumpHostLayers, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.dump-client-layers",             DumpClientLayers, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.dump-decision",                  LayersDumpDecision, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.dump-host-layers",               DumpHostLayers, RelaxedAtomicBool, false);
 #endif
 
   // 0 is "no change" for contrast, positive values increase it, negative values
   // decrease it until we hit mid gray at -1 contrast, after that it gets weird.
-VARCACHE_PREF("layers.effect.contrast",                LayersEffectContrast, AtomicFloat, 0.0f);
-VARCACHE_PREF("layers.effect.grayscale",               LayersEffectGrayscale, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.effect.invert",                  LayersEffectInvert, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.flash-borders",                  FlashLayerBorders, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.gpu-process.max_restarts",       GPUProcessMaxRestarts, RelaxedAtomicInt32, 1);
+VARCACHE_PREF(Live, "layers.effect.contrast",                LayersEffectContrast, AtomicFloat, 0.0f);
+VARCACHE_PREF(Live, "layers.effect.grayscale",               LayersEffectGrayscale, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.effect.invert",                  LayersEffectInvert, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.flash-borders",                  FlashLayerBorders, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.gpu-process.max_restarts",       GPUProcessMaxRestarts, RelaxedAtomicInt32, 1);
   // Note: This pref will only be used if it is less than layers.gpu-process.max_restarts.
-VARCACHE_PREF("layers.gpu-process.max_restarts_with_decoder", GPUProcessMaxRestartsWithDecoder, RelaxedAtomicInt32, 0);
-VARCACHE_PREF("layers.low-precision-buffer",           UseLowPrecisionBuffer, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.low-precision-opacity",          LowPrecisionOpacity, AtomicFloat, 1.0f);
-VARCACHE_PREF("layers.low-precision-resolution",       LowPrecisionResolution, AtomicFloat, 0.25f);
-VARCACHE_PREF("layers.max-active",                     MaxActiveLayers, RelaxedAtomicInt32, -1);
-VARCACHE_PREF("layers.mlgpu.enable-invalidation",      AdvancedLayersUseInvalidation, RelaxedAtomicBool, true);
-VARCACHE_PREF("layers.offmainthreadcomposition.frame-rate", LayersCompositionFrameRate, RelaxedAtomicInt32,-1);
-VARCACHE_PREF("layers.omtp.dump-capture",              LayersOMTPDumpCapture, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.omtp.release-capture-on-main-thread", LayersOMTPReleaseCaptureOnMainThread, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.orientation.sync.timeout",       OrientationSyncMillis, RelaxedAtomicUint32, (uint32_t)0);
-VARCACHE_PREF("layers.progressive-paint",              ProgressivePaint, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.shared-buffer-provider.enabled", PersistentBufferProviderSharedEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.single-tile.enabled",            LayersSingleTileEnabled, RelaxedAtomicBool, true);
-VARCACHE_PREF("layers.force-synchronous-resize",       LayersForceSynchronousResize, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "layers.gpu-process.max_restarts_with_decoder", GPUProcessMaxRestartsWithDecoder, RelaxedAtomicInt32, 0);
+VARCACHE_PREF(Live, "layers.low-precision-buffer",           UseLowPrecisionBuffer, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.low-precision-opacity",          LowPrecisionOpacity, AtomicFloat, 1.0f);
+VARCACHE_PREF(Live, "layers.low-precision-resolution",       LowPrecisionResolution, AtomicFloat, 0.25f);
+VARCACHE_PREF(Live, "layers.max-active",                     MaxActiveLayers, RelaxedAtomicInt32, -1);
+VARCACHE_PREF(Live, "layers.mlgpu.enable-invalidation",      AdvancedLayersUseInvalidation, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "layers.offmainthreadcomposition.frame-rate", LayersCompositionFrameRate, RelaxedAtomicInt32,-1);
+VARCACHE_PREF(Live, "layers.omtp.dump-capture",              LayersOMTPDumpCapture, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.omtp.release-capture-on-main-thread", LayersOMTPReleaseCaptureOnMainThread, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.orientation.sync.timeout",       OrientationSyncMillis, RelaxedAtomicUint32, (uint32_t)0);
+VARCACHE_PREF(Live, "layers.progressive-paint",              ProgressivePaint, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.shared-buffer-provider.enabled", PersistentBufferProviderSharedEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.single-tile.enabled",            LayersSingleTileEnabled, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "layers.force-synchronous-resize",       LayersForceSynchronousResize, RelaxedAtomicBool, true);
 
   // We allow for configurable and rectangular tile size to avoid wasting memory on devices whose
   // screen size does not align nicely to the default tile size. Although layers can be any size,
   // they are often the same size as the screen, especially for width.
-VARCACHE_PREF("layers.tiles.retain-back-buffer",       LayersTileRetainBackBuffer, RelaxedAtomicBool, true);
-VARCACHE_PREF("layers.tiles.fade-in.enabled",          LayerTileFadeInEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.tiles.fade-in.duration-ms",      LayerTileFadeInDuration, RelaxedAtomicUint32, 250);
-VARCACHE_PREF("layers.transaction.warning-ms",         LayerTransactionWarning, RelaxedAtomicUint32, 200);
-VARCACHE_PREF("layers.draw-mask-debug",                DrawMaskLayer, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("layers.geometry.opengl.enabled",        OGLLayerGeometry, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.geometry.basic.enabled",         BasicLayerGeometry, RelaxedAtomicBool, false);
-VARCACHE_PREF("layers.geometry.d3d11.enabled",         D3D11LayerGeometry, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("layout.animation.prerender.partial", PartiallyPrerenderAnimatedContent, RelaxedAtomicBool, false);
-VARCACHE_PREF("layout.animation.prerender.viewport-ratio-limit-x", AnimationPrerenderViewportRatioLimitX, AtomicFloat, 1.125f);
-VARCACHE_PREF("layout.animation.prerender.viewport-ratio-limit-y", AnimationPrerenderViewportRatioLimitY, AtomicFloat, 1.125f);
-VARCACHE_PREF("layout.animation.prerender.absolute-limit-x", AnimationPrerenderAbsoluteLimitX, RelaxedAtomicUint32, 4096);
-VARCACHE_PREF("layout.animation.prerender.absolute-limit-y", AnimationPrerenderAbsoluteLimitY, RelaxedAtomicUint32, 4096);
-
-VARCACHE_PREF("layout.css.paint-order.enabled",        PaintOrderEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("layout.css.scroll-behavior.damping-ratio", ScrollBehaviorDampingRatio, AtomicFloat, 1.0f);
-VARCACHE_PREF("layout.css.scroll-behavior.enabled",    ScrollBehaviorEnabled, RelaxedAtomicBool, true);
-VARCACHE_PREF("layout.css.scroll-behavior.spring-constant", ScrollBehaviorSpringConstant, AtomicFloat, 250.0f);
-VARCACHE_PREF("layout.css.scroll-snap.prediction-max-velocity", ScrollSnapPredictionMaxVelocity, RelaxedAtomicInt32, 2000);
-VARCACHE_PREF("layout.css.scroll-snap.prediction-sensitivity", ScrollSnapPredictionSensitivity, AtomicFloat, 0.750f);
-VARCACHE_PREF("layout.css.scroll-snap.proximity-threshold", ScrollSnapProximityThreshold, RelaxedAtomicInt32, 200);
-VARCACHE_PREF("layout.css.touch_action.enabled",       TouchActionEnabled, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("layout.display-list.build-twice",       LayoutDisplayListBuildTwice, RelaxedAtomicBool, false);
-VARCACHE_PREF("layout.display-list.retain",            LayoutRetainDisplayList, RelaxedAtomicBool, true);
-VARCACHE_PREF("layout.display-list.retain.chrome",     LayoutRetainDisplayListChrome, RelaxedAtomicBool, false);
-VARCACHE_PREF("layout.display-list.retain.verify",     LayoutVerifyRetainDisplayList, RelaxedAtomicBool, false);
-VARCACHE_PREF("layout.display-list.retain.verify.order", LayoutVerifyRetainDisplayListOrder, RelaxedAtomicBool, false);
-VARCACHE_PREF("layout.display-list.rebuild-frame-limit", LayoutRebuildFrameLimit, RelaxedAtomicUint32, 500);
-VARCACHE_PREF("layout.display-list.dump",              LayoutDumpDisplayList, RelaxedAtomicBool, false);
-VARCACHE_PREF("layout.display-list.dump-content",      LayoutDumpDisplayListContent, RelaxedAtomicBool, false);
-VARCACHE_PREF("layout.display-list.dump-parent",       LayoutDumpDisplayListParent, RelaxedAtomicBool, false);
-VARCACHE_PREF("layout.display-list.show-rebuild-area", LayoutDisplayListShowArea, RelaxedAtomicBool, false);
-VARCACHE_PREF("layout.display-list.flatten-transform", LayoutFlattenTransform, RelaxedAtomicBool, true);
-
-VARCACHE_PREF("layout.min-active-layer-size",          LayoutMinActiveLayerSize, int, 64);
+VARCACHE_PREF(Live, "layers.tiles.retain-back-buffer",       LayersTileRetainBackBuffer, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "layers.tiles.fade-in.enabled",          LayerTileFadeInEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.tiles.fade-in.duration-ms",      LayerTileFadeInDuration, RelaxedAtomicUint32, 250);
+VARCACHE_PREF(Live, "layers.transaction.warning-ms",         LayerTransactionWarning, RelaxedAtomicUint32, 200);
+VARCACHE_PREF(Live, "layers.draw-mask-debug",                DrawMaskLayer, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "layers.geometry.opengl.enabled",        OGLLayerGeometry, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.geometry.basic.enabled",         BasicLayerGeometry, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layers.geometry.d3d11.enabled",         D3D11LayerGeometry, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "layout.animation.prerender.partial", PartiallyPrerenderAnimatedContent, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.animation.prerender.viewport-ratio-limit-x", AnimationPrerenderViewportRatioLimitX, AtomicFloat, 1.125f);
+VARCACHE_PREF(Live, "layout.animation.prerender.viewport-ratio-limit-y", AnimationPrerenderViewportRatioLimitY, AtomicFloat, 1.125f);
+VARCACHE_PREF(Live, "layout.animation.prerender.absolute-limit-x", AnimationPrerenderAbsoluteLimitX, RelaxedAtomicUint32, 4096);
+VARCACHE_PREF(Live, "layout.animation.prerender.absolute-limit-y", AnimationPrerenderAbsoluteLimitY, RelaxedAtomicUint32, 4096);
+
+VARCACHE_PREF(Live, "layout.css.paint-order.enabled",        PaintOrderEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.css.scroll-behavior.damping-ratio", ScrollBehaviorDampingRatio, AtomicFloat, 1.0f);
+VARCACHE_PREF(Live, "layout.css.scroll-behavior.enabled",    ScrollBehaviorEnabled, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "layout.css.scroll-behavior.spring-constant", ScrollBehaviorSpringConstant, AtomicFloat, 250.0f);
+VARCACHE_PREF(Live, "layout.css.scroll-snap.prediction-max-velocity", ScrollSnapPredictionMaxVelocity, RelaxedAtomicInt32, 2000);
+VARCACHE_PREF(Live, "layout.css.scroll-snap.prediction-sensitivity", ScrollSnapPredictionSensitivity, AtomicFloat, 0.750f);
+VARCACHE_PREF(Live, "layout.css.scroll-snap.proximity-threshold", ScrollSnapProximityThreshold, RelaxedAtomicInt32, 200);
+VARCACHE_PREF(Live, "layout.css.touch_action.enabled",       TouchActionEnabled, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "layout.display-list.build-twice",       LayoutDisplayListBuildTwice, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.display-list.retain",            LayoutRetainDisplayList, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "layout.display-list.retain.chrome",     LayoutRetainDisplayListChrome, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.display-list.retain.verify",     LayoutVerifyRetainDisplayList, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.display-list.retain.verify.order", LayoutVerifyRetainDisplayListOrder, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.display-list.rebuild-frame-limit", LayoutRebuildFrameLimit, RelaxedAtomicUint32, 500);
+VARCACHE_PREF(Live, "layout.display-list.dump",              LayoutDumpDisplayList, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.display-list.dump-content",      LayoutDumpDisplayListContent, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.display-list.dump-parent",       LayoutDumpDisplayListParent, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.display-list.show-rebuild-area", LayoutDisplayListShowArea, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.display-list.flatten-transform", LayoutFlattenTransform, RelaxedAtomicBool, true);
+
+VARCACHE_PREF(Live, "layout.min-active-layer-size",          LayoutMinActiveLayerSize, int, 64);
 
 // This and code dependent on it should be removed once containerless scrolling looks stable.
-VARCACHE_PREF("layout.scroll.root-frame-containers",   LayoutUseContainersForRootFrames,RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.scroll.root-frame-containers",   LayoutUseContainersForRootFrames,RelaxedAtomicBool, false);
 // This pref is to be set by test code only.
-VARCACHE_PREF("layout.scrollbars.always-layerize-track", AlwaysLayerizeScrollbarTrackTestOnly, RelaxedAtomicBool, false);
-VARCACHE_PREF("layout.smaller-painted-layers",         LayoutSmallerPaintedLayers, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.scrollbars.always-layerize-track", AlwaysLayerizeScrollbarTrackTestOnly, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "layout.smaller-painted-layers",         LayoutSmallerPaintedLayers, RelaxedAtomicBool, false);
 
 #ifdef XP_WIN
-VARCACHE_PREF("media.wmf.dxva.d3d11.enabled", PDMWMFAllowD3D11, RelaxedAtomicBool, true);
-VARCACHE_PREF("media.wmf.dxva.max-videos", PDMWMFMaxDXVAVideos, RelaxedAtomicUint32, 8);
-VARCACHE_PREF("media.wmf.use-nv12-format", PDMWMFUseNV12Format, RelaxedAtomicBool, true);
-VARCACHE_PREF("media.wmf.force.allow-p010-format", PDMWMFForceAllowP010Format, RelaxedAtomicBool, false);
-VARCACHE_PREF("media.wmf.low-latency.enabled", PDMWMFLowLatencyEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("media.wmf.low-latency.force-disabled", PDMWMFLowLatencyForceDisabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("media.wmf.skip-blacklist", PDMWMFSkipBlacklist, RelaxedAtomicBool, false);
-VARCACHE_PREF("media.wmf.deblacklisting-for-telemetry-in-gpu-process", PDMWMFDeblacklistingForTelemetryInGPUProcess, RelaxedAtomicBool, false);
-VARCACHE_PREF("media.wmf.amd.highres.enabled", PDMWMFAMDHighResEnabled, RelaxedAtomicBool, true);
-VARCACHE_PREF("media.wmf.allow-unsupported-resolutions", PDMWMFAllowUnsupportedResolutions, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "media.wmf.dxva.d3d11.enabled", PDMWMFAllowD3D11, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "media.wmf.dxva.max-videos", PDMWMFMaxDXVAVideos, RelaxedAtomicUint32, 8);
+VARCACHE_PREF(Live, "media.wmf.use-nv12-format", PDMWMFUseNV12Format, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "media.wmf.force.allow-p010-format", PDMWMFForceAllowP010Format, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "media.wmf.low-latency.enabled", PDMWMFLowLatencyEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "media.wmf.low-latency.force-disabled", PDMWMFLowLatencyForceDisabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "media.wmf.skip-blacklist", PDMWMFSkipBlacklist, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "media.wmf.deblacklisting-for-telemetry-in-gpu-process", PDMWMFDeblacklistingForTelemetryInGPUProcess, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "media.wmf.amd.highres.enabled", PDMWMFAMDHighResEnabled, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "media.wmf.allow-unsupported-resolutions", PDMWMFAllowUnsupportedResolutions, RelaxedAtomicBool, false);
 #endif
 
   // These affect how line scrolls from wheel events will be accelerated.
-VARCACHE_PREF("mousewheel.acceleration.factor",        MouseWheelAccelerationFactor, RelaxedAtomicInt32, -1);
-VARCACHE_PREF("mousewheel.acceleration.start",         MouseWheelAccelerationStart, RelaxedAtomicInt32, -1);
+VARCACHE_PREF(Live, "mousewheel.acceleration.factor",        MouseWheelAccelerationFactor, RelaxedAtomicInt32, -1);
+VARCACHE_PREF(Live, "mousewheel.acceleration.start",         MouseWheelAccelerationStart, RelaxedAtomicInt32, -1);
 
   // This affects whether events will be routed through APZ or not.
-VARCACHE_PREF("mousewheel.system_scroll_override_on_root_content.enabled",
+VARCACHE_PREF(Live, "mousewheel.system_scroll_override_on_root_content.enabled",
                                                                MouseWheelHasRootScrollDeltaOverride, RelaxedAtomicBool, false);
-VARCACHE_PREF("mousewheel.system_scroll_override_on_root_content.horizontal.factor",
+VARCACHE_PREF(Live, "mousewheel.system_scroll_override_on_root_content.horizontal.factor",
                                                                MouseWheelRootScrollHorizontalFactor, RelaxedAtomicInt32, 0);
-VARCACHE_PREF("mousewheel.system_scroll_override_on_root_content.vertical.factor",
+VARCACHE_PREF(Live, "mousewheel.system_scroll_override_on_root_content.vertical.factor",
                                                                MouseWheelRootScrollVerticalFactor, RelaxedAtomicInt32, 0);
-VARCACHE_PREF("mousewheel.transaction.ignoremovedelay",MouseWheelIgnoreMoveDelayMs, RelaxedAtomicInt32, (int32_t)100);
-VARCACHE_PREF("mousewheel.transaction.timeout",        MouseWheelTransactionTimeoutMs, RelaxedAtomicInt32, (int32_t)1500);
-
-VARCACHE_PREF("nglayout.debug.widget_update_flashing", WidgetUpdateFlashing, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("print.font-variations-as-paths",        PrintFontVariationsAsPaths, RelaxedAtomicBool, true);
-
-VARCACHE_PREF("privacy.resistFingerprinting",          ResistFingerprinting, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("test.events.async.enabled",             TestEventsAsyncEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("test.mousescroll",                      MouseScrollTestingEnabled, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("toolkit.scrollbox.horizontalScrollDistance", ToolkitHorizontalScrollDistance, RelaxedAtomicInt32, 5);
-VARCACHE_PREF("toolkit.scrollbox.verticalScrollDistance",   ToolkitVerticalScrollDistance, RelaxedAtomicInt32, 3);
-
-VARCACHE_PREF("ui.click_hold_context_menus.delay",     UiClickHoldContextMenusDelay, RelaxedAtomicInt32, 500);
+VARCACHE_PREF(Live, "mousewheel.transaction.ignoremovedelay",MouseWheelIgnoreMoveDelayMs, RelaxedAtomicInt32, (int32_t)100);
+VARCACHE_PREF(Live, "mousewheel.transaction.timeout",        MouseWheelTransactionTimeoutMs, RelaxedAtomicInt32, (int32_t)1500);
+
+VARCACHE_PREF(Live, "nglayout.debug.widget_update_flashing", WidgetUpdateFlashing, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "print.font-variations-as-paths",        PrintFontVariationsAsPaths, RelaxedAtomicBool, true);
+
+VARCACHE_PREF(Live, "privacy.resistFingerprinting",          ResistFingerprinting, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "test.events.async.enabled",             TestEventsAsyncEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "test.mousescroll",                      MouseScrollTestingEnabled, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "toolkit.scrollbox.horizontalScrollDistance", ToolkitHorizontalScrollDistance, RelaxedAtomicInt32, 5);
+VARCACHE_PREF(Live, "toolkit.scrollbox.verticalScrollDistance",   ToolkitVerticalScrollDistance, RelaxedAtomicInt32, 3);
+
+VARCACHE_PREF(Live, "ui.click_hold_context_menus.delay",     UiClickHoldContextMenusDelay, RelaxedAtomicInt32, 500);
 
   // WebGL (for pref access from Worker threads)
-VARCACHE_PREF("webgl.1.allow-core-profiles",           WebGL1AllowCoreProfile, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("webgl.all-angle-options",               WebGLAllANGLEOptions, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.angle.force-d3d11",               WebGLANGLEForceD3D11, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.angle.try-d3d11",                 WebGLANGLETryD3D11, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.angle.force-warp",                WebGLANGLEForceWARP, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.can-lose-context-in-foreground",  WebGLCanLoseContextInForeground, RelaxedAtomicBool, true);
-VARCACHE_PREF("webgl.default-low-power",               WebGLDefaultLowPower, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.default-no-alpha",                WebGLDefaultNoAlpha, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.disable-angle",                   WebGLDisableANGLE, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.disable-wgl",                     WebGLDisableWGL, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.disable-extensions",              WebGLDisableExtensions, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.dxgl.enabled",                    WebGLDXGLEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.dxgl.needs-finish",               WebGLDXGLNeedsFinish, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("webgl.disable-fail-if-major-performance-caveat",
+VARCACHE_PREF(Live, "webgl.1.allow-core-profiles",           WebGL1AllowCoreProfile, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "webgl.all-angle-options",               WebGLAllANGLEOptions, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.angle.force-d3d11",               WebGLANGLEForceD3D11, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.angle.try-d3d11",                 WebGLANGLETryD3D11, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.angle.force-warp",                WebGLANGLEForceWARP, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.can-lose-context-in-foreground",  WebGLCanLoseContextInForeground, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "webgl.default-low-power",               WebGLDefaultLowPower, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.default-no-alpha",                WebGLDefaultNoAlpha, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.disable-angle",                   WebGLDisableANGLE, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.disable-wgl",                     WebGLDisableWGL, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.disable-extensions",              WebGLDisableExtensions, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.dxgl.enabled",                    WebGLDXGLEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.dxgl.needs-finish",               WebGLDXGLNeedsFinish, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "webgl.disable-fail-if-major-performance-caveat",
                 WebGLDisableFailIfMajorPerformanceCaveat, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.disable-DOM-blit-uploads",
+VARCACHE_PREF(Live, "webgl.disable-DOM-blit-uploads",
                 WebGLDisableDOMBlitUploads, RelaxedAtomicBool, false);
 
-VARCACHE_PREF("webgl.disabled",                        WebGLDisabled, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("webgl.enable-draft-extensions",         WebGLDraftExtensionsEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.enable-privileged-extensions",    WebGLPrivilegedExtensionsEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.enable-surface-texture",          WebGLSurfaceTextureEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.enable-webgl2",                   WebGL2Enabled, RelaxedAtomicBool, true);
-VARCACHE_PREF("webgl.force-enabled",                   WebGLForceEnabled, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.force-index-validation",          WebGLForceIndexValidation, RelaxedAtomicInt32, 0);
-VARCACHE_PREF("webgl.lose-context-on-memory-pressure", WebGLLoseContextOnMemoryPressure, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.max-contexts",                    WebGLMaxContexts, RelaxedAtomicUint32, 32);
-VARCACHE_PREF("webgl.max-contexts-per-principal",      WebGLMaxContextsPerPrincipal, RelaxedAtomicUint32, 16);
-VARCACHE_PREF("webgl.max-warnings-per-context",        WebGLMaxWarningsPerContext, RelaxedAtomicUint32, 32);
-VARCACHE_PREF("webgl.min_capability_mode",             WebGLMinCapabilityMode, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.msaa-force",                      WebGLForceMSAA, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.msaa-samples",                    WebGLMsaaSamples, RelaxedAtomicUint32, 4);
-VARCACHE_PREF("webgl.prefer-16bpp",                    WebGLPrefer16bpp, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.allow-immediate-queries",         WebGLImmediateQueries, RelaxedAtomicBool, false);
-VARCACHE_PREF("webgl.allow-fb-invalidation",           WebGLFBInvalidation, RelaxedAtomicBool, false);
-
-VARCACHE_PREF("webgl.perf.max-warnings",                    WebGLMaxPerfWarnings, RelaxedAtomicInt32, 0);
-VARCACHE_PREF("webgl.perf.max-acceptable-fb-status-invals", WebGLMaxAcceptableFBStatusInvals, RelaxedAtomicInt32, 0);
-VARCACHE_PREF("webgl.perf.spew-frame-allocs",          WebGLSpewFrameAllocs, RelaxedAtomicBool, true);
-
-VARCACHE_PREF("widget.window-transforms.disabled",     WindowTransformsDisabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.disabled",                        WebGLDisabled, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "webgl.enable-draft-extensions",         WebGLDraftExtensionsEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.enable-privileged-extensions",    WebGLPrivilegedExtensionsEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.enable-surface-texture",          WebGLSurfaceTextureEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.enable-webgl2",                   WebGL2Enabled, RelaxedAtomicBool, true);
+VARCACHE_PREF(Live, "webgl.force-enabled",                   WebGLForceEnabled, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.force-index-validation",          WebGLForceIndexValidation, RelaxedAtomicInt32, 0);
+VARCACHE_PREF(Live, "webgl.lose-context-on-memory-pressure", WebGLLoseContextOnMemoryPressure, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.max-contexts",                    WebGLMaxContexts, RelaxedAtomicUint32, 32);
+VARCACHE_PREF(Live, "webgl.max-contexts-per-principal",      WebGLMaxContextsPerPrincipal, RelaxedAtomicUint32, 16);
+VARCACHE_PREF(Live, "webgl.max-warnings-per-context",        WebGLMaxWarningsPerContext, RelaxedAtomicUint32, 32);
+VARCACHE_PREF(Live, "webgl.min_capability_mode",             WebGLMinCapabilityMode, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.msaa-force",                      WebGLForceMSAA, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.msaa-samples",                    WebGLMsaaSamples, RelaxedAtomicUint32, 4);
+VARCACHE_PREF(Live, "webgl.prefer-16bpp",                    WebGLPrefer16bpp, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.allow-immediate-queries",         WebGLImmediateQueries, RelaxedAtomicBool, false);
+VARCACHE_PREF(Live, "webgl.allow-fb-invalidation",           WebGLFBInvalidation, RelaxedAtomicBool, false);
+
+VARCACHE_PREF(Live, "webgl.perf.max-warnings",                    WebGLMaxPerfWarnings, RelaxedAtomicInt32, 0);
+VARCACHE_PREF(Live, "webgl.perf.max-acceptable-fb-status-invals", WebGLMaxAcceptableFBStatusInvals, RelaxedAtomicInt32, 0);
+VARCACHE_PREF(Live, "webgl.perf.spew-frame-allocs",          WebGLSpewFrameAllocs, RelaxedAtomicBool, true);
+
+VARCACHE_PREF(Live, "widget.window-transforms.disabled",     WindowTransformsDisabled, RelaxedAtomicBool, false);
 //---------------------------------------------------------------------------
-// End of gfxPrefs
+// End of old gfxPrefs
 //---------------------------------------------------------------------------
 
 //---------------------------------------------------------------------------
 // End of prefs
 //---------------------------------------------------------------------------
 
 // clang-format on