Loading layout/base/nsLayoutUtils.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -170,6 +170,9 @@ typedef nsStyleTransformMatrix::TransformReferenceBox TransformReferenceBox; /* static */ bool nsLayoutUtils::sInterruptibleReflowEnabled; /* static */ bool nsLayoutUtils::sSVGTransformBoxEnabled; /* static */ bool nsLayoutUtils::sTextCombineUprightDigitsEnabled; #ifdef MOZ_STYLO /* static */ bool nsLayoutUtils::sStyloEnabled; #endif static ViewID sScrollIdCounter = FrameMetrics::START_SCROLL_ID; Loading Loading @@ -7840,6 +7843,10 @@ nsLayoutUtils::Initialize() "svg.transform-box.enabled"); Preferences::AddBoolVarCache(&sTextCombineUprightDigitsEnabled, "layout.css.text-combine-upright-digits.enabled"); #ifdef MOZ_STYLO Preferences::AddBoolVarCache(&sStyloEnabled, "layout.css.servo.enabled"); #endif for (auto& callback : kPrefCallbacks) { Preferences::RegisterCallbackAndCall(callback.func, callback.name); Loading Loading @@ -9337,7 +9344,7 @@ nsLayoutUtils::GetCumulativeApzCallbackTransform(nsIFrame* aFrame) /* static */ bool nsLayoutUtils::SupportsServoStyleBackend(nsIDocument* aDocument) { return nsPresContext::StyloEnabled() && return StyloEnabled() && aDocument->IsHTMLOrXHTML() && static_cast<nsDocument*>(aDocument)->IsContentDocument(); } layout/base/nsLayoutUtils.h +14 −0 Original line number Diff line number Diff line Loading @@ -2421,6 +2421,17 @@ public: return sTextCombineUprightDigitsEnabled; } // 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 a pref. static bool StyloEnabled() { #ifdef MOZ_STYLO return sStyloEnabled; #else return false; #endif } /** * See comment above "font.size.inflation.mappingIntercept" in * modules/libpref/src/init/all.js . Loading Loading @@ -2861,6 +2872,9 @@ private: static bool sInterruptibleReflowEnabled; static bool sSVGTransformBoxEnabled; static bool sTextCombineUprightDigitsEnabled; #ifdef MOZ_STYLO static bool sStyloEnabled; #endif /** * Helper function for LogTestDataForPaint(). Loading layout/base/nsPresContext.h +0 −14 Original line number Diff line number Diff line Loading @@ -1106,20 +1106,6 @@ public: mHasWarnedAboutTooLargeDashedOrDottedRadius = 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 disabled = PR_GetEnv("MOZ_DISABLE_STYLO"); return !disabled; #else return false; #endif } protected: friend class nsRunnableMethod<nsPresContext>; void ThemeChangedInternal(); Loading modules/libpref/init/all.js +5 −0 Original line number Diff line number Diff line Loading @@ -5500,3 +5500,8 @@ pref("osfile.reset_worker_delay", 30000); pref("dom.webkitBlink.dirPicker.enabled", true); pref("dom.webkitBlink.filesystem.enabled", true); #endif #ifdef MOZ_STYLO // Is the Servo-backed style system enabled? pref("layout.css.servo.enabled", true); #endif Loading
layout/base/nsLayoutUtils.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -170,6 +170,9 @@ typedef nsStyleTransformMatrix::TransformReferenceBox TransformReferenceBox; /* static */ bool nsLayoutUtils::sInterruptibleReflowEnabled; /* static */ bool nsLayoutUtils::sSVGTransformBoxEnabled; /* static */ bool nsLayoutUtils::sTextCombineUprightDigitsEnabled; #ifdef MOZ_STYLO /* static */ bool nsLayoutUtils::sStyloEnabled; #endif static ViewID sScrollIdCounter = FrameMetrics::START_SCROLL_ID; Loading Loading @@ -7840,6 +7843,10 @@ nsLayoutUtils::Initialize() "svg.transform-box.enabled"); Preferences::AddBoolVarCache(&sTextCombineUprightDigitsEnabled, "layout.css.text-combine-upright-digits.enabled"); #ifdef MOZ_STYLO Preferences::AddBoolVarCache(&sStyloEnabled, "layout.css.servo.enabled"); #endif for (auto& callback : kPrefCallbacks) { Preferences::RegisterCallbackAndCall(callback.func, callback.name); Loading Loading @@ -9337,7 +9344,7 @@ nsLayoutUtils::GetCumulativeApzCallbackTransform(nsIFrame* aFrame) /* static */ bool nsLayoutUtils::SupportsServoStyleBackend(nsIDocument* aDocument) { return nsPresContext::StyloEnabled() && return StyloEnabled() && aDocument->IsHTMLOrXHTML() && static_cast<nsDocument*>(aDocument)->IsContentDocument(); }
layout/base/nsLayoutUtils.h +14 −0 Original line number Diff line number Diff line Loading @@ -2421,6 +2421,17 @@ public: return sTextCombineUprightDigitsEnabled; } // 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 a pref. static bool StyloEnabled() { #ifdef MOZ_STYLO return sStyloEnabled; #else return false; #endif } /** * See comment above "font.size.inflation.mappingIntercept" in * modules/libpref/src/init/all.js . Loading Loading @@ -2861,6 +2872,9 @@ private: static bool sInterruptibleReflowEnabled; static bool sSVGTransformBoxEnabled; static bool sTextCombineUprightDigitsEnabled; #ifdef MOZ_STYLO static bool sStyloEnabled; #endif /** * Helper function for LogTestDataForPaint(). Loading
layout/base/nsPresContext.h +0 −14 Original line number Diff line number Diff line Loading @@ -1106,20 +1106,6 @@ public: mHasWarnedAboutTooLargeDashedOrDottedRadius = 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 disabled = PR_GetEnv("MOZ_DISABLE_STYLO"); return !disabled; #else return false; #endif } protected: friend class nsRunnableMethod<nsPresContext>; void ThemeChangedInternal(); Loading
modules/libpref/init/all.js +5 −0 Original line number Diff line number Diff line Loading @@ -5500,3 +5500,8 @@ pref("osfile.reset_worker_delay", 30000); pref("dom.webkitBlink.dirPicker.enabled", true); pref("dom.webkitBlink.filesystem.enabled", true); #endif #ifdef MOZ_STYLO // Is the Servo-backed style system enabled? pref("layout.css.servo.enabled", true); #endif