Closed Bug 456621 Opened 17 years ago Closed 16 years ago

Kinetic properties should be configurable

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Windows XP
defect
Not set
minor

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.
Assignee: nobody → blassey
Flags: wanted-fennec1.0+
Target Milestone: --- → Fennec A2
Severity: normal → minor
Target Milestone: Fennec A2 → Fennec A4
Attached patch Proposed fix to this bug (obsolete) — Splinter Review
Attachment #361864 - Flags: review?(gavin.sharp)
Attached patch A better fix for the bug (obsolete) — Splinter Review
Attachment #361864 - Attachment is obsolete: true
Attachment #361877 - Flags: review?(gavin.sharp)
Attachment #361864 - Flags: review?(gavin.sharp)
Attached patch Now with a typo less :) (obsolete) — Splinter Review
Attachment #361877 - Attachment is obsolete: true
Attachment #361877 - Flags: review?(gavin.sharp)
Attachment #361886 - Attachment is patch: true
Attachment #361886 - Flags: review?(gavin.sharp)
tracking-fennec: --- → ?
tracking-fennec: ? → 1.0-
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-
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?
Sure, either way.
Attached patch Updated with comments (obsolete) — Splinter Review
Attachment #361886 - Attachment is obsolete: true
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????
Attachment #365867 - Flags: review?(gavin.sharp)
Attachment #365867 - Flags: review?(gavin.sharp) → review-
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.
Attachment #365867 - Attachment is obsolete: true
Attachment #367040 - Flags: review?(gavin.sharp)
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 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)
Attachment #367210 - Flags: review?(gavin.sharp)
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 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)
Bug 503362 adds some configuration prefs
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
verified with beta3
Status: RESOLVED → VERIFIED
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.

Attachment

General

Created:
Updated:
Size: