Closed Bug 1091128 Opened 10 years ago Closed 10 years ago

Max velocity cap only applies when scrolling downwards/rightwards

Categories

(Core :: Panning and Zooming, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36
Tracking Status
b2g-v1.4 --- affected
b2g-v2.0 --- affected
b2g-v2.1 --- affected
b2g-v2.2 --- affected

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

The velocity cap added in bug 976035 only caps the upper bound of velocities, not the lower bound. So when scrolling upwards/leftwards there is effectively no cap.
Comment on attachment 8513717 [details] [diff] [review]
Take sign into consideration

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

Good catch!

::: gfx/layers/apz/src/Axis.cpp
@@ +48,5 @@
>    }
>  
>    float newVelocity = mAxisLocked ? 0.0f : (float)(mPos - aPos) / (float)(aTimestampMs - mPosTimeMs);
>    if (gfxPrefs::APZMaxVelocity() > 0.0f) {
> +    bool negative = (newVelocity < 0);

Let's call this 'velocityIsNegative'.
Attachment #8513717 - Flags: review?(botond) → review+
https://hg.mozilla.org/mozilla-central/rev/08655880fafc
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: