forked from mirrors/gecko-dev
Bug 1819109 - Remove snav.enabled. r=masayuki,geckoview-reviewers,emilio,owlish
Although we have removed Spatial navigation by bug 1341737, we still touch `snav.enabled`. Let's remove it. Differential Revision: https://phabricator.services.mozilla.com/D172390
This commit is contained in:
parent
9f3c39c66f
commit
cda1a13b1c
18 changed files with 23 additions and 70 deletions
|
|
@ -28,13 +28,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1372369
|
|||
/** Test for <input type='date'> bad input validity state **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
// Turn off Spatial Navigation because it hijacks arrow keydown events:
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, function() {
|
||||
test();
|
||||
SimpleTest.finish();
|
||||
});
|
||||
});
|
||||
|
||||
const DATE_BAD_INPUT_MSG = "Please enter a valid date.";
|
||||
const isDesktop = !/Mobile|Tablet/.test(navigator.userAgent);
|
||||
|
|
|
|||
|
|
@ -22,13 +22,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1286182
|
|||
<script type="application/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
// Turn off Spatial Navigation because it hijacks arrow keydown events:
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, function() {
|
||||
test();
|
||||
SimpleTest.finish();
|
||||
});
|
||||
});
|
||||
|
||||
var testData = [
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -25,13 +25,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=935506
|
|||
* key events while it is in various states.
|
||||
**/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
// Turn off Spatial Navigation because it hijacks arrow keydown events:
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, function() {
|
||||
test();
|
||||
SimpleTest.finish();
|
||||
});
|
||||
});
|
||||
const defaultMinimum = "NaN";
|
||||
const defaultMaximum = "NaN";
|
||||
const defaultStep = 1;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=343444
|
|||
<script class="testbody" type="text/javascript">
|
||||
/** Test for Bug 343444 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, startTest);
|
||||
startTest();
|
||||
function startTest() {
|
||||
document.getElementById("start").focus();
|
||||
var count=0;
|
||||
|
|
|
|||
|
|
@ -25,13 +25,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=843725
|
|||
**/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
// Turn off Spatial Navigation because it hijacks arrow keydown events:
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, function() {
|
||||
test();
|
||||
SimpleTest.finish();
|
||||
});
|
||||
});
|
||||
|
||||
const defaultMinimum = 0;
|
||||
const defaultMaximum = 100;
|
||||
|
|
|
|||
|
|
@ -26,13 +26,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=853525
|
|||
* ugly rounding errors.
|
||||
**/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
// Turn off Spatial Navigation because it hijacks arrow keydown events:
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, function() {
|
||||
test();
|
||||
SimpleTest.finish();
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* We can _NOT_ generate these values by looping and simply incrementing a
|
||||
|
|
|
|||
|
|
@ -20,13 +20,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1288591
|
|||
<script type="application/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
// Turn off Spatial Navigation because it hijacks arrow keydown events:
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, function() {
|
||||
test();
|
||||
SimpleTest.finish();
|
||||
});
|
||||
});
|
||||
|
||||
var testData = [
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
var r1 = document.getElementById("r1");
|
||||
var r2 = document.getElementById("r2");
|
||||
var s1 = document.getElementById("s1");
|
||||
SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, startTest);
|
||||
startTest();
|
||||
function startTest() {
|
||||
r1.click();
|
||||
ok(r1.checked,
|
||||
|
|
|
|||
|
|
@ -22,10 +22,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=633058
|
|||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
// Turn off Spatial Navigation so that the 'keypress' event fires in traditional behavior.
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.pushPrefEnv({"set":[['snav.enabled', false]]}, startTest);
|
||||
});
|
||||
SimpleTest.waitForFocus(startTest);
|
||||
|
||||
function startTest() {
|
||||
var nbExpectedKeyDown = 8;
|
||||
var nbExpectedKeyPress = 1;
|
||||
|
|
|
|||
|
|
@ -20,11 +20,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=674558
|
|||
/** Test for Bug 674558 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
// Turn off spatial navigation because it hijacks VK_RIGHT and VK_LEFT keydown
|
||||
// events.
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, startTest);
|
||||
});
|
||||
SimpleTest.waitForFocus(startTest);
|
||||
|
||||
function startTest() {
|
||||
function textAreaCtor() {
|
||||
return document.createElement("textarea");
|
||||
|
|
|
|||
|
|
@ -96,9 +96,7 @@ function startTest() {
|
|||
if (gTestStarted)
|
||||
return;
|
||||
gTestStarted = true;
|
||||
// Turn off spatial navigation because it hijacks KEY_ArrowRight and KEY_ArrowLeft keydown
|
||||
// events
|
||||
SpecialPowers.pushPrefEnv({"set": [["accessibility.browsewithcaret", true], ["snav.enabled", false]]}, test0);
|
||||
SpecialPowers.pushPrefEnv({"set": [["accessibility.browsewithcaret", true]]}, test0);
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
|
|
|||
|
|
@ -127,10 +127,6 @@ async function doCompositionTest(aSelector) {
|
|||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(async () => {
|
||||
// Turn off spatial navigation because it hijacks arrow key events and
|
||||
// VK_RETURN events.
|
||||
await SpecialPowers.pushPrefEnv({"set": [["snav.enabled", false]]});
|
||||
|
||||
await doKeyEventTest("textarea");
|
||||
await doKeyEventTest("div[contenteditable]");
|
||||
await doCompositionTest("textarea");
|
||||
|
|
|
|||
|
|
@ -29,8 +29,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=345267
|
|||
|
||||
/** Test for Bug 345267 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
// Turn off Spatial Navigation to stop if from hijacking "left" keypress event.
|
||||
SpecialPowers.pushPrefEnv({"set":[['snav.enabled', false]]}, runTest);
|
||||
runTest();
|
||||
|
||||
function runTest() {
|
||||
is($("d1").value, "abcde",
|
||||
|
|
|
|||
|
|
@ -124,10 +124,7 @@ function runTest() {
|
|||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
// Turn off spatial nav so that it does not hijack the up and down events.
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, runTest);
|
||||
});
|
||||
SimpleTest.waitForFocus(runTest);
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
|
|
|||
|
|
@ -74,10 +74,7 @@ function runTest() {
|
|||
SimpleTest.finish();
|
||||
}
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
// Turn off Spatial Navigation because it hijacks down and up key events.
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, runTest);
|
||||
})
|
||||
SimpleTest.waitForFocus(runTest);
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
|
|
|||
|
|
@ -19,11 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=291082
|
|||
event.preventDefault();
|
||||
}
|
||||
|
||||
function test() {
|
||||
// Turn off Spatial Navigation because it hijacks arrow keydown events.
|
||||
SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, runTest);
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
document.getElementById("keydown").addEventListener("keydown", preventDefault);
|
||||
document.getElementById("keypress").addEventListener("keypress", preventDefault);
|
||||
|
|
@ -60,7 +55,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=291082
|
|||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="test();">
|
||||
<body onload="runTest();">
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=291082">Mozilla Bug 291082</a>
|
||||
<div>
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -525,9 +525,6 @@ pref("gfx.canvas.azure.backends", "skia");
|
|||
// When true, phone number linkification is enabled.
|
||||
pref("browser.ui.linkify.phone", false);
|
||||
|
||||
// Enables/disables Spatial Navigation
|
||||
pref("snav.enabled", true);
|
||||
|
||||
// The mode of home provider syncing.
|
||||
// 0: Sync always
|
||||
// 1: Sync only when on wifi
|
||||
|
|
|
|||
|
|
@ -3615,9 +3615,6 @@ pref("browser.safebrowsing.provider.mozilla.lists.content", "moz-full");
|
|||
// The table and global pref for blocking plugin content
|
||||
pref("urlclassifier.blockedTable", "moztest-block-simple,mozplugin-block-digest256");
|
||||
|
||||
// Turn off Spatial navigation by default.
|
||||
pref("snav.enabled", false);
|
||||
|
||||
// Wakelock is disabled by default.
|
||||
pref("dom.wakelock.enabled", false);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue