mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
patch backspace for e10s
This commit is contained in:
parent
f342f6ce12
commit
b386e2fed1
6 changed files with 25 additions and 7 deletions
|
|
@ -682,11 +682,7 @@ pref("browser.download.hide_plugins_without_extensions", true);
|
|||
// 0 goes Back/Forward
|
||||
// 1 act like PgUp/PgDown
|
||||
// 2 and other values, nothing
|
||||
#ifdef UNIX_BUT_NOT_MAC
|
||||
pref("browser.backspace_action", 2);
|
||||
#else
|
||||
pref("browser.backspace_action", 0);
|
||||
#endif
|
||||
|
||||
// this will automatically enable inline spellchecking (if it is available) for
|
||||
// editable elements in HTML
|
||||
|
|
@ -922,6 +918,7 @@ pref("dom.ipc.shims.enabledWarnings", false);
|
|||
|
||||
// Start the browser in e10s mode
|
||||
pref("browser.tabs.remote.autostart", true);
|
||||
pref("browser.tabs.remote.force-enable", true);
|
||||
pref("browser.tabs.remote.desktopbehavior", true);
|
||||
pref("browser.tabs.remote.ignoreBlockPolicy", true);
|
||||
// Number of web content processes used by e10s.
|
||||
|
|
|
|||
|
|
@ -255,8 +255,8 @@
|
|||
<key id="key_delete" keycode="VK_DELETE" command="cmd_delete"/>
|
||||
<key id="key_selectAll" key="&selectAllCmd.key;" modifiers="accel"/>
|
||||
|
||||
<key keycode="VK_BACK" command="cmd_handleBackspace"/>
|
||||
<key keycode="VK_BACK" command="cmd_handleShiftBackspace" modifiers="shift"/>
|
||||
<key id="key_handleBackspace" keycode="VK_BACK" command="cmd_handleBackspace"/>
|
||||
<key id="key_handleShiftBackspace" keycode="VK_BACK" command="cmd_handleShiftBackspace" modifiers="shift"/>
|
||||
#ifndef XP_MACOSX
|
||||
<key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/>
|
||||
<key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/>
|
||||
|
|
|
|||
|
|
@ -990,6 +990,18 @@ var gBrowserInit = {
|
|||
XULBrowserWindow.init();
|
||||
|
||||
window.messageManager.addMessageListener("Browser:LoadURI", RedirectLoad);
|
||||
if (gMultiProcessBrowser) {
|
||||
// In e10s, let content handle Backspace directly to avoid chrome command
|
||||
// interception breaking editable fields.
|
||||
let backspaceKey = document.getElementById("key_handleBackspace");
|
||||
let shiftBackspaceKey = document.getElementById("key_handleShiftBackspace");
|
||||
if (backspaceKey) {
|
||||
backspaceKey.setAttribute("disabled", "true");
|
||||
}
|
||||
if (shiftBackspaceKey) {
|
||||
shiftBackspaceKey.setAttribute("disabled", "true");
|
||||
}
|
||||
}
|
||||
|
||||
if (!gMultiProcessBrowser) {
|
||||
// There is a Content:Click message manually sent from content.
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ addMessageListener("ContextMenu:DoCustomCommand", function(message) {
|
|||
addMessageListener("RemoteLogins:fillForm", function(message) {
|
||||
LoginManagerContent.receiveMessage(message, content);
|
||||
});
|
||||
|
||||
addEventListener("DOMFormHasPassword", function(event) {
|
||||
LoginManagerContent.onDOMFormHasPassword(event, content);
|
||||
let formLike = LoginFormFactory.createFromForm(event.target);
|
||||
|
|
|
|||
|
|
@ -178,14 +178,17 @@ var gAdvancedPane = {
|
|||
|
||||
readE10sEnabled: function ()
|
||||
{
|
||||
let forceEnable = document.getElementById("browser.tabs.remote.force-enable").value;
|
||||
let autostart = document.getElementById("browser.tabs.remote.autostart").value;
|
||||
let trialAutostart = document.getElementById("browser.tabs.remote.autostart.2").value;
|
||||
return !!(autostart || trialAutostart);
|
||||
return !!(forceEnable || autostart || trialAutostart);
|
||||
},
|
||||
|
||||
writeE10sEnabled: function ()
|
||||
{
|
||||
let enabled = document.getElementById("e10sEnabled").checked;
|
||||
document.getElementById("browser.tabs.remote.force-enable").value = enabled;
|
||||
document.getElementById("browser.tabs.remote.autostart").value = enabled;
|
||||
document.getElementById("browser.tabs.remote.autostart.2").value = enabled;
|
||||
return enabled;
|
||||
},
|
||||
|
|
@ -205,6 +208,7 @@ var gAdvancedPane = {
|
|||
|
||||
let buttonIndex = confirmRestartPrompt(enabled, 1, true, false);
|
||||
if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
|
||||
document.getElementById("browser.tabs.remote.force-enable").value = enabled;
|
||||
document.getElementById("browser.tabs.remote.autostart").value = enabled;
|
||||
document.getElementById("browser.tabs.remote.autostart.2").value = enabled;
|
||||
let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"]
|
||||
|
|
@ -215,6 +219,7 @@ var gAdvancedPane = {
|
|||
|
||||
this._shouldPromptForE10sRestart = false;
|
||||
checkbox.checked = this._storedE10sEnabled;
|
||||
document.getElementById("browser.tabs.remote.force-enable").value = this._storedE10sEnabled;
|
||||
document.getElementById("browser.tabs.remote.autostart").value = this._storedE10sEnabled;
|
||||
document.getElementById("browser.tabs.remote.autostart.2").value = this._storedE10sEnabled;
|
||||
this._shouldPromptForE10sRestart = true;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@
|
|||
<preference id="browser.tabs.remote.autostart.2"
|
||||
name="browser.tabs.remote.autostart.2"
|
||||
type="bool"/>
|
||||
<preference id="browser.tabs.remote.force-enable"
|
||||
name="browser.tabs.remote.force-enable"
|
||||
type="bool"/>
|
||||
|
||||
<!-- Network tab -->
|
||||
<preference id="browser.cache.disk.capacity"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue