Closed Bug 1113457 Opened 10 years ago Closed 9 years ago

Overscroll animation oscillates violently

Categories

(Core :: Panning and Zooming, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: shinglyu, Assigned: botond)

References

Details

Attachments

(2 files)

Attached file Screen recording
*** Description
Overscroll animation in a packaged app oscillates violently.

*** Steps to Reproduce
1. Download this app (https://github.com/shinglyu/taipei-mrt-map/tree/502c31337c63e02c7d3c9ff41fbd607426e1eba6) and install it via WebIDE (Use commit 502c3133)
2. Open the app
3. Swipe to the right gently to trigger the left-edge overscroll animation.

*** Expected Results
Overscroll animation bounces and return to normal.

*** Actual Results
Overscroll animation oscillate violently and won't stop. (see the attachment)

*** Other Notes
This only happens when the <img> is 2.0 MB, smaller images won't cause this effect. 
Zoom-in to a very detailed view also won't trigger this effect. 
Open a hosted version of this app in a browser won't trigger it either.

*** Reproduction Frequency
80% (The app won't work when uploaded through certain version of WebIDE)

*** Build
Gaia-Rev        d22dfece04fc00457e8369c660c11f945b088d2f
Gecko-Rev       https://hg.mozilla.org/mozilla-central/rev/cb8ad2251c09
Build-ID        20141217160203
Version         37.0a1
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  40
FW-Date         Tue Oct 21 15:59:42 CST 2014
Bootloader      L1TC10011880
Component: Gaia::System → Graphics
Product: Firefox OS → Core
blocking-b2g: --- → 2.2?
Is this overscroll?
Flags: needinfo?(botond)
(In reply to Gregor Wagner [:gwagner] from comment #1)
> Is this overscroll?

It is! o_O

I'll investigate.
Assignee: nobody → botond
Flags: needinfo?(botond)
Component: Graphics → Panning and Zooming
Attached patch FixSplinter Review
The problem is that we model spring physics by approximating a curve (velocity vs. time) with small line segments.

Currently, the length of the line segments is equal to the length of time between samples.

In this example app, the animation is sampled very infrequently (once every 120-150 ms), because that's how often the compositor gets a chance to composite (this suggests a performance issue with the app that might be worth investigating independently). The resulting approximation to the curve is very bad, and in fact diverges.

This patch improves the approximation by breaking up a sample into smaller segments of length at most 1 ms.
Attachment #8545452 - Flags: review?(bugmail.mozilla)
Attachment #8545452 - Flags: review?(bugmail.mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/d65c9aa7d0ad
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
blocking-b2g: 2.2? → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: