Bug 1253078 - Switch MOZ_STYLO environmental variable to MOZ_DISABLE_STYLO. r=dholbert
authorBobby Holley <bobbyholley@gmail.com>
Wed, 02 Mar 2016 15:01:01 -0800
changeset 322896 1a1d1594492d7bfb40c961f0fe86c966809ab1c2
parent 322895 65a86f0f0e9053f159ae63b2782dce51bd37e8b0
child 322897 3fd1ae10e2c81631325b0886452c115fc297d17a
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1253078
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1253078 - Switch MOZ_STYLO environmental variable to MOZ_DISABLE_STYLO. r=dholbert
layout/base/nsPresContext.h
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
@@ -1082,19 +1082,23 @@ public:
   }
 
   void SetHasWarnedAboutPositionedTableParts() {
     mHasWarnedAboutPositionedTableParts = true;
   }
 
   static bool StyloEnabled()
   {
+    // Stylo (the Servo backend for Gecko's style system) is generally enabled
+    // or disabled at compile-time. However, we provide the additional capability
+    // to disable it dynamically in stylo-enabled builds via an environmental
+    // variable.
 #ifdef MOZ_STYLO
-    static bool enabled = PR_GetEnv("MOZ_STYLO");
-    return enabled;
+    static bool disabled = PR_GetEnv("MOZ_DISABLE_STYLO");
+    return !disabled;
 #else
     return false;
 #endif
   }
 
 protected:
   friend class nsRunnableMethod<nsPresContext>;
   void ThemeChangedInternal();