Bug 1382090 - Test both prefs and build for Stylo in about:support. r=bholley

Avoid the confusing state of "Stylo: true (disabled by build)" by also checking
the build constant _and_ the pref / env var together.

MozReview-Commit-ID: jTK66cWcyv

--HG--
extra : rebase_source : 54e158ed4f3dbde27e410aa0a59fcac44c383db3
This commit is contained in:
J. Ryan Stinnett 2017-07-19 16:32:40 -05:00
Родитель cdc93c59ba
Коммит caec720392
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -237,8 +237,9 @@ var dataProviders = {
data.styloDefault = Services.prefs.getDefaultBranch(null)
.getBoolPref("layout.css.servo.enabled", false);
data.styloResult =
!!env.get("STYLO_FORCE_ENABLED") ||
Services.prefs.getBoolPref("layout.css.servo.enabled", false);
AppConstants.MOZ_STYLO &&
(!!env.get("STYLO_FORCE_ENABLED") ||
Services.prefs.getBoolPref("layout.css.servo.enabled", false));
const keyGoogle = Services.urlFormatter.formatURL("%GOOGLE_API_KEY%").trim();
data.keyGoogleFound = keyGoogle != "no-google-api-key" && keyGoogle.length > 0;