Bug 1380585 - Add MOZ_PHOTON_PREFERENCES build-time flag to help with implementing visual refresh of preferences. r?chmanchester,rickychien draft
authorJared Wein <jwein@mozilla.com>
Wed, 12 Jul 2017 14:25:05 -0400
changeset 610864 29eb5ea968e5b9bc5a742ed016f8fafc8b0ebfca
parent 610649 dece50457378ac4934afe9fb3c2a8054e8894588
child 637972 ab4d8ec2c14307860347f3da2ff897f4b32a9483
push id69017
push userbmo:jaws@mozilla.com
push dateTue, 18 Jul 2017 20:44:12 +0000
reviewerschmanchester, rickychien
bugs1380585
milestone56.0a1
Bug 1380585 - Add MOZ_PHOTON_PREFERENCES build-time flag to help with implementing visual refresh of preferences. r?chmanchester,rickychien MozReview-Commit-ID: H9vWWeq9d1i
toolkit/modules/AppConstants.jsm
toolkit/moz.configure
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -357,16 +357,23 @@ this.AppConstants = Object.freeze({
 
   MOZ_PHOTON_ANIMATIONS:
 #ifdef MOZ_PHOTON_ANIMATIONS
     true,
 #else
     false,
 #endif
 
+  MOZ_PHOTON_PREFERENCES:
+#ifdef MOZ_PHOTON_PREFERENCES
+    true,
+#else
+    false,
+#endif
+
   MOZ_PHOTON_THEME:
 #ifdef MOZ_PHOTON_THEME
     true,
 #else
     false,
 #endif
 
   MOZ_STYLO:
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -509,16 +509,28 @@ option(env='MOZ_PHOTON_ANIMATIONS',
 @depends('MOZ_PHOTON_ANIMATIONS')
 def photon_animations(value):
     if value:
         return bool(value)
 
 set_config('MOZ_PHOTON_ANIMATIONS', photon_animations)
 set_define('MOZ_PHOTON_ANIMATIONS', photon_animations)
 
+option(env='MOZ_PHOTON_PREFERENCES',
+       help='Enable Photon preferences',
+       default=milestone.is_nightly)
+
+@depends('MOZ_PHOTON_PREFERENCES')
+def photon_preferences(value):
+    if value:
+        return bool(value)
+
+set_config('MOZ_PHOTON_PREFERENCES', photon_preferences)
+set_define('MOZ_PHOTON_PREFERENCES', photon_preferences)
+
 option(env='MOZ_PHOTON_THEME',
        help='Enable Photon theme',
        default=milestone.is_nightly)
 
 @depends('MOZ_PHOTON_THEME')
 def photon_theme(value):
     if value:
         return bool(value)