Bug 1138746 - Do not allow e10s windows to be opened when HWA is disabled on OS X r=mconley

This commit is contained in:
George Wright 2015-04-10 17:57:35 -04:00
Родитель c3dca4be1e
Коммит de4544fb8c
2 изменённых файлов: 16 добавлений и 1 удалений

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

@ -7315,6 +7315,14 @@ let gRemoteTabsUI = {
return;
}
#ifdef XP_MACOSX
if (Services.prefs.getBoolPref("layers.acceleration.disabled")) {
// On OS X, "Disable Hardware Acceleration" also disables OMTC and forces
// a fallback to Basic Layers. This is incompatible with e10s.
return;
}
#endif
let newRemoteWindow = document.getElementById("menu_newRemoteWindow");
let newNonRemoteWindow = document.getElementById("menu_newNonRemoteWindow");
let autostart = Services.appinfo.browserTabsRemoteAutostart;

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

@ -1103,11 +1103,18 @@ let openRemote = !Services.appinfo.browserTabsRemoteAutostart;
let buttonLabel = openRemote ? "New e10s Window"
: "New Non-e10s Window";
let e10sDisabled = Services.appinfo.inSafeMode;
#ifdef XP_MACOSX
// On OS X, "Disable Hardware Acceleration" also disables OMTC and forces
// a fallback to Basic Layers. This is incompatible with e10s.
e10sDisabled |= Services.prefs.getBoolPref("layers.acceleration.disabled");
#endif
CustomizableWidgets.push({
id: "e10s-button",
label: buttonLabel,
tooltiptext: buttonLabel,
disabled: Services.appinfo.inSafeMode,
disabled: e10sDisabled,
defaultArea: CustomizableUI.AREA_PANEL,
onCommand: getCommandFunction(openRemote),
});