Unhandled String value for pref [ui.scrolling.fling_accel_base_multiplier]

RESOLVED FIXED in Firefox 37

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: kats, Assigned: kats)

Tracking

37 Branch
Firefox 37
All
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(firefox37 fixed)

Details

Attachments

(1 attachment)

See https://bugzilla.mozilla.org/show_bug.cgi?id=1117010#c5 wherein rnewman points out I screwed up the prefs in browser.js. I made them strings instead of multiplied-by-1000 int values. Fix coming shortly.
status-firefox37: --- → affected
Component: Panning and Zooming → Graphics, Panning and Zooming
Product: Core → Firefox for Android
Version: 37 Branch → Firefox 37
Created attachment 8547608 [details] [diff] [review]
Patch
Attachment #8547608 - Flags: review?(rnewman)
Comment on attachment 8547608 [details] [diff] [review]
Patch

Review of attachment 8547608 [details] [diff] [review]:
-----------------------------------------------------------------

Sounds fair!

N.B., I noticed that getFloatPref takes an int as its fallback value, which is a little confusing.

::: mobile/android/base/gfx/Axis.java
@@ +121,5 @@
>          FLING_ACCEL_BASE_MULTIPLIER = getFloatPref(prefs, PREF_FLING_ACCEL_BASE_MULTIPLIER, 1000);
>          FLING_ACCEL_SUPPLEMENTAL_MULTIPLIER = getFloatPref(prefs, PREF_FLING_ACCEL_SUPPLEMENTAL_MULTIPLIER, 1000);
>          Log.i(LOGTAG, "Prefs: " + FRICTION_SLOW + "," + FRICTION_FAST + "," + VELOCITY_THRESHOLD + ","
>                  + MAX_EVENT_ACCELERATION + "," + OVERSCROLL_DECEL_RATE + "," + SNAP_LIMIT + "," + MIN_SCROLLABLE_DISTANCE);
> +        Log.i(LOGTAG, "Fling prefs: " + FLING_ACCEL_INTERVAL + "," + FLING_ACCEL_BASE_MULTIPLIER + "," + FLING_ACCEL_SUPPLEMENTAL_MULTIPLIER);

Log.d, if you need to keep this?
Attachment #8547608 - Flags: review?(rnewman) → review+
(In reply to Richard Newman [:rnewman] from comment #2)
> N.B., I noticed that getFloatPref takes an int as its fallback value, which
> is a little confusing.

Yeah. We represent these "floats" as ints, which are then divided by 1000. I don't recall where this convention came from, but in the rest of Gecko we just store floats as strings (hence this bug happening in the first place).


> > +        Log.i(LOGTAG, "Fling prefs: " + FLING_ACCEL_INTERVAL + "," + FLING_ACCEL_BASE_MULTIPLIER + "," + FLING_ACCEL_SUPPLEMENTAL_MULTIPLIER);
> 
> Log.d, if you need to keep this?

I ended up just taking it out, it's not really needed.

https://hg.mozilla.org/integration/fx-team/rev/81877ee96549
https://hg.mozilla.org/mozilla-central/rev/81877ee96549
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
Oh nice. I guess no need to uplift then :)
status-firefox37: affected → fixed
You need to log in before you can comment on or make changes to this bug.