Closed Bug 1223609 Opened 9 years ago Closed 9 years ago

Update MotionEventHelper.java to work with C++APZ

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox45 fixed)

RESOLVED FIXED
Firefox 45
Tracking Status
firefox45 --- fixed

People

(Reporter: rbarker, Assigned: rbarker)

References

Details

Attachments

(1 file)

The functions dragAsync and flingAsync do not work with C++APZ. Function dragAsync needs to account for the touch start tolerance when calculating drag distance. Function flingAsync needs to ensure that the touch up event time is later than the last touch move event time.
Assignee: nobody → rbarker
Blocks: 1206872
Component: Panning and Zooming → Graphics, Panning and Zooming
Product: Core → Firefox for Android
Is there a reason you didn't want to just drop the touch_start_tolerance to 0 instead, and then do a 1-pixel drag? That's what we do at [1] for example. I feel like that's a more robust solution in general.

[1] http://mxr.mozilla.org/mozilla-central/source/gfx/layers/apz/test/mochitest/test_basic_pan.html?rev=97f3299a0c38&force=1#43
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2)
> Is there a reason you didn't want to just drop the touch_start_tolerance to
> 0 instead, and then do a 1-pixel drag? That's what we do at [1] for example.
> I feel like that's a more robust solution in general.
> 
> [1]
> http://mxr.mozilla.org/mozilla-central/source/gfx/layers/apz/test/mochitest/
> test_basic_pan.html?rev=97f3299a0c38&force=1#43

I tried that first and it didn't work. Because the down event and move event are at the same location, there is no change in position and the axis lock in C++APZ fails and always locks to the x axis. I have a patch to fix that issue so that APZC doesn't transition from Touching to Panning until the movement is non zero. Unfortunately, this cause the drag to loose about 5 pixels since basically the first move event is ignored. Additionally, this makes the test closer to real world conditions which might be worth loss of robustness.
https://hg.mozilla.org/mozilla-central/rev/c30ece891309
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
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: