Closed Bug 637936 Opened 9 years ago Closed 9 years ago

Kinetic panning sometimes fails when swiping away from a sidebar

Categories

(Firefox for Android Graveyard :: Panning/Zooming, defect)

defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mbrubeck, Assigned: mbrubeck)

References

Details

Attachments

(2 files)

Steps to reproduce:
1. Open a web page and zoom in.
2. Drag to open the left sidebar.
3. Swipe quickly to pan away from the left sidebar.

Expected results: Kinetic panning should cause Fennec to keep panning until it reaches the other side of the page.  It will stop before opening the right sidebar (bug 607657).

Actual results: Kinetic panning does not happen; scrolling stops in the middle of the page, as soon as your finger is lifted from the screen.

This happens because doffset.x at this point often has values like 4.76e-7 that are *almost* but not exactly zero.  We need to round it to the nearest pixel before comparing it.
Attached patch patchSplinter Review
Attachment #516286 - Flags: review?(ben)
Comment on attachment 516286 [details] [diff] [review]
patch

I wonder if there's a place further up the stream where this makes more sense to fix, but this is what I would have done too at this point. :)
Attachment #516286 - Flags: review?(ben) → review+
http://hg.mozilla.org/mobile-browser/rev/112625ae1e63
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Attached patch followupSplinter Review
Can't use "dx" as a variable name because it is a parameter of this function.  This patch just changes the name.
Attachment #516464 - Flags: review?(mark.finkle)
Attachment #516464 - Flags: review?(mark.finkle) → review+
Verified:

Mozilla/5.0 (Android; Linux armv71; rv:2.0b13pre)
Gecko/20110317 Firefox/4.0b13pre Fennec/4.0b6pre.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.