Closed Bug 1207656 Opened 9 years ago Closed 9 years ago

APZ mouse wheel scroll duration is too long - doesn't take minimum duration into account

Categories

(Core :: Panning and Zooming, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: avih, Assigned: avih)

References

Details

Attachments

(1 file)

When scrolling with the mouse wheel with APZ, the duration is always 400ms instead of varying between 200-400ms depending on scroll speed. This makes it feel "slow and laggy" when the user wants to scroll quickly.

Without APZ, when scrolling the mouse wheel, the animation duration per "notch" varies between 200ms and 400ms (by default) according to the speed at which the mouse wheel is rolled, such that when it's rolled slowly one notch at a time, it will animate for 400ms to make it easier to follow the text, but when scrolled quickly, it would shorten the duration to 200ms to adhere to the user being in a hurry (same distance per notch regardless).

The duration can also be in between those extremes depending on the scroll speed.

Relevant preferences for the wheel:
> general.smoothScroll.mouseWheel.durationMaxMS = 400
> general.smoothScroll.mouseWheel.durationMinMS = 200

And this defines globally how to interpret "quickly"/"slowly" - the higher this value, the quicker the user will have to scroll in order to shorten the animation duration:
> general.smoothScroll.durationToIntervalRatio = 200

The bug is that this ratio value is expressed as percentage at the pref, but should be converted to "normal" ratio by dividing it by 100 before using it. Without this conversion, the ratio is too high, effectively always interpreting it as "slow" and hence ending up with always 400ms animation.

Apparently this conversion requirement got lost in translation when the APZ wheel scroll code was modelled after the code at nsGfxScrollFrame.cpp .

I'll post a patch.
Attached patch bug1207656.patchSplinter Review
Attachment #8664940 - Flags: review?(dvander)
Blocks: 1199468
Attachment #8664940 - Flags: review?(dvander) → review+
https://hg.mozilla.org/mozilla-central/rev/270ae5ad91c9
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: