Closed Bug 1113457 Opened 5 years ago Closed 5 years ago

Overscroll animation oscillates violently


(Core :: Panning and Zooming, defect)

Gonk (Firefox OS)
Not set





(Reporter: shinglyu, Assigned: botond)




(2 files)

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

*** Steps to Reproduce
1. Download this app ( 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
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+
Closed: 5 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.