Closed
Bug 503362
Opened 16 years ago
Closed 16 years ago
kinetic scrolling needs help
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: dougt, Assigned: dougt)
Details
Attachments
(1 file, 1 obsolete file)
|
5.80 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
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.
| Assignee | ||
Comment 1•16 years ago
|
||
Attachment #387710 -
Flags: review?(pavlov)
| Assignee | ||
Comment 2•16 years ago
|
||
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.
| Assignee | ||
Comment 3•16 years ago
|
||
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 4•16 years ago
|
||
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-
| Assignee | ||
Updated•16 years ago
|
Attachment #387710 -
Flags: review- → review?(pavlov)
| Assignee | ||
Comment 5•16 years ago
|
||
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.
| Assignee | ||
Comment 6•16 years ago
|
||
Attachment #387710 -
Attachment is obsolete: true
Attachment #387923 -
Flags: review?
Attachment #387710 -
Flags: review?(pavlov)
Updated•16 years ago
|
Attachment #387923 -
Flags: review? → review+
Comment 7•16 years ago
|
||
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
| Assignee | ||
Comment 8•16 years ago
|
||
3a0ee33e76e7
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•