mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1058358 - Add a new opt-out mechanism for each time we enable e10s on Nightly for testing. r=gavin
This commit is contained in:
parent
3ba186e9e5
commit
b1dd89ee85
@ -93,7 +93,8 @@ var gMainPane = {
|
||||
gMainPane.enableE10SChange);
|
||||
let e10sCheckbox = document.getElementById("e10sAutoStart");
|
||||
let e10sPref = document.getElementById("browser.tabs.remote.autostart");
|
||||
e10sCheckbox.checked = e10sPref.value;
|
||||
let e10sTempPref = document.getElementById("e10sTempPref");
|
||||
e10sCheckbox.checked = e10sPref.value || e10sTempPref.value;
|
||||
#endif
|
||||
|
||||
// Notify observers that the UI is now ready
|
||||
@ -107,6 +108,19 @@ var gMainPane = {
|
||||
{
|
||||
let e10sCheckbox = document.getElementById("e10sAutoStart");
|
||||
let e10sPref = document.getElementById("browser.tabs.remote.autostart");
|
||||
let e10sTempPref = document.getElementById("e10sTempPref");
|
||||
|
||||
let prefsToChange;
|
||||
if (e10sCheckbox.checked) {
|
||||
// Enabling e10s autostart
|
||||
prefsToChange = [e10sPref];
|
||||
} else {
|
||||
// Disabling e10s autostart
|
||||
prefsToChange = [e10sPref];
|
||||
if (e10sTempPref.value) {
|
||||
prefsToChange.push(e10sTempPref);
|
||||
}
|
||||
}
|
||||
|
||||
const Cc = Components.classes, Ci = Components.interfaces;
|
||||
let brandName = document.getElementById("bundleBrand").getString("brandShortName");
|
||||
@ -124,13 +138,15 @@ var gMainPane = {
|
||||
shouldProceed = !cancelQuit.data;
|
||||
|
||||
if (shouldProceed) {
|
||||
e10sPref.value = e10sCheckbox.checked;
|
||||
for (let prefToChange of prefsToChange) {
|
||||
prefToChange.value = e10sCheckbox.checked;
|
||||
}
|
||||
Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
|
||||
}
|
||||
}
|
||||
|
||||
// Revert the checkbox in case we didn't quit
|
||||
e10sCheckbox.checked = e10sPref.value;
|
||||
e10sCheckbox.checked = e10sPref.value || e10sTempPref.value;
|
||||
},
|
||||
#endif
|
||||
|
||||
|
@ -13,6 +13,9 @@
|
||||
<preference id="browser.tabs.remote.autostart"
|
||||
name="browser.tabs.remote.autostart"
|
||||
type="bool"/>
|
||||
<preference id="e10sTempPref"
|
||||
name="browser.tabs.remote.autostart.1"
|
||||
type="bool"/>
|
||||
#endif
|
||||
|
||||
<!-- Startup -->
|
||||
|
@ -4539,7 +4539,8 @@ bool
|
||||
mozilla::BrowserTabsRemoteAutostart()
|
||||
{
|
||||
if (!gBrowserTabsRemoteAutostartInitialized) {
|
||||
bool prefEnabled = Preferences::GetBool("browser.tabs.remote.autostart", false);
|
||||
bool prefEnabled = Preferences::GetBool("browser.tabs.remote.autostart", false) ||
|
||||
Preferences::GetBool("browser.tabs.remote.autostart.1", false);
|
||||
bool disabledForA11y = Preferences::GetBool("browser.tabs.remote.autostart.disabled-because-using-a11y", false);
|
||||
gBrowserTabsRemoteAutostart = !gSafeMode && !disabledForA11y && prefEnabled;
|
||||
gBrowserTabsRemoteAutostartInitialized = true;
|
||||
|
Loading…
Reference in New Issue
Block a user