Closed Bug 1345355 Opened 7 years ago Closed 7 years ago

Synaptics touchpad stopped working after Firefox 52 update

Categories

(Core :: Widget: Win32, defect)

52 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla55
Tracking Status
firefox52 + wontfix
firefox-esr52 --- fixed
firefox53 + wontfix
firefox54 + fixed
firefox55 --- fixed

People

(Reporter: martin, Assigned: kats)

References

(Depends on 1 open bug)

Details

(Keywords: regression)

Attachments

(4 files, 2 obsolete files)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170302120751

Steps to reproduce:

1. Firefox updated to latest version 52.
2. Touchpad (Synaptics on my laptop) stopped working on Firefox only.


Actual results:

As I try to vertically scroll on a webpage, I can see a dot where the mouse arrow is located, but it wouldn't move. Right before the update it worked perfectly.
Also, Firefox is the only program on this machine, whichhas issues. Touchpad works on all other programs.

Windows 10 64bit
Firefox 52 32bit
Synaptics driver 19.1.3.6



Expected results:

Touchpad scrolling should work.
Component: Untriaged → Widget: Win32
Product: Firefox → Core
Kats, have we landed anything touch related in 52?
Flags: needinfo?(bugmail)
Well, 52 turned on touch/APZ/e10s for some devices.

Martin, if you go to about:support, what does it say for "Asynchronous Pan/Zoom" in the graphics section?
Flags: needinfo?(bugmail) → needinfo?(martin)
Kartikaya, it's in Bulgarian, but roughly, it says: "using mouse scroll; using the touch interface"
Flags: needinfo?(martin)
Ok, thanks. Can you please try this:
- go to about:config
- search for the "layers.async-pan-zoom.enabled" preference
- toggle it to false
- restart the browser

See if that fixes the problem. Based on that result I'll have some more things for you to try and narrow it down a bit further. Thanks!
This one fixed it. It's working now.
Thanks. Can you try one more thing: reset the "layers.async-pan-zoom.enabled" preference back to true, and instead set the "dom.w3c_touch_events.enabled" preference to "0" (it should be "2" by default). Restart the browser and see if it's still fixed. That will help us isolate the problem. Thanks again!
Yes, it's still fixed.
[Tracking Requested - why for this release]:
Ok, thank you! Does your laptop have a touchscreen? It not, it might be that we're incorrectly detecting the Synaptics touchpad as a touchscreen device.
Assignee: nobody → bugmail
Depending on how widespread this issue is, we might need to put a fix in a dot release for 52. ni? to jcristau as a FYI.
Flags: needinfo?(jcristau)
Hi Florin, Andrei, would your team be able to repro this issue based on the comments above? Specifically comment 9. Did we do any testing on this hardware configuration during the beta cycle?
Flags: needinfo?(florin.mezei)
Flags: needinfo?(andrei.vaida)
I have a win10, Lenovo x1 carbon and I have no trouble using the touchpad on any Firefox versions (all beta versions incl 53.0b1 and aurora versions).
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #9)
> Ok, thank you! Does your laptop have a touchscreen? It not, it might be that
> we're incorrectly detecting the Synaptics touchpad as a touchscreen device.
Flags: needinfo?(martin)
Hi,

no touchscreen on this laptop. Only Synaptics touchpad.
Flags: needinfo?(martin)
I have a patch that I think should help but I have no way to test it since I don't have the same hardware. I can do a try push for Martin to try out, or if we have similar hardware in QA then we can test it there.
Comment on attachment 8845548 [details]
Bug 1345355 - Don't register a window as touch-enabled if there's no touch device supported.

https://reviewboard.mozilla.org/r/118670/#review120640
Attachment #8845548 - Flags: review?(jmathies) → review+
I'll mark this blocking for 52, for now, until we have more information. 
It would be good to know if other versions are affected too.
Martin, it would be great if you could download the build at [1], unzip and run it with a new profile (instructions on how create and manage profiles can be found at [2]) and see if it still has the same problem. The new profile should have the default settings of layers.async-pan-zoom.enabled=true and dom.w3c_touch_events.enabled=2, and I expect scrolling with the touchpad to work normally. Let me know if you need any help, and thanks again for your help and patience!

[1] https://archive.mozilla.org/pub/firefox/try-builds/kgupta@mozilla.com-2c765837f728a7e5c67da273bf2aa7bf22ee08cf/try-win32/firefox-55.0a1.en-US.win32.zip
[2] https://support.mozilla.org/t5/Install-and-Update/Use-the-Profile-Manager-to-create-and-remove-Firefox-profiles/ta-p/2914#firefox:winxp:fx51
Flags: needinfo?(martin)
Sadly (but not entirely surprisingly) the patch is causing test failures in tests that do native touch synthesization, I presume because now we leave mTouchWindow = false and that messes with the handling of touch events. I'll try to figure out a way to fix that up.
That try push is looking ok. Carrying r+ since it's a pretty small test-only change. I'll land the patch but would really like to get QA testing, specially if we're uplifting to release.

For testing, the main thing that needs to be done is try to build on as many different device configurations as possible, making sure that APZ touch-scrolling works on touchscreen devices, and touchpad/wheel scrolling works on devices that have touchpads/mousewheels.
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f2262b093262
Don't register a window as touch-enabled if there's no touch device supported. r=jimm
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #20)
> Martin, it would be great if you could download the build at [1], unzip and
> run it with a new profile (instructions on how create and manage profiles
> can be found at [2]) and see if it still has the same problem. The new
> profile should have the default settings of
> layers.async-pan-zoom.enabled=true and dom.w3c_touch_events.enabled=2, and I
> expect scrolling with the touchpad to work normally. Let me know if you need
> any help, and thanks again for your help and patience!
> 
> [1]
> https://archive.mozilla.org/pub/firefox/try-builds/kgupta@mozilla.com-
> 2c765837f728a7e5c67da273bf2aa7bf22ee08cf/try-win32/firefox-55.0a1.en-US.
> win32.zip
> [2]
> https://support.mozilla.org/t5/Install-and-Update/Use-the-Profile-Manager-to-
> create-and-remove-Firefox-profiles/ta-p/2914#firefox:winxp:fx51

I did that. Not working.
Touchpad scrolling works fine for us with Firefox 52.0 on the following devices:

- Asus laptop with Win 10 64-bit, driver 8.0.0.23 from 2015-11-11. This one seems to be the latest driver for this device. 
I've install Synaptics 19.1.3.6 version and seen the incompatibility pop-up. Touchpad was not responding so I uninstalled it.

- Dell laptop with Win 10 Pro 32-bit. Synaptics Gesture Suite 15.3 is installed with 19.0.15.2 driver version. The "Update driver" button is disabled here 

- Dell laptop with touch screen, Win 10 Insider Preview build 64-bit: driver version is 19.0.15.2 - the latest one and we cannot install another one manually 

