Bug 1357306 - 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 607681 50b7c4e14304b5b788094d1eaead8940d3d73c99
parent 606958 6fec4855b5345eb63fef57089e61829b88f5f4eb
child 637124 b639e87e866a2020223562209629b75a2dea3703
push id68085
push userbmo:jaws@mozilla.com
push dateWed, 12 Jul 2017 18:26:20 +0000
reviewerschmanchester, rickychien
bugs1357306
milestone56.0a1
Bug 1357306 - Add MOZ_PHOTON_PREFERENCES build-time flag to help with implementing visual refresh of preferences. r?chmanchester,rickychien MozReview-Commit-ID: H9vWWeq9d1i
browser/themes/shared/incontentprefs/preferences.inc.css
toolkit/modules/AppConstants.jsm
toolkit/moz.configure
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -668,8 +668,13 @@ menulist[indicator=true] > menupopup men
   width: 8px;
   height: 10px;
   margin: 0;
 }
 
 menulist[indicator=true] > menupopup menuitem[indicator=true]:not([image]) > .menu-iconic-left > .menu-iconic-icon:-moz-locale-dir(rtl) {
   transform: scaleX(-1);
 }
+
+%ifdef MOZ_PHOTON_PREFERENCES
+/* Changes to CSS for photon visual refresh would
+   go inside of these ifdefs. */
+%endif
--- 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)