Bug 776030 (apz-fennec)

Allow Fennec to use the AsyncPanZoomController

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
7 years ago
2 years ago

People

(Reporter: kats, Assigned: rbarker)

Tracking

(Depends on 10 bugs, Blocks 3 bugs)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [technical-debt])

Attachments

(2 attachments)

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.
Blocks: 830750
Whiteboard: [technical-debt]
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.
Blocks: 745136
No longer blocks: 830750
Renaming this bug to scope it down to something a little more precise and manageable.
Summary: Merge the fennec PanZoomController.java and the gecko AsyncPanZoomController.cpp → Allow Fennec to use the AsyncPanZoomController
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.
Depends on: 881451
Depends on: 943557
Blocks: 943206
Status: ASSIGNED → NEW
No longer blocks: 657054
Duplicate of this bug: 657054
Blocks: 1042914
Blocks: 978438
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.
Blocks: 1041833
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
Blocks: 1070512
tracking-fennec: --- → 39+
Assignee: bugmail.mozilla → nobody
Blocks: 886969
No longer depends on: 886969
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).
Assignee: nobody → danilo.eu
Depends on: 1159405
tracking-fennec: 39+ → 42+
Depends on: 1162701
Depends on: 1163572
Blocks: 976531
Depends on: 1195553
Depends on: 1200393
Depends on: 1200397
Depends on: 1200399
Assignee: danilo.eu → rbarker
tracking-fennec: 42+ → Nightly+
Depends on: 1272478
tracking-fennec: Nightly+ → 48+
Duplicate of this bug: 775437
tracking-fennec: 48+ → ---
I'm going to close this bug, since Fennec is (and has been for a while now) using the C++ APZ code.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.