Fennec's PanZoomController was forked into AsyncPanZoomController for B2G work. Eventually we should reconcile the two and merge them into a unified pan/zoom controller. This bug is to track the work that needs to be done for that. A general outline of the work that needs to be done is: - Extract an interface from the java PanZoomController - Implement a "native" version of the interface that delegates calls to an instance of AsyncPanZoomController stored in nsWindow - Eventually move the TouchEventHandler code into c++ as well. Currently some of this is merged into the C++ AsyncPanZoomController but it should probably be broken out into a separate class Also fennec's PanZoomController deals with viewport information mostly in device pixels, but the AsyncPanZoomController uses CSS pixels. Going forward it's probably best to stick to CSS pixels (although this may change depending on discussions with layout/gfx people) so switching java over to use CSS pixels might be a good idea as a first step.
kats, is this bug a dupe or a blocker of bug 745136?
I'll go with blocker. There might be some overlap between this bug and some of the other blockers of that bug though.
Renaming this bug to scope it down to something a little more precise and manageable.
Created attachment 744260 [details] [diff] [review] WIP - Add flag to switch to native APZC Making it a pref is a bit harder than I thought since we currently create the PZC before gecko is up, and there's a bunch of code in GeckoLayerClient that could potentially NPE if we move the creation to later. I can fix that up but probably won't have time to test it all today, so I'm posting this temporary WIP that adds a compile-time flag for it.
Related to 978438 and FWIW: - I think it is important for the accompanying documentation to point out that, when trying to disable default mouse event emulation from touch events, event.preventDefault() should ONLY be called from the touchend event. Otherwise any touchcancel or touchleave events are just not gonna happen. To me https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Touch_events lacks clarity on this.
Can someone please describe the behavior of the following on Gecko? On every other browser Chrome, Opera, Android, IE (pointerend), and Safari, a preventDefault() call on a touchend event prevents the mouse emulation. FireFox Android is failing again :-(
If by "mouse emulation" you are referring to the click event, then yes, that is a bug - we have bug 1016480 on file for that. The issue was only reported relatively recently so nobody has put together a fix for it yet, but if you're willing to help contribute I'd be happy to mentor you through fixing it.
Yes, that's what I mean. Well actually mousedown, mouseup, and click (maybe even a mouseover can't remember). I don't think I'm up for the challenge sorry. Cheers Richard Maher
Created attachment 8581864 [details] Current plan of work I put together a plan of how to tackle this, and Danilo is going to be working his way through this, starting this week. Posting it here just for reference if anybody else cares (and so that I can reference if it need be).