Bug 1357306 - Add MOZ_PHOTON_PREFERENCES build-time flag to help with implementing visual refresh of preferences. r?chmanchester,rickychien
MozReview-Commit-ID: H9vWWeq9d1i
--- 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)