Please let us know if testing the try build is still needed considering comment 26.
Flags: needinfo?(florin.mezei)
Flags: needinfo?(andrei.vaida)
https://hg.mozilla.org/mozilla-central/rev/f2262b093262
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Is this really fixed? Comment #26 seems to suggest otherwise.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: FIXED → ---
Target Milestone: mozilla55 → ---
(In reply to Martin Kozhukliev from comment #26)
> I did that. Not working.

Thanks. I'll back out the patch then, since there's no point keeping it in the tree. I'm not sure what else could be causing this.
Should we consider preffing off touch events until we have a better handle one what's going on?
Flags: needinfo?(bugmail)
Martin, do you mind sharing the make and model of your laptop?
Comment on attachment 8845548 [details]
Bug 1345355 - Don't register a window as touch-enabled if there's no touch device supported.

Backed out: https://hg.mozilla.org/integration/mozilla-inbound/rev/e1b07f3c9b337c75b46f298417dc71a90ee58a4b
Attachment #8845548 - Flags: checkin-
(In reply to Ryan VanderMeulen [:RyanVM] from comment #32)
> Martin, do you mind sharing the make and model of your laptop?

This would be very helpful! I found your driver here [1] but no indication what type of device this is associated with.

[1] Synaptics PS/2 Port TouchPad Driver 19.1.3.6 for Windows 10 64-bit
http://drivers.softpedia.com/get/KEYBOARD-and-MOUSE/Synaptics/Synaptics-PS-2-Port-TouchPad-Driver-19-1-3-6-for-Windows-10-64-bit.shtml
(In reply to Ryan VanderMeulen [:RyanVM] from comment #31)
> Should we consider preffing off touch events until we have a better handle
> one what's going on?

We should consider it. I'm not yet convinced this is a widespread issue since I feel like I would have heard more noise about it by now but this is the only report. Usually there's at least a few reports on reddit/HN or something and word reaches me somehow.
Flags: needinfo?(bugmail)
(In reply to Ryan VanderMeulen [:RyanVM] from comment #32)
> Martin, do you mind sharing the make and model of your laptop?

It's Acer V5-473G

Furthermore, it used to work perfectly prior the update to version 52. For years. Nothing else changed on the machine.
Flags: needinfo?(martin)
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #30)
> Thanks. I'll back out the patch then, since there's no point keeping it in
> the tree. I'm not sure what else could be causing this.

I wonder if WinUtils::IsTouchDeviceSupportPresent is actually returning true on his laptop even though there's no touchscreen.

Martin, can you please try the following:
1) Ensure layers.async-pan-zoom.enabled is true and dom.w3c_touch_events.enabled is "2"
2) Load the page at https://people-mozilla.org/~kgupta/bug/1345355.html and let me know what it says

Thanks again!
Flags: needinfo?(martin)
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #37)
> (In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #30)
> > Thanks. I'll back out the patch then, since there's no point keeping it in
> > the tree. I'm not sure what else could be causing this.
> 
> I wonder if WinUtils::IsTouchDeviceSupportPresent is actually returning true
> on his laptop even though there's no touchscreen.
> 
> Martin, can you please try the following:
> 1) Ensure layers.async-pan-zoom.enabled is true and
> dom.w3c_touch_events.enabled is "2"
> 2) Load the page at https://people-mozilla.org/~kgupta/bug/1345355.html and
> let me know what it says
> 
> Thanks again!

Confirmed:

layers.async-pan-zoom.enabled is true
dom.w3c_touch_events.enabled is "2"

The page returns: window.TouchEvent is defined: true
Flags: needinfo?(martin)
Ok, thanks! So for some reason windows is detecting a touch device on your laptop. Do you have any external accessories plugged in (e.g. a tablet or pen-enabled device, or anything else of that nature)? If not, then I guess it must be detecting the touchpad as a touch device. Can you check to see if there are any driver updates available?
After reading a bunch of MSDN docs I haven't found anything we are doing wrong in terms of detecting touch. I even checked the Chromium source and it looks like they are doing the same thing we do: their detection [1] and enabling of touch [2] are the same. Any ideas on where to go from here would be great.

[1] https://cs.chromium.org/chromium/src/ui/base/touch/touch_device_win.cc?type=cs&q=IsTouchDevicePresent+package:%5Echromium$&l=14
[2] https://cs.chromium.org/chromium/src/ui/views/win/hwnd_message_handler.cc?q=RegisterTouchWindow+package:%5Echromium$&l=1358&dr=C
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #39)
> Ok, thanks! So for some reason windows is detecting a touch device on your
> laptop. Do you have any external accessories plugged in (e.g. a tablet or
> pen-enabled device, or anything else of that nature)? If not, then I guess
> it must be detecting the touchpad as a touch device. Can you check to see if
> there are any driver updates available?

Nothing really. It happened immediately after the browser update. No new hardware, software, of anything I've changed. Actually I was using Firefox when I got the message for the update, I restarted the browser after the update and the vertical scroll just stopped working.

P.S. No driver updates so far.
(In reply to Martin Kozhukliev from comment #41)
> Nothing really. It happened immediately after the browser update. No new
> hardware, software, of anything I've changed. Actually I was using Firefox
> when I got the message for the update, I restarted the browser after the
> update and the vertical scroll just stopped working.

For what it's worth, there's no doubt that changes we made in Firefox 52 are part of the cause here. But it's more a matter of the changes in Firefox *interacting with some part of your system* that's the problem. What I'm trying to determine is what part of your system it's interacting with. e.g. If you had an external accessory plugged in to your laptop while using Firefox 51, it would be fine, but then after upgrading to Firefox 52 it would result in this misbehaviour. But if you unplug the accessory, it goes back to working normally. In such a scenario it's a combination of our changes and the accessory that are the problem. If we can figure out what part of your system is the "other half" of the problem we can try to work around it in Firefox. That's why we're trying to find out as much as we can about your hardware/system/drivers setup. It doesn't have to be "new hardware or software", it is most likely something that was already there.
one other report from a user with an ACER ASPIRE VS-571: https://support.mozilla.org/t5/Firefox/Issues-with-touchpad/m-p/1377298#M1039902
I was able to reproduce the issue on an unused (broken display) ACER V5-471P Win 10 64-bit touchscreen laptop that IT found.

By default, 2 fingers scrolling is not working, so I installed Synaptics PS/2 Port TouchPad Driver 19.1.3.6 (driver from comment 34). After restarting. 2 finger scrolling works in "natural" direction on all apps. 
For Nightly, the regression entered with bug 1180706, although scrolling looks fragmented there.

https://people-mozilla.org/~kgupta/bug/1345355.html testcase shows "true", which should be fine here as this device has touch support.

The try build from comment 20 also doesn't work for me and I've check that the driver is up-to-date.

Please let me know if I can help in debugging further.
Blocks: 1180706
Looks like ASPIRE V5-471P *actually* has a touchscreen. So "Don't register a window as touch-enabled if there's no touch device supported." is obviously useless. We will need a different approach to workaround or fix the problem.
(In reply to Masatoshi Kimura [:emk] from comment #46)
> Looks like ASPIRE V5-471P *actually* has a touchscreen. So "Don't register a
> window as touch-enabled if there's no touch device supported." is obviously
> useless. We will need a different approach to workaround or fix the problem.

Indeed. In the short term (for 52) we might still want to do this though. For the long-term we'll need to find out how to get WM_TOUCH events from the touchscreen while still also getting events (which I assume are WM_GESTURE) from the touchpad. The documentation for RegisterTouchWindow explicitly says it prevents WM_GESTURE events [1].

Petruta - can you try using Chrome on that laptop and see if it has different behaviour? Specifically I would like to know whether the two-finger scrolling works, and what the page at https://people-mozilla.org/~kgupta/bug/1345355.html says. Thanks!

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/dd371578(v=vs.85).aspx
Flags: needinfo?(petruta.rasa)
one other report in a german forum - Acer Aspire V5-573G & synaptics driver version 19.1.3.6 again:
https://www.camp-firefox.de/forum/viewtopic.php?f=1&t=120263
Acer laptop:
- Chrome version 57.0.2987.98: - two-finger scrolling is working and the value returned for window.TouchEvent is defined: is true.
- Edge 25.10586.0.0: - scrolling works here too and the page returns false.

As a note, I have "window.TouchEvent is defined: true" on my main Win 10 64-bit PC (so no touchscreen nor touchpad) on Chrome 57.0.2987.98.
Flags: needinfo?(petruta.rasa)
Could you try the build at https://queue.taskcluster.net/v1/task/ZHk4sOcrRcCCUGU3JePL3Q/runs/0/artifacts/public/build/firefox-55.0a1.en-US.win64.zip and see if the touchpad scrolling works properly there (with dom.w3c_touch_events.enabled=2)? This build disables the touch event code (RegisterTouchWindow) if it detects a synaptics driver installed.
Flags: needinfo?(martin)
Here's how the scrolling works on the device I'm testing on:
- scrolling is not smooth
- during scrolling there's no mouse pointer (same as Edge)
- text gets selected often - when this happens the Firefox taskbar icon appears as unfocused 

As far as I can tell the above behavior is the same as on Firefox 51.0, so that change fixed this issue. Hopefully Martin will confirm.
(In reply to Petruta Rasa [QA] [:petruta] from comment #51)
> Here's how the scrolling works on the device I'm testing on:
> - scrolling is not smooth
> - during scrolling there's no mouse pointer (same as Edge)
> - text gets selected often - when this happens the Firefox taskbar icon
> appears as unfocused 

Hopefully this refers to touch scrolling - mousewheel/touchpad scrolling should still be smooth at least (because APZ will be enabled, just not for touch).

> As far as I can tell the above behavior is the same as on Firefox 51.0, so
> that change fixed this issue. Hopefully Martin will confirm.

Yeah, the build just disables touch support on devices with synaptics drivers, so it rolls back to 51.0 behaviour with respect to touch.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #52)
> Hopefully this refers to touch scrolling - mousewheel/touchpad scrolling
> should still be smooth at least (because APZ will be enabled, just not for
> touch).
I tested touchpad scrolling, sorry for not mentioning it.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #50)
> Could you try the build at
> https://queue.taskcluster.net/v1/task/ZHk4sOcrRcCCUGU3JePL3Q/runs/0/
> artifacts/public/build/firefox-55.0a1.en-US.win64.zip and see if the
> touchpad scrolling works properly there (with
> dom.w3c_touch_events.enabled=2)? This build disables the touch event code
> (RegisterTouchWindow) if it detects a synaptics driver installed.

I can confirm same results as on Comment 51:

1. Scrolling not smooth at all.
2. No mouse pointer while scrolling.
3. Random text selection.
(In reply to Martin Kozhukliev from comment #54)
> I can confirm same results as on Comment 51:
> 
> 1. Scrolling not smooth at all.
> 2. No mouse pointer while scrolling.
> 3. Random text selection.

Can you confirm that this is the same behaviour you see in Firefox 51, or in Firefox 52 with dom.w3c_touch_events.enabled=0? It's a little confusing to me that you're saying the scrolling is not smooth at all, because if I understand correctly, it should have been either like this (on 51, or 52 with touchevents=0) or not working at all (on 52 with default touchevents). So I'm not sure what you're comparing it to when you say that it's not smooth.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #55)
> (In reply to Martin Kozhukliev from comment #54)
> > I can confirm same results as on Comment 51:
> > 
> > 1. Scrolling not smooth at all.
> > 2. No mouse pointer while scrolling.
> > 3. Random text selection.
> 
> Can you confirm that this is the same behaviour you see in Firefox 51, or in
> Firefox 52 with dom.w3c_touch_events.enabled=0? It's a little confusing to
> me that you're saying the scrolling is not smooth at all, because if I
> understand correctly, it should have been either like this (on 51, or 52
> with touchevents=0) or not working at all (on 52 with default touchevents).
> So I'm not sure what you're comparing it to when you say that it's not
> smooth.

Since I'm getting confised myself, I made a video, in which you can see the difference in scrolling smoothness between Firefox 51.0.1 and Chrome 57. So, please take a look at the video, I hope it's clearly visible.

https://youtu.be/W1lX9X3wNto
Ah, I see, thanks. So it does seem like the patch works in that it restores the behaviour back to the way it was in 51. However, it's hard to say how many people will end up with APZ touch support disabled when they didn't experience the regression, because we don't know exactly which devices/driver versions are affected.
Flags: needinfo?(martin)
Petruta (and Martin, if you get the chance), can you please do the following, using the laptop that reproduces this problem:

1) install the 32-bit build from https://treeherder.mozilla.org/#/jobs?repo=try&revision=e2dc31eefc8d240b41ca2d9a34d19baf7b008705
2) go to a scrollable page (such as this bugzilla page, https://bugzilla.mozilla.org/show_bug.cgi?id=1345355)
3) use the touchpad two-finger gesture to scroll down (you should be able to scroll, let me know if you're not able to)
4) go to chrome://global/content/aboutSynaptics.xhtml and copy what it says there.
5) go to about:config, add a new boolean pref with the name "ui.synaptics_touch.enabled" and value "true"
6) restart the browser
7) go to a scrollable page again, such as https://bugzilla.mozilla.org/show_bug.cgi?id=1345355
8) use the touchpad two-finger gesture to try to scroll down (most likely it will not work, that's expected)
9) go to chrome://global/content/aboutSynaptics.xhtml and copy what it says there

Please confirm that you are able to scroll on step 3, that you cannot scroll on step 9, and don't try to scroll with anything other than the two-finger touchpad gesture. Please also include the output from steps 4 and 10.

Thanks!
Flags: needinfo?(petruta.rasa)
I'm taking this over from Petruta.

(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #58)
> Please confirm that you are able to scroll on step 3
Confirmed, but with issues, as in comment 54
> that you cannot scroll on step 9
Confirmed

> Please also include the output from steps 4 and 10.
Step 4:
Synaptics driver: 19 . 1
Gesture: 1066 976 976
Touch: 0
Wheel: 0 0
window.TouchEvent is: true

Step 10:
Synaptics driver: 19 . 1
Gesture: 0 0 0
Touch: 158
Wheel: 0 0
window.TouchEvent is: true
Flags: needinfo?(petruta.rasa)
Thanks! I'm surprised that in step 4 you got "window.TouchEvent is true" instead of false. Can you confirm that you did this on a clean profile (or at least one where the dom.w3c_touch_events.enabled pref is set to the default value of 2)?


Other than that it seems like the Synaptics touchpad is indeed sending WM_TOUCH events so maybe we need to implement our own gesture detector for two-finger scroll gestures to make this work properly. That's going to be hard for me to do without access to one of these devices.
Flags: needinfo?(paul.silaghi)
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #61)
> Can you confirm that you did this on a clean profile
Yes, I've tried on a clean profile
Flags: needinfo?(paul.silaghi)
From the discussion here and talking to kats it sounds like we don't really understand what's going wrong on those devices yet, and so don't have a patch we're all that happy with.  The issue doesn't seem as widespread as we initially feared, so I'm going to wontfix this for 52 to give us more time to figure out a fix we're more confident with, and hopefully get that in the next release.
I experience this on v52. What could be interesting is that I forced-enabled e10s on v51 to get the nice momentum with the touchscreen -- it wasn't enabled because of the touchscreen -- without hitting the issue we see here.

I'll give more information when I access the device tonight.
(In reply to Julien Wajsberg [:julienw] from comment #64)
> I experience this on v52. What could be interesting is that I forced-enabled
> e10s on v51 to get the nice momentum with the touchscreen -- it wasn't
> enabled because of the touchscreen -- without hitting the issue we see here.

That's odd. On 51, did you manually change the value of dom.w3c_touch_events.enabled? Because that pref was set to 0 in 51 release (it only rode the trains in 52). Which means you would have been getting non-APZ touch scrolling with just e10s force-enabled and no other changes. And because of bug 1187439 the non-APZ touch scrolling code in e10s should not have had inertia/momentum scrolling. So I'm not sure what you were seeing.
Sorry, I don't remember so I don't want to give wrong information :/ Most likely you're right and what I did improved the situation and I thought it was enabling everything.
So it is a synaptics touchpad, the driver is version 19.1.3.6, the one coming with Windows 10.
So we should add a version check to unblock newer Synaptic drivers?
Steps from comment 58, in a brand new profile:

step3: I can scroll, but this isn't smooth (like it is with dom.w3c_touch_events.enabled set to 0 on v52)
step4:
Synaptics driver: 19 . 1
Gesture: 95 87 87
Touch: 0
Wheel: 0 0
window.TouchEvent is: true

step8: doesn't scroll anymore
step9:
Synaptics driver: 19 . 1
Gesture: 0 0 0
Touch: 51
Wheel: 0 0
window.TouchEvent is: true

Note this laptop does have a touchscreen. Scrolling with the touchscreen is working but not so good in step4, and working very smoothly in step9.
Scrolling with the touchscreen is also very smooth on v52 with dom.w3c_touch_events.enabled = 0 -- but not exactly the same momentum.
> Scrolling with the touchscreen is also very smooth on v52 with dom.w3c_touch_events.enabled = 0 -- but not exactly the same momentum.

Forget about this, e10s and thus APZ weren't enabled when I tested at that moment in v52.
Thanks for the info! I think the next step here is that I put together a build which logs details of the WM_TOUCH events that the touchpad is sending us so we can figure out how to convert them into scrolling. I'll try to do that today.

(In reply to Masatoshi Kimura [:emk] from comment #68)
> So we should add a version check to unblock newer Synaptic drivers?

I'm not sure what you mean here. I didn't land any patches to block Synaptic drivers, are you talking about some pre-existing check?
Julien, can you try with this build on a clean profile?

https://treeherder.mozilla.org/#/jobs?repo=try&revision=a145cc2b8f894f042094fa2918f4e29dd51d9699

1) Install the build (Win 8 x64 is probably a good one)
2) go to a scrollable page (such as this bugzilla page, https://bugzilla.mozilla.org/show_bug.cgi?id=1345355)
3) use the touchpad two-finger gesture to scroll down (it should not work)
4) go to chrome://global/content/aboutSynaptics.xhtml and copy what it says there.

