Closed
Bug 456621
Opened 17 years ago
Closed 16 years ago
Kinetic properties should be configurable
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(fennec1.0-)
VERIFIED
INVALID
fennec1.0b2
| Tracking | Status | |
|---|---|---|
| fennec | 1.0- | --- |
People
(Reporter: blassey, Assigned: blassey)
Details
Attachments
(1 file, 7 obsolete files)
Stuff like the threshold to start a kinetic pan, the rate it slows down and the number of events to track should be kept in prefs. I don't think we need UI to adjust them though, this is the sort of thing about:config was made for.
Updated•17 years ago
|
Assignee: nobody → blassey
Flags: wanted-fennec1.0+
Updated•17 years ago
|
Target Milestone: --- → Fennec A2
Updated•17 years ago
|
Severity: normal → minor
Target Milestone: Fennec A2 → Fennec A4
Comment 1•16 years ago
|
||
Attachment #361864 -
Flags: review?(gavin.sharp)
Comment 2•16 years ago
|
||
Attachment #361864 -
Attachment is obsolete: true
Attachment #361877 -
Flags: review?(gavin.sharp)
Attachment #361864 -
Flags: review?(gavin.sharp)
Comment 3•16 years ago
|
||
Attachment #361877 -
Attachment is obsolete: true
Attachment #361877 -
Flags: review?(gavin.sharp)
Updated•16 years ago
|
Attachment #361886 -
Attachment is patch: true
Updated•16 years ago
|
Attachment #361886 -
Flags: review?(gavin.sharp)
Updated•16 years ago
|
tracking-fennec: --- → ?
Updated•16 years ago
|
tracking-fennec: ? → 1.0-
Comment 4•16 years ago
|
||
Comment on attachment 361886 [details] [diff] [review]
Now with a typo less :)
>diff --git a/app/mobile.js b/app/mobile.js
>+pref("browser.ui.panning.deadtime", 200); // A panning gesture longer than this in millisecs will be accepted
How about "amount of time to wait after a click until a panning gesture is detected."?
>+pref("browser.ui.panning.deadzone", 100); // A panning gesture longer than the square root of this in pixels will be accepted
Seems like we should move the square root calculation into the code, and change this to 10.
>+pref("browser.ui.panning.acceleration", -4); // The acceleration the screen will expirience after the mouse let go of it (/1000)
s/expirience/experience/
>+pref("browser.ui.panning.buffersize", 3); // The number of samples to detect gesture speed
nit: bufferSize
"The number of past mouse events used to determine gesture speed"?
nit: s/buffersize/bufferSize/
>diff --git a/chrome/content/InputHandler.js b/chrome/content/InputHandler.js
> function KineticPanningModule(owner) {
> this._owner = owner;
>+ this._kineticData.reset();
> }
> function PanningModule(owner) {
> this._owner = owner;
>+ this._dragData.reset();
> }
I wonder if it makes sense to have these initialize lazily to avoid impacting startup... probably won't make much of a difference.
> reset: function() {
>+ let prefsvc = Components.classes["@mozilla.org/preferences-service;1"].
>+ getService(Components.interfaces.nsIPrefBranch2);
nit: this indentation is weird, add some leading spaces before the getService call on the second line (also applies to the other identical method).
>+ this.kineticDecelloration = prefsvc.getIntPref("browser.ui.panning.acceleration")/-1000;
I suppose this was here before, but this should be "kineticDeceleration".
r- because the patch needs updating, but looks OK otherwise.
Attachment #361886 -
Flags: review?(gavin.sharp) → review-
Comment 5•16 years ago
|
||
Fair comments, if there is a spelling mistake in kineticDecelloration, how about we then fix it properly and change it to kineticAcceleration and put a "-" in front of it in the places it is used?
Comment 6•16 years ago
|
||
Sure, either way.
Comment 7•16 years ago
|
||
Attachment #361886 -
Attachment is obsolete: true
Comment 8•16 years ago
|
||
Note, after making the different "constants" for the kinetic scrolling dynamic, I have played around with it a little, you can get some strange behavior, by e.g. setting the deadtime and deadzone to 1, you won't be able to select bookmarks from the bookmark menu????
Updated•16 years ago
|
Attachment #365867 -
Flags: review?(gavin.sharp)
Updated•16 years ago
|
Attachment #365867 -
Flags: review?(gavin.sharp) → review-
Comment 9•16 years ago
|
||
Comment on attachment 365867 [details] [diff] [review]
Updated with comments
>diff --git a/app/mobile.js b/app/mobile.js
>+// amount of time a click should last before a panning gesture is detected.
>+pref("browser.ui.panning.deadtime", 200);
(in milliseconds)
>diff --git a/chrome/content/InputHandler.js b/chrome/content/InputHandler.js
> ChromeInputModule.prototype = {
> reset: function reset() {
>+ this.deadZone = prefsvc.getIntPref("browser.ui.panning.deadzone")^2;
^ is XOR, you want Math.pow().
> function ContentPanningModule(owner, useKinetic) {
> reset: function reset() {
>+ prefsvc.getIntPref("browser.ui.panning.deadzone")^2;
>+ this.kineticAccelleration =
kineticAccelleration -> kineticAcceleration
You also didn't remove the default value for kineticDecelloration.
I've noticed some trailing whitespace on some of the lines changed by this patch, should get rid of those too.
Comment 10•16 years ago
|
||
Attachment #365867 -
Attachment is obsolete: true
Attachment #367040 -
Flags: review?(gavin.sharp)
Comment 11•16 years ago
|
||
The loading of preferences was done in the frequently called reset functions, it has now moved to the initialisation code.
Attachment #367040 -
Attachment is obsolete: true
Attachment #367104 -
Flags: review?(gavin.sharp)
Attachment #367040 -
Flags: review?(gavin.sharp)
Comment 12•16 years ago
|
||
Comment on attachment 367104 [details] [diff] [review]
Moved configuration load out of reset function
Merge error found in the proposed patch
Attachment #367104 -
Attachment is obsolete: true
Attachment #367104 -
Flags: review?(gavin.sharp)
Comment 13•16 years ago
|
||
Attachment #367210 -
Flags: review?(gavin.sharp)
Comment 14•16 years ago
|
||
Comment on attachment 367210 [details] [diff] [review]
Lets see if it got correct this time
Missing one replacement of kineticDecelloration, and you're not making use of the timeoutValueForStartDetection in the ContentPanningModule. Looks good otherwise...
Attachment #367210 -
Flags: review?(gavin.sharp) → review-
Comment 15•16 years ago
|
||
Attachment #367210 -
Attachment is obsolete: true
Attachment #367301 -
Flags: review?(gavin.sharp)
Comment 16•16 years ago
|
||
Comment on attachment 367301 [details] [diff] [review]
Updated with the issues found in the previous review, I think I must owe a beer or two to the reviewer at this point ;)
Never mind reviewing this anymore, the tree has moved far, far away from what this patch was made to fit.
Attachment #367301 -
Flags: review?(gavin.sharp)
Comment 17•16 years ago
|
||
Bug 503362 adds some configuration prefs
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Comment 19•16 years ago
|
||
sorry for bug spam.
Many of the bugs which are marked invalid, I see comments telling it occurred in one version or other. But later it was fixed due to 1) by backingout the patch which made regression or 2) by fixing some other bug.
So if we can identify the bug/patch/reason then we should state that and mark those as FIXED. If not mark as WORKSFORME in that case.
You need to log in
before you can comment on or make changes to this bug.
Description
•