Closed Bug 776030 (apz-fennec) Opened 12 years ago Closed 7 years ago

Allow Fennec to use the AsyncPanZoomController

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kats, Assigned: rbarker)

References

(Depends on 2 open bugs, Blocks 1 open bug)

Details

(Whiteboard: [technical-debt])

Attachments

(2 files)

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
No longer blocks: multi-apzc
Depends on: 943557
Blocks: 943206
Status: ASSIGNED → NEW
No longer blocks: 657054
Alias: apz-fennec
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.
No longer blocks: 978438
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
No longer depends on: 897017
tracking-fennec: --- → 39+
Assignee: bugmail.mozilla → nobody
Blocks: 886969
No longer depends on: 886969
No longer depends on: apz-threadsafe
Attached file 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).
Assignee: nobody → danilo.eu
Depends on: 1159405
tracking-fennec: 39+ → 42+
Depends on: 1162701
Depends on: 1163572
Blocks: 976531
No longer blocks: 1168867
No longer depends on: 1178847
No longer depends on: 1131359
Depends on: 1195553
Depends on: 1200393
Depends on: 1200397
Depends on: 1200399
Assignee: danilo.eu → rbarker
tracking-fennec: 42+ → Nightly+
No longer depends on: 1189875
No longer depends on: 1122804
No longer depends on: 1225936
No longer depends on: 1202020
No longer blocks: 886969
No longer blocks: 1035876
No longer blocks: 1041833
No longer blocks: 1047127
No longer blocks: 1070512
No longer blocks: 1104280
No longer blocks: 1174492
No longer blocks: 1167854
No longer blocks: 1203349
No longer blocks: 1186765
No longer blocks: 1221241
No longer blocks: 1206620
Depends on: 1272478
tracking-fennec: Nightly+ → 48+
No longer blocks: 745136
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: 7 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: