bug 1358215 - add MOZ_PHOTON_ANIMATIONS config var/define, default enabled on nightly. r=chmanchester draft
authorTed Mielczarek <ted@mielczarek.org>
Mon, 08 May 2017 16:01:44 -0400
changeset 575559 14b9ace007ab62ff68c35d76e31ee1788b8d66a3
parent 574259 38f862749aed4e9a874182a9019e0671289088b0
child 627958 16f550f4f6070441141c201b3d28e59c4a5d5b02
push id58099
push userbmo:ted@mielczarek.org
push dateWed, 10 May 2017 17:12:21 +0000
reviewerschmanchester
bugs1358215
milestone55.0a1
bug 1358215 - add MOZ_PHOTON_ANIMATIONS config var/define, default enabled on nightly. r=chmanchester MozReview-Commit-ID: JBdo2ppiJOP
build/moz.configure/init.configure
toolkit/moz.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -712,21 +712,25 @@ def milestone(build_env, _):
         is_nightly = True
     elif 'a' not in milestone:
         is_release_or_beta = True
 
     return namespace(version=milestone,
                      is_nightly=is_nightly,
                      is_release_or_beta=is_release_or_beta)
 
+@depends(milestone)
+def is_nightly(milestone):
+    return milestone.is_nightly
+
 set_config('GRE_MILESTONE', delayed_getattr(milestone, 'version'))
-set_config('NIGHTLY_BUILD', delayed_getattr(milestone, 'is_nightly'))
-set_define('NIGHTLY_BUILD', delayed_getattr(milestone, 'is_nightly'))
+set_config('NIGHTLY_BUILD', is_nightly)
+set_define('NIGHTLY_BUILD', is_nightly)
 add_old_configure_assignment('NIGHTLY_BUILD',
-                             delayed_getattr(milestone, 'is_nightly'))
+                             is_nightly)
 set_config('RELEASE_OR_BETA', delayed_getattr(milestone, 'is_release_or_beta'))
 set_define('RELEASE_OR_BETA', delayed_getattr(milestone, 'is_release_or_beta'))
 add_old_configure_assignment('RELEASE_OR_BETA',
                              delayed_getattr(milestone, 'is_release_or_beta'))
 
 # The app update channel is 'default' when not supplied. The value is used in
 # the application's confvars.sh (and is made available to a project specific
 # moz.configure).
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -536,16 +536,28 @@ project_flag('MOZ_SERVICES_SYNC',
 
 project_flag('MOZ_SERVICES_CLOUDSYNC',
              help='Build Services/CloudSync if required')
 
 project_flag('MOZ_ANDROID_HISTORY',
              help='Enable Android History instead of Places',
              set_as_define=True)
 
+option(env='MOZ_PHOTON_ANIMATIONS',
+       help='Enable Photon UI animations',
+       default=is_nightly)
+
+@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)
+
 @depends('MOZ_PLACES', 'MOZ_ANDROID_HISTORY')
 def check_places_and_android_history(places, android_history):
     if places and android_history:
         die('Cannot use MOZ_ANDROID_HISTORY alongside MOZ_PLACES.')
 
 # Permissions system
 # ==============================================================
 option(name='--disable-permissions',