It should have a bunch of output for the WM_TOUCH events that we got from the OS, and hopefully that will give me some idea of how to translate that to scrolling.
Flags: needinfo?(felash)
Here is the output I get. I hope it will make sense!

I started the build once, tried to scoll down then up. Then I restarted firefox once again and only scrolled down. I tell you this just in case this was persistent :)

Synaptics driver: 19 . 1
Gesture: 0 0 0
Touch: 111 111
Wheel: 0 0
[1 | 82100 48100 619044b 3496 0x1a 0x4 263311218 0 200 200]
[1 | 82100 48100 619044b 3496 0x19 0x4 263311219 0 200 200]
[2 | 82100 48100 619044b 3496 0x19 0x4 263311219 0 200 200| 82100 48100 619044b 3497 0xa 0x4 263311219 0 200 200]
[2 | 82100 48100 619044b 3496 0x19 0x4 263311219 0 200 200| 82100 48100 619044b 3497 0x9 0x4 263311219 0 200 200]
[2 | 82100 47100 619044b 3496 0x19 0x4 263311233 0 200 200| 82100 47100 619044b 3497 0x9 0x4 263311233 0 200 200]
[2 | 82100 44100 619044b 3496 0x19 0x4 263311240 0 200 200| 82100 44100 619044b 3497 0x9 0x4 263311240 0 200 200]
[2 | 82100 43000 619044b 3496 0x19 0x4 263311251 0 200 200| 82100 43000 619044b 3497 0x9 0x4 263311251 0 200 200]
[2 | 82100 40100 619044b 3496 0x19 0x4 263311263 0 200 200| 82100 40100 619044b 3497 0x9 0x4 263311263 0 200 200]
[2 | 82100 38800 619044b 3496 0x19 0x4 263311274 0 200 200| 82100 38800 619044b 3497 0x9 0x4 263311274 0 200 200]
[2 | 82100 36400 619044b 3496 0x19 0x4 263311285 0 200 200| 82100 36400 619044b 3497 0x9 0x4 263311285 0 200 200]
[2 | 82100 35300 619044b 3496 0x19 0x4 263311296 0 200 200| 82100 35300 619044b 3497 0x9 0x4 263311296 0 200 200]
[2 | 82100 33000 619044b 3496 0x19 0x4 263311307 0 200 200| 82100 33000 619044b 3497 0x9 0x4 263311307 0 200 200]
[2 | 82100 31800 619044b 3496 0x19 0x4 263311319 0 200 200| 82100 31800 619044b 3497 0x9 0x4 263311319 0 200 200]
[2 | 82100 29600 619044b 3496 0x19 0x4 263311330 0 200 200| 82100 29600 619044b 3497 0x9 0x4 263311330 0 200 200]
[2 | 82100 28500 619044b 3496 0x19 0x4 263311340 0 200 200| 82100 28500 619044b 3497 0x9 0x4 263311340 0 200 200]
[2 | 82100 27200 619044b 3496 0x19 0x4 263311348 0 200 200| 82100 27200 619044b 3497 0x9 0x4 263311348 0 200 200]
[2 | 82100 27000 619044b 3496 0x19 0x4 263311363 0 200 200| 82100 27000 619044b 3497 0x9 0x4 263311363 0 200 200]
[2 | 82100 25000 619044b 3496 0x19 0x4 263311375 0 200 200| 82100 25000 619044b 3497 0x9 0x4 263311375 0 200 200]
[2 | 82100 24400 619044b 3496 0x19 0x4 263311385 0 200 200| 82100 24400 619044b 3497 0x9 0x4 263311385 0 200 200]
[2 | 82100 23400 619044b 3496 0x19 0x4 263311396 0 200 200| 82100 23400 619044b 3497 0x9 0x4 263311396 0 200 200]
[2 | 82100 23400 619044b 3496 0x19 0x4 263311406 0 200 200| 82100 23400 619044b 3497 0x9 0x4 263311406 0 200 200]
[2 | 82100 23400 619044b 3496 0x14 0x4 263311406 0 200 200| 82100 23400 619044b 3497 0x9 0x4 263311406 0 200 200]
[1 | 82100 23400 619044b 3497 0x4 0x4 263311406 0 200 200]
[1 | 82900 71100 619044b 3498 0x1a 0x4 263313281 0 200 200]
[1 | 82900 71100 619044b 3498 0x19 0x4 263313282 0 200 200]
[2 | 82900 71100 619044b 3498 0x19 0x4 263313282 0 200 200| 82900 71100 619044b 3499 0xa 0x4 263313282 0 200 200]
[2 | 82900 71100 619044b 3498 0x19 0x4 263313282 0 200 200| 82900 71100 619044b 3499 0x9 0x4 263313282 0 200 200]
[2 | 82900 67800 619044b 3498 0x19 0x4 263313293 0 200 200| 82900 67800 619044b 3499 0x9 0x4 263313293 0 200 200]
[2 | 82900 66600 619044b 3498 0x19 0x4 263313303 0 200 200| 82900 66600 619044b 3499 0x9 0x4 263313303 0 200 200]
[2 | 82900 63300 619044b 3498 0x19 0x4 263313314 0 200 200| 82900 63300 619044b 3499 0x9 0x4 263313314 0 200 200]
[2 | 82900 61900 619044b 3498 0x19 0x4 263313326 0 200 200| 82900 61900 619044b 3499 0x9 0x4 263313326 0 200 200]
[2 | 82900 59500 619044b 3498 0x19 0x4 263313337 0 200 200| 82900 59500 619044b 3499 0x9 0x4 263313337 0 200 200]
[2 | 82900 58300 619044b 3498 0x19 0x4 263313348 0 200 200| 82900 58300 619044b 3499 0x9 0x4 263313348 0 200 200]
[2 | 82900 56500 619044b 3498 0x19 0x4 263313360 0 200 200| 82900 56500 619044b 3499 0x9 0x4 263313360 0 200 200]
[2 | 82900 55600 619044b 3498 0x19 0x4 263313370 0 200 200| 82900 55600 619044b 3499 0x9 0x4 263313370 0 200 200]
[2 | 82900 54500 619044b 3498 0x19 0x4 263313382 0 200 200| 82900 54500 619044b 3499 0x9 0x4 263313382 0 200 200]
[2 | 82900 54300 619044b 3498 0x19 0x4 263313393 0 200 200| 82900 54300 619044b 3499 0x9 0x4 263313393 0 200 200]
[2 | 82900 54100 619044b 3498 0x19 0x4 263313403 0 200 200| 82900 54100 619044b 3499 0x9 0x4 263313403 0 200 200]
[2 | 82900 53800 619044b 3498 0x19 0x4 263313415 0 200 200| 82900 53800 619044b 3499 0x9 0x4 263313415 0 200 200]
[2 | 82900 53600 619044b 3498 0x19 0x4 263313426 0 200 200| 82900 53600 619044b 3499 0x9 0x4 263313426 0 200 200]
[2 | 82900 53500 619044b 3498 0x19 0x4 263313438 0 200 200| 82900 53500 619044b 3499 0x9 0x4 263313438 0 200 200]
[2 | 82900 53500 619044b 3498 0x19 0x4 263313447 0 200 200| 82900 53500 619044b 3499 0x9 0x4 263313447 0 200 200]
[2 | 82900 53500 619044b 3498 0x19 0x4 263313455 0 200 200| 82900 53500 619044b 3499 0x9 0x4 263313455 0 200 200]
[2 | 82900 53500 619044b 3498 0x19 0x4 263313475 0 200 200| 82900 53500 619044b 3499 0x9 0x4 263313475 0 200 200]
[2 | 82900 53500 619044b 3498 0x14 0x4 263313476 0 200 200| 82900 53500 619044b 3499 0x9 0x4 263313476 0 200 200]
[1 | 82900 53500 619044b 3499 0x4 0x4 263313476 0 200 200]
[1 | 82900 53500 619044b 3500 0x1a 0x4 263313781 0 200 200]
[1 | 82900 53500 619044b 3500 0x19 0x4 263313782 0 200 200]
[2 | 82900 53500 619044b 3500 0x19 0x4 263313782 0 200 200| 82900 53500 619044b 3501 0xa 0x4 263313782 0 200 200]
[2 | 82900 53500 619044b 3500 0x19 0x4 263313782 0 200 200| 82900 53500 619044b 3501 0x9 0x4 263313782 0 200 200]
[2 | 82900 50000 619044b 3500 0x19 0x4 263313792 0 200 200| 82900 50000 619044b 3501 0x9 0x4 263313792 0 200 200]
[2 | 82900 48300 619044b 3500 0x19 0x4 263313804 0 200 200| 82900 48300 619044b 3501 0x9 0x4 263313804 0 200 200]
[2 | 82900 45300 619044b 3500 0x19 0x4 263313814 0 200 200| 82900 45300 619044b 3501 0x9 0x4 263313814 0 200 200]
[2 | 82900 43800 619044b 3500 0x19 0x4 263313824 0 200 200| 82900 43800 619044b 3501 0x9 0x4 263313824 0 200 200]
[2 | 82900 41800 619044b 3500 0x19 0x4 263313836 0 200 200| 82900 41800 619044b 3501 0x9 0x4 263313836 0 200 200]
[2 | 82900 41800 619044b 3500 0x19 0x4 263313864 0 200 200| 82900 41800 619044b 3501 0x9 0x4 263313864 0 200 200]
[2 | 82900 41800 619044b 3500 0x14 0x4 263313864 0 200 200| 82900 41800 619044b 3501 0x9 0x4 263313864 0 200 200]
[1 | 82900 41800 619044b 3501 0x4 0x4 263313864 0 200 200]
[1 | 82900 41800 619044b 3502 0x1a 0x4 263314078 0 200 200]
[1 | 82900 41800 619044b 3502 0x19 0x4 263314079 0 200 200]
[2 | 82900 41800 619044b 3502 0x19 0x4 263314079 0 200 200| 82900 41800 619044b 3503 0xa 0x4 263314079 0 200 200]
[2 | 82900 41800 619044b 3502 0x19 0x4 263314079 0 200 200| 82900 41800 619044b 3503 0x9 0x4 263314079 0 200 200]
[2 | 82900 41200 619044b 3502 0x19 0x4 263314089 0 200 200| 82900 41200 619044b 3503 0x9 0x4 263314089 0 200 200]
[2 | 82900 38300 619044b 3502 0x19 0x4 263314100 0 200 200| 82900 38300 619044b 3503 0x9 0x4 263314100 0 200 200]
[2 | 82900 37200 619044b 3502 0x19 0x4 263314110 0 200 200| 82900 37200 619044b 3503 0x9 0x4 263314110 0 200 200]
[2 | 82900 34300 619044b 3502 0x19 0x4 263314122 0 200 200| 82900 34300 619044b 3503 0x9 0x4 263314122 0 200 200]
[2 | 82900 33400 619044b 3502 0x19 0x4 263314133 0 200 200| 82900 33400 619044b 3503 0x9 0x4 263314133 0 200 200]
[2 | 82900 30800 619044b 3502 0x19 0x4 263314144 0 200 200| 82900 30800 619044b 3503 0x9 0x4 263314144 0 200 200]
[2 | 82900 29600 619044b 3502 0x19 0x4 263314155 0 200 200| 82900 29600 619044b 3503 0x9 0x4 263314155 0 200 200]
[2 | 82900 27800 619044b 3502 0x19 0x4 263314166 0 200 200| 82900 27800 619044b 3503 0x9 0x4 263314166 0 200 200]
[2 | 82900 27800 619044b 3502 0x19 0x4 263314195 0 200 200| 82900 27800 619044b 3503 0x9 0x4 263314195 0 200 200]
[2 | 82900 27800 619044b 3502 0x14 0x4 263314195 0 200 200| 82900 27800 619044b 3503 0x9 0x4 263314195 0 200 200]
[1 | 82900 27800 619044b 3503 0x4 0x4 263314195 0 200 200]
[1 | 82900 27000 619044b 3504 0x1a 0x4 263314437 0 200 200]
[1 | 82900 27000 619044b 3504 0x19 0x4 263314438 0 200 200]
[2 | 82900 27000 619044b 3504 0x19 0x4 263314438 0 200 200| 82900 27000 619044b 3505 0xa 0x4 263314438 0 200 200]
[2 | 82900 27000 619044b 3504 0x19 0x4 263314438 0 200 200| 82900 27000 619044b 3505 0x9 0x4 263314438 0 200 200]
[2 | 82900 23600 619044b 3504 0x19 0x4 263314448 0 200 200| 82900 23600 619044b 3505 0x9 0x4 263314448 0 200 200]
[2 | 82900 21900 619044b 3504 0x19 0x4 263314460 0 200 200| 82900 21900 619044b 3505 0x9 0x4 263314460 0 200 200]
[2 | 82900 19300 619044b 3504 0x19 0x4 263314470 0 200 200| 82900 19300 619044b 3505 0x9 0x4 263314470 0 200 200]
[2 | 82900 17900 619044b 3504 0x19 0x4 263314481 0 200 200| 82900 17900 619044b 3505 0x9 0x4 263314481 0 200 200]
[2 | 82900 17900 619044b 3504 0x19 0x4 263314490 0 200 200| 82900 17900 619044b 3505 0x9 0x4 263314490 0 200 200]
[2 | 82900 17900 619044b 3504 0x14 0x4 263314491 0 200 200| 82900 17900 619044b 3505 0x9 0x4 263314491 0 200 200]
[1 | 82900 17900 619044b 3505 0x4 0x4 263314491 0 200 200]
[1 | 82900 17900 619044b 3506 0x1a 0x4 263314734 0 200 200]
[1 | 82900 17900 619044b 3506 0x19 0x4 263314735 0 200 200]
[2 | 82900 17900 619044b 3506 0x19 0x4 263314735 0 200 200| 82900 17900 619044b 3507 0xa 0x4 263314735 0 200 200]
[2 | 82900 17900 619044b 3506 0x19 0x4 263314735 0 200 200| 82900 17900 619044b 3507 0x9 0x4 263314735 0 200 200]
[2 | 82900 16900 619044b 3506 0x19 0x4 263314745 0 200 200| 82900 16900 619044b 3507 0x9 0x4 263314745 0 200 200]
[2 | 82900 13400 619044b 3506 0x19 0x4 263314756 0 200 200| 82900 13400 619044b 3507 0x9 0x4 263314756 0 200 200]
[2 | 82900 12100 619044b 3506 0x19 0x4 263314768 0 200 200| 82900 12100 619044b 3507 0x9 0x4 263314768 0 200 200]
[2 | 82900 9400 619044b 3506 0x19 0x4 263314778 0 200 200| 82900 9400 619044b 3507 0x9 0x4 263314778 0 200 200]
[2 | 82900 8000 619044b 3506 0x19 0x4 263314791 0 200 200| 82900 8000 619044b 3507 0x9 0x4 263314791 0 200 200]
[2 | 82900 5700 619044b 3506 0x19 0x4 263314801 0 200 200| 82900 5700 619044b 3507 0x9 0x4 263314801 0 200 200]
[2 | 82900 4600 619044b 3506 0x19 0x4 263314812 0 200 200| 82900 4600 619044b 3507 0x9 0x4 263314812 0 200 200]
[2 | 82900 3000 619044b 3506 0x19 0x4 263314822 0 200 200| 82900 3000 619044b 3507 0x9 0x4 263314822 0 200 200]
[2 | 82900 2300 619044b 3506 0x19 0x4 263314834 0 200 200| 82900 2300 619044b 3507 0x9 0x4 263314834 0 200 200]
[2 | 82900 2300 619044b 3506 0x19 0x4 263314852 0 200 200| 82900 2300 619044b 3507 0x9 0x4 263314852 0 200 200]
[2 | 82900 2300 619044b 3506 0x14 0x4 263314852 0 200 200| 82900 2300 619044b 3507 0x9 0x4 263314852 0 200 200]
[1 | 82900 2300 619044b 3507 0x4 0x4 263314852 0 200 200]
[1 | 82700 10000 619044b 3508 0x1a 0x4 263315156 0 200 200]
[1 | 82700 10000 619044b 3508 0x19 0x4 263315157 0 200 200]
[2 | 82700 10000 619044b 3508 0x19 0x4 263315157 0 200 200| 82700 10000 619044b 3509 0xa 0x4 263315157 0 200 200]
[2 | 82700 10000 619044b 3508 0x19 0x4 263315157 0 200 200| 82700 10000 619044b 3509 0x9 0x4 263315157 0 200 200]
[2 | 82700 7300 619044b 3508 0x19 0x4 263315168 0 200 200| 82700 7300 619044b 3509 0x9 0x4 263315168 0 200 200]
[2 | 82700 5900 619044b 3508 0x19 0x4 263315178 0 200 200| 82700 5900 619044b 3509 0x9 0x4 263315178 0 200 200]
[2 | 82700 3800 619044b 3508 0x19 0x4 263315189 0 200 200| 82700 3800 619044b 3509 0x9 0x4 263315189 0 200 200]
[2 | 82700 2800 619044b 3508 0x19 0x4 263315200 0 200 200| 82700 2800 619044b 3509 0x9 0x4 263315200 0 200 200]
[2 | 82700 2800 619044b 3508 0x19 0x4 263315207 0 200 200| 82700 2800 619044b 3509 0x9 0x4 263315207 0 200 200]
[2 | 82700 2800 619044b 3508 0x14 0x4 263315208 0 200 200| 82700 2800 619044b 3509 0x9 0x4 263315208 0 200 200]
[1 | 82700 2800 619044b 3509 0x4 0x4 263315208 0 200 200]
window.TouchEvent is: true
Flags: needinfo?(felash)
Thanks for the logs! So it looks like the touchpad is generating mostly normal touch events, except both points have the same x,y coordinates. Therefore the APZ code treats it as a pinch with zero span, and will bail out at [1] so we never end up panning. We could modify the APZ code to continue panning in this scenario, which would be pretty simple. A more correct but more involved fix would be to detect this in the widget code and generate PanGestureInput events instead of touch events. I feel that is better because then touch listeners don't end up cancelling touchpad acrolling which makes more sense to me. But for beta 53 it might be better to do the simple fix.

[1] http://searchfox.org/mozilla-central/rev/fd99701cafa324669d950ced902d08a7450cd48b/gfx/layers/apz/src/AsyncPanZoomController.cpp#1372
Julien, can you try the build at [1]? Hopefully trackpad scrolling will work on this build (but without momentum, probably). Also after checking if scrolling works, please go again to chrome://global/content/aboutSynaptics.xhtml and copy one of the touch event logging lines to this bug. I added some stuff so that it logs hardware identifiers at the end of the line after the touch points. That way if we need in the future we can cook up a custom panning gesture detector for this hardware. All the lines should have the same hardware info so just copying one line instead of the whole log should be sufficient.

[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=7e8a0adf25ab12ed5f6eb93bf3457500d5a28ca0
Flags: needinfo?(felash)
Attachment #8849634 - Attachment is obsolete: true
Attachment #8854055 - Flags: review?(botond)
Comment on attachment 8854055 [details] [diff] [review]
Allow zero-span pinch focus movement to scroll

Review of attachment 8854055 [details] [diff] [review]:
-----------------------------------------------------------------

Does OnScale() have the more general problem that we don't request repaints during two-finger scrolling (since the setting of the pinch paint timer happens inside the doScale block)?

Also, this change is gtestable. Gtests can make nice mentored bugs (e.g. bug 1204502), so we could file one as a follow-up.
Attachment #8854055 - Flags: review?(botond) → review+
(In reply to Botond Ballo [:botond] from comment #77)
> Does OnScale() have the more general problem that we don't request repaints
> during two-finger scrolling (since the setting of the pinch paint timer
> happens inside the doScale block)?

Oh, that's a good point. I added some stuff to the early-exit to schedule a repaint and update the shared frame metrics.

> Also, this change is gtestable. Gtests can make nice mentored bugs (e.g. bug
> 1204502), so we could file one as a follow-up.

I'll try and write the test in this bug rather than doing it as a follow-up. I'd like to get this patch uplifted and having some test coverage would be help in that respect.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #78)
> (In reply to Botond Ballo [:botond] from comment #77)
> > Does OnScale() have the more general problem that we don't request repaints
> > during two-finger scrolling (since the setting of the pinch paint timer
> > happens inside the doScale block)?
> 
> Oh, that's a good point. I added some stuff to the early-exit to schedule a
> repaint and update the shared frame metrics.

I realize now that I misunderstood your comment. You're talking about the pre-existing issue wherein we never trigger a repaint if [1] is false. That does look like a bug, yes. We should probably add an else clause there that requests a repaint. I'll file something for that. But I was introducing the same problem in another spot in my patch, which I've fixed locally.

[1] http://searchfox.org/mozilla-central/rev/b8cce081200129a1307e2a682f121135b5ca1d19/gfx/layers/apz/src/AsyncPanZoomController.cpp#1415
Attached patch GtestSplinter Review
Attachment #8855379 - Flags: review?(botond)
Updated to trigger repaint request and shared frame metrics update. Carrying r+
Attachment #8854055 - Attachment is obsolete: true
Attachment #8855383 - Flags: review+
I'm going to land the fix so we can get it tested on nightly before uplift. Marking leave-open for the gtest.
Keywords: leave-open
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b401f13fa3a
Allow pinch gestures with a zero span change but a nonzero focus change to scroll. r=botond
Attachment #8855379 - Flags: review?(botond) → review+
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ac8fcfa12ddb
Add a gtest for a pinch with zero span but changing focus. r=botond
I couldn't find the time to test the build at home yet; it's still on my radar but I won't be able to do it before next week.
https://hg.mozilla.org/mozilla-central/rev/6b401f13fa3a
https://hg.mozilla.org/mozilla-central/rev/ac8fcfa12ddb
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Hi Kats, should we uplift this to 53? We enter RC week on Monday so the bar is pretty high, mainly limited to sec/stability issues or dot release drivers. I am not sure if this one meets the bar but if the fix is low risk we might reconsider. 

Liz fyi.
Flags: needinfo?(lhenry)
Flags: needinfo?(bugmail)
(In reply to Ritu Kothari (:ritu) from comment #87)
> Hi Kats, should we uplift this to 53? We enter RC week on Monday so the bar
> is pretty high, mainly limited to sec/stability issues or dot release
> drivers. I am not sure if this one meets the bar but if the fix is low risk
> we might reconsider. 

The fix is reasonably low risk but hasn't yet been verified on Nightly. That probably won't happen until next week.

Petruta, can you check on your device that was able to reproduce this problem if it's fixed now on a build with these patches?
Flags: needinfo?(bugmail) → needinfo?(petruta.rasa)
I'm hesitating to uplift to 53 here, because we aren't sure the problem was widespread in 52.
Flags: needinfo?(lhenry)
I used 55.0a1 2017-04-09 build on an Aspire V5 Acer device and the results are:
- two finger touchpad scrolling works now, but it's not async (it's also slow / fragmented)
- little squares are still visible on display where the mouse icon is located and are constantly changing position

I've made a gif so that it's more clear.
Flags: needinfo?(petruta.rasa)
(In reply to Petruta Rasa [QA] [:petruta] from comment #90)
> - two finger touchpad scrolling works now, but it's not async (it's also
> slow / fragmented)

How can you tell if it's async or not? I'm not surprised that it's slow/fragmented though.

> - little squares are still visible on display where the mouse icon is
> located and are constantly changing position
> 
> I've made a gif so that it's more clear.

Thanks. I was seeing the squares locally as well but not nearly as much. I think it happens because of how the trackpad events are treated as touches. I think we'll need to implement the gesture detection ASAP (per comment 74) to improve the experience here.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #91)
> How can you tell if it's async or not? I'm not surprised that it's
> slow/fragmented though.
 
It only scrolls while my fingers are on the touchpad. 
When gif recorder tool is opened above Nightly, the page scrolls down async (after more tries, when the page is scrolled almost to it's half), but not up.
(In reply to Petruta Rasa [QA] [:petruta] from comment #92)
> (In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #91)
> > How can you tell if it's async or not? I'm not surprised that it's
> > slow/fragmented though.
>  
> It only scrolls while my fingers are on the touchpad. 

Ah, ok. We call that momentum scrolling. Sync/async refers to whether or not it's running on the main thread, which is a separate aspect. And yeah, scrolling with a pinch gesture (which is what this is doing) doesn't yet have momentum scrolling, so that's expected for now.

> When gif recorder tool is opened above Nightly, the page scrolls down async
> (after more tries, when the page is scrolled almost to it's half), but not
> up.

Hm, interesting.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #93)
> scrolling with a pinch gesture (which is what this is doing) doesn't yet
> have momentum scrolling

It will very soon (bug 1180799).
I filed bug 1355162 for adding gesture detection for these touchpad devices.
Comment on attachment 8855383 [details] [diff] [review]
Allow zero-span pinch focus movement to scroll (v2)

Approval Request Comment
[Feature/Bug causing the regression]: Enabling APZ/touch support on Windows
[User impact if declined]: can't scroll using some synaptics touchpads (with the two-finger pan gesture)
[Is this code covered by automated tests?]: yes
[Has the fix been verified in Nightly?]: yes. the fix isn't great but it's better than nothing. I have filed a follow-up for fixing it better
[Needs manual test from QE? If yes, steps to reproduce]: already done for nightly
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: not really
[Why is the change risky/not risky?]: this fix corrects an omission in the original pinch-zoom code, which is quite well understood. low likelihood of any regressions
[String changes made/needed]: none
Attachment #8855383 - Flags: approval-mozilla-aurora?
Comment on attachment 8855379 [details] [diff] [review]
Gtest

Approval Request Comment - see previous request. this is a test that goes with.
Attachment #8855379 - Flags: approval-mozilla-aurora?
Too late for 53 but maybe this will test ok on 54 aurora.
While I agree that not uplifting this to 53 is the right call for now, I should point out that the frequency at which users encounter this issue will likely be higher on 53 than it was on 52. This is because on 53 we enabled e10s for 64-bit builds on touch devices, whereas on 52 we only had it enabled for 32-bit builds. If we look at the telemetry for TOUCH_ENABLED_DEVICE, the 64-bit population is just over 5% while the 32-bit population is just under 5%. I don't know how many of our users are using 32-bit builds vs 64-bit builds, but assuming they're equal then we would expect a doubling in the number of users encountering this problem.
I do think we'll want to take this on ESR52 eventually too. Certainly don't need to rush that, though.
Comment on attachment 8855379 [details] [diff] [review]
Gtest

Fix a regression issue that touchpad (Synaptics) stopped working. Aurora54+.
Attachment #8855379 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8855383 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
At last I could test latest nightly on the problematic computer. I tried both 32b and 64b builds, each time on a clean profile. Both worked, including with a momentum. We see the squares when we touch the touchpad.

I'll look closer tonight how this behaves compared to Chrome and IE. When I tried this morning I had the feeling it was still not as good as in IE. Yet this is for a separate bug, this bug is now fixed.

I wish this could go to the next release but this is likely too late now :/
Flags: needinfo?(felash)
Status: RESOLVED → VERIFIED
(In reply to Julien Wajsberg [:julienw] from comment #103)
> At last I could test latest nightly on the problematic computer.

Thanks for testing! It would still be useful to me if you ran the build in comment 75 and reported the hardware identifiers so that I know how to detect these synaptics touchpads for when we do gesture detection.
I'm thinking we'll want to take this on ESR52 too?
Flags: needinfo?(bugmail)
Comment on attachment 8855383 [details] [diff] [review]
Allow zero-span pinch focus movement to scroll (v2)

[Approval Request Comment]
If this is not a sec:{high,crit} bug, please state case for ESR consideration: On some windows touchpad devices, scrolling via the touchpad is broken. It's unclear how widespread this issue is but it is really bad for users that do experience it, to the point that the browser could be considered unusable. For a long release like ESR it would be really nice to fix this.
User impact if declined: ^
Fix Landed on Version: 55, uplifted to 54
Risk to taking this patch (and alternatives if risky): fairly low risk. the codepath getting hit is in the touch gesture handling code in APZ which is not hit in most desktop configurations, so there's effectively zero risk for those configurations.
String or UUID changes made by this patch: none

See https://wiki.mozilla.org/Release_Management/ESR_Landing_Process for more info.
Flags: needinfo?(bugmail)
Attachment #8855383 - Flags: approval-mozilla-esr52?
Comment on attachment 8855379 [details] [diff] [review]
Gtest

Test that goes with the patch.
Attachment #8855379 - Flags: approval-mozilla-esr52?
Hey kats,

I could try the build from comment 75. I took the Windows 2012 x64 build because the artifacts from Win8 x64 were already deleted.

The touchpad indeed worked (what a surprise :) ).
Here is a line from the aboutSynaptics diagnostic file:

[2 | 53500 41200 d02e1 393 0x19 0x4 693629681 0 200 200| 53500 41200 d02e1 394 0x9 0x4 693629681 0 200 200| hid: 0 0 1 13 4| 22 1023 \\?\VIRTUAL_DIGITIZER]

Hope this helps :)
Thanks Julien! That's exactly what I wanted.
Comment on attachment 8855383 [details] [diff] [review]
Allow zero-span pinch focus movement to scroll (v2)

The browser is usable if you run into this bug with no workaround, the severity justifies uplift to ESR52.2
Attachment #8855383 - Flags: approval-mozilla-esr52? → approval-mozilla-esr52+
Attachment #8855379 - Flags: approval-mozilla-esr52? → approval-mozilla-esr52+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: