Bug 1688888: decrease ui.*.radius.topmm on Android. r=botond

On one website, the touch input fluffing made an audio scrubber so large that it
covered other playback controls, making them inaccessible. This patch addresses
this problem by changing the top fluffing radius so it more closely matches the
bottom radius.

In our investigation, we found the top radius was added asymmetrically to the
bottom radius without an explanation. We speculate the bottom bias was added
because when you touch the screen, you tend to aim with the top part of your
finger, near your fingernail, and sometimes the bottom part of your finger will
also touch the screen, fat fingering it: if true, we would fluff the event less
below the touch point (which is what the code was). I vaguely remember this fat
fingering problem in the early 2010's but I haven't thought about it in recent
years and I didn't notice this problem in my testing for this patch – perhaps
device touch handling has just gotten better. Therefore, we feel safe to remove
the bias.

Differential Revision: https://phabricator.services.mozilla.com/D124267
This commit is contained in:
Michael Comella 2021-09-11 02:14:57 +00:00
parent 67e6fce4dd
commit 3910474ee9
2 changed files with 6 additions and 6 deletions

View File

@ -80,7 +80,7 @@ function startTest() {
SpecialPowers.pushPrefEnv({"set": [["ui.mouse.radius.enabled", true],
["ui.mouse.radius.inputSource.touchOnly", false],
["ui.mouse.radius.leftmm", 12],
["ui.mouse.radius.topmm", 8],
["ui.mouse.radius.topmm", 4],
["ui.mouse.radius.rightmm", 4],
["ui.mouse.radius.bottommm", 4],
["ui.mouse.radius.visitedweight", 50]]}, runTest);
@ -159,8 +159,8 @@ function runTest() {
// just outside the edges we set up in the prefs.
testMouseClick("t", 100 + 13*mm, 10, "body", "basic functionality");
testMouseClick("t", 100 + 11*mm, 10, "t", "basic functionality");
testMouseClick("t", 10, 80 + 9*mm, "body", "basic functionality");
testMouseClick("t", 10, 80 + 7*mm, "t", "basic functionality");
testMouseClick("t", 10, 80 + 5*mm, "body", "basic functionality");
testMouseClick("t", 10, 80 + 3*mm, "t", "basic functionality");
testMouseClick("t", -5*mm, 10, "body", "basic functionality");
testMouseClick("t", -3*mm, 10, "t", "basic functionality");
testMouseClick("t", 10, -5*mm, "body", "basic functionality");
@ -361,7 +361,7 @@ function test3() {
SpecialPowers.pushPrefEnv({"set": [["dom.w3c_touch_events.enabled", 1],
["ui.touch.radius.enabled", true],
["ui.touch.radius.leftmm", 12],
["ui.touch.radius.topmm", 8],
["ui.touch.radius.topmm", 4],
["ui.touch.radius.rightmm", 4],
["ui.touch.radius.bottommm", 4],
["ui.touch.radius.visitedweight", 50]]}, testTouchable);

View File

@ -11179,7 +11179,7 @@
- name: ui.touch.radius.topmm
type: uint32_t
#ifdef ANDROID
value: 5
value: 2
#else
value: 12
#endif
@ -11225,7 +11225,7 @@
- name: ui.mouse.radius.topmm
type: uint32_t
#ifdef ANDROID
value: 5
value: 2
#else
value: 12
#endif