Closed Bug 503362 Opened 16 years ago Closed 16 years ago

kinetic scrolling needs help

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: dougt, Assigned: dougt)

Details

Attachments

(1 file, 1 obsolete file)

our kinetic scrolling algorithm basically does an average over the entire set of mouse movements resulting in an unfair bias of old movements. For example, 2 or 3 very fast movements followed by a series of very slow movements will result in a kinetic scroll that is not representative of the final movements. instead of a running average, we should consider using an exponential moving average with a high alpha value (around .8). We should also make the alpha value, update interval, and the decelerataion rate preference based so that we can configure these on difference devices.
Attachment #387710 - Flags: review?(pavlov)
Comment on attachment 387710 [details] [diff] [review] patch v.1 (no preferences for alpha, updateInterval, or decel) one can ignore the changes to the mobile.js file.
also, lowering the update interval does seem to make a big difference. it is as if we can't keep up with our painting resulting in a gray screen.
Comment on attachment 387710 [details] [diff] [review] patch v.1 (no preferences for alpha, updateInterval, or decel) please don't use tabs: + let panned = self._owner._dragBy(dx, dy); + if (!panned) { you don't seem to be using the prefs you're setting..
Attachment #387710 - Flags: review?(pavlov) → review-
Attachment #387710 - Flags: review- → review?(pavlov)
Comment on attachment 387710 [details] [diff] [review] patch v.1 (no preferences for alpha, updateInterval, or decel) stuart, i do not think I added any tabs (what was there was there). I can untabify this file before I check in.
Attached patch patch v.2Splinter Review
Attachment #387710 - Attachment is obsolete: true
Attachment #387923 - Flags: review?
Attachment #387710 - Flags: review?(pavlov)
Attachment #387923 - Flags: review? → review+
Comment on attachment 387923 [details] [diff] [review] patch v.2 >+ this._updateInterval = gPrefService.getIntPref("browser.ui.kinetic.updateInterval"); >+ // In preferences this value is an int. We divide so that it can be between 0 and 1; >+ this._emaAlpha = gPrefService.getIntPref("browser.ui.kinetic.ema.alphaValue") / 10; >+ // In preferences this value is an int. We device so that it can be a percent. "We divide ..." > if ((mbLast.sx == sx && mbLast.sy == sy) || mbLast.t == now) { >- return; >+ return; > } nit: Remove braces
3a0ee33e76e7
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
verified with beta3
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: