Bug 1380585 - Add MOZ_PHOTON_PREFERENCES build-time flag to help with implementing visual refresh of preferences. r=chmanchester,rickychien
authorJared Wein <jwein@mozilla.com>
Wed, 12 Jul 2017 14:25:05 -0400
changeset 611681 e79bfc74d1495dc1ce78d5a2791169ee6aabfaef
parent 611680 5539c828b4d743114656bcc9bdfe6f795861c872
child 611682 8c1975262e1adf09015817e39237c5f71cbef269
push id69287
push userCallek@gmail.com
push dateThu, 20 Jul 2017 01:11:37 +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)