The default bug view has changed. See this FAQ.

Panning motion slows, then jerks

VERIFIED FIXED

Status

()

Firefox for Android
General
P1
normal
VERIFIED FIXED
5 years ago
8 months ago

People

(Reporter: johnath, Assigned: cwiiis)

Tracking

unspecified
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox11 fixed, fennec11+)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
Our current panning code seems to have ease-out/deceleration physics where it comes to a rest as the panning action completes. However, rather than coming to rest, it decelerates towards zero, and then jumps to a final position a bit further along the panning path.

It seems like we'd want panning to smoothly come to a stop - the jerk at the end feels wrong.

Dupe? Phone-specific? (I'm on a galaxy s2, latest nightly)
I'm pretty sure this is due to some combination of Gecko being slow to paint, CPU contention between Gecko and the compositor, and texture upload. Taking this bug since it's basically what I've been working on for the past few days.
Status: NEW → ASSIGNED
Assignee: nobody → pwalton
Actually, I think this specific bug is a regression that some of kats' work introduced. CC-ing him.

Updated

5 years ago
Assignee: pwalton → kgupta
The problem is changeset 4e745f151abd (bug 705114).
Yeah, this is a massive pain. If we can't rely on devices having sane touch events, I guess we should just use the system gesture detectors, which presumably have been tested by the manufacturer.
Created attachment 578182 [details] [diff] [review]
WIP patch.

Here's a WIP patch. Should basically be a rebased version of your (Cwiiis') patch from earlier that switched to gesture detectors. This regresses clicking on links, so it can't land as is, but it should be the basic idea.
Assignee: kgupta → pwalton
Attachment #578182 - Flags: feedback?(chrislord.net)
(Assignee)

Comment 6

5 years ago
Comment on attachment 578182 [details] [diff] [review]
WIP patch.

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

Good other than what's noted below. I'd have thought that combined with wesj's patch in bug #704579 that just went in, this should solve that tapping links no longer works.

::: mobile/android/base/ui/PanZoomController.java
@@ +249,3 @@
>          if (mState == PanZoomState.PANNING_LOCKED) {
>              // check to see if we should break the axis lock
> +            double angle = Math.atan2(distanceY, distanceX);    // range [-pi, pi]

This is not equivalent to what was there before - distanceX,distanceY are the distances moved since the last call to onScroll, where this expects the distance moved since the first touch event.

@@ -454,5 @@
>              PLUS,       // Overscrolled in the positive direction
>              BOTH,       // Overscrolled in both directions (page is zoomed to smaller than screen)
>          }
>  
> -        public float firstTouchPos;             /* Position of the first touch event on the current drag. */

We probably still want firstTouchPos for the comment above.
(Assignee)

Updated

5 years ago
Attachment #578182 - Flags: feedback?(chrislord.net) → feedback+
Duplicate of this bug: 706833

Updated

5 years ago
Priority: -- → P1
(Assignee)

Comment 8

5 years ago
Taking this - will have a fix soon.
Assignee: pwalton → chrislord.net
(Assignee)

Comment 9

5 years ago
Created attachment 578333 [details] [diff] [review]
Fix jerk after fling

This patch fixes the issue for me on my Galaxy Nexus.
Attachment #578333 - Flags: review?(kgupta)
Attachment #578333 - Flags: review?(kgupta) → review+
(Assignee)

Comment 10

5 years ago
http://hg.mozilla.org/projects/birch/rev/559d132a200e
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Samsung Galaxy SII (Android 2.3.4)
20111202040206
http://hg.mozilla.org/projects/birch/rev/e2a54aafac18
Status: RESOLVED → VERIFIED
OS: Mac OS X → Android
Hardware: x86 → ARM
tracking-fennec: --- → 11+
status-firefox11: --- → fixed
You need to log in before you can comment on or make changes to this bug.