diff --git a/browser/components/preferences/in-content-new/main.js b/browser/components/preferences/in-content-new/main.js index fbd86fb5f088..4c82838942f2 100644 --- a/browser/components/preferences/in-content-new/main.js +++ b/browser/components/preferences/in-content-new/main.js @@ -1118,13 +1118,22 @@ var gMainPane = { let defaultPerformancePref = document.getElementById("browser.preferences.defaultPerformanceSettings.enabled"); let performanceSettings = document.getElementById("performanceSettings"); + let processCountPref = document.getElementById("dom.ipc.processCount"); if (defaultPerformancePref.value) { - let processCountPref = document.getElementById("dom.ipc.processCount"); let accelerationPref = document.getElementById("layers.acceleration.disabled"); + // Unset the value so process count will be decided by e10s rollout. processCountPref.value = processCountPref.defaultValue; accelerationPref.value = accelerationPref.defaultValue; performanceSettings.hidden = true; } else { + let e10sRolloutProcessCountPref = + document.getElementById("dom.ipc.processCount.web"); + // Take the e10s rollout value as the default value (if it exists), + // but don't overwrite the user set value. + if (e10sRolloutProcessCountPref.value && + processCountPref.value == processCountPref.defaultValue) { + processCountPref.value = e10sRolloutProcessCountPref.value; + } performanceSettings.hidden = false; } }, @@ -1132,12 +1141,16 @@ var gMainPane = { buildContentProcessCountMenuList() { if (gMainPane.isE10SEnabled()) { let processCountPref = document.getElementById("dom.ipc.processCount"); + let e10sRolloutProcessCountPref = + document.getElementById("dom.ipc.processCount.web"); + let defaultProcessCount = + e10sRolloutProcessCountPref.value || processCountPref.defaultValue; let bundlePreferences = document.getElementById("bundlePreferences"); let label = bundlePreferences.getFormattedString("defaultContentProcessCount", - [processCountPref.defaultValue]); + [defaultProcessCount]); let contentProcessCount = document.querySelector(`#contentProcessCount > menupopup > - menuitem[value="${processCountPref.defaultValue}"]`); + menuitem[value="${defaultProcessCount}"]`); contentProcessCount.label = label; document.getElementById("limitContentProcess").disabled = false; diff --git a/browser/components/preferences/in-content-new/main.xul b/browser/components/preferences/in-content-new/main.xul index 5c43a11a5f9b..29e2edea79ad 100644 --- a/browser/components/preferences/in-content-new/main.xul +++ b/browser/components/preferences/in-content-new/main.xul @@ -184,6 +184,10 @@ name="dom.ipc.processCount" type="int"/> + + menupopup > - menuitem[value="${processCountPref.defaultValue}"]`); + menuitem[value="${defaultProcessCount}"]`); contentProcessCount.label = label; document.getElementById("limitContentProcess").disabled = false; diff --git a/browser/components/preferences/in-content/main.xul b/browser/components/preferences/in-content/main.xul index e2b875d915f3..7167b554bd2c 100644 --- a/browser/components/preferences/in-content/main.xul +++ b/browser/components/preferences/in-content/main.xul @@ -119,6 +119,10 @@ name="dom.ipc.processCount" type="int"/> + +