[Webkit-unassigned] [Bug 135768] Implement scroll snapping animations on Mac

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 14 12:39:56 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=135768


Dean Jackson <dino at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #236597|review?                     |review+
               Flag|                            |




--- Comment #19 from Dean Jackson <dino at apple.com>  2014-08-14 12:40:00 PST ---
(From update of attachment 236597)
View in context: https://bugs.webkit.org/attachment.cgi?id=236597&action=review

> Source/WebCore/ChangeLog:18
> +        Implementing the scroll snap animations required for snapping in both overflow and mainframe areas on Mac. Since we receive a series
> +        of discrete wheel events, we need to predict the distance we need to traverse, compute the appropriate snap point, and then compute
> +        an animation curve to that location. The snap animations are split into two types: snapping, which handles letting go of the trackpad
> +        with zero velocity, and gliding, which handles flick gestures. In both cases, sinusoidal curves are used to ease animation to the target
> +        location. In the former case, the initial velocity is low, and increases to a maximum value during the middle of the animation before
> +        decreasing to 0. In the latter case, the curve is computed such that the initial velocity matches the user's scroll velocity, and the
> +        final velocity matches a lower final velocity that is somewhat arbitrarily computed. (See the FIXME in
> +        AxisScrollSnapOffsets::initializeGlideParameters). How the equations and constants were chosen is described in greater detail in the
> +        comments above AxisScrollSnapOffsets::computeGlideDelta and AxisScrollSnapOffsets::computeSnapDelta. Note that the final velocity should
> +        ideally be equal to 0. However, with this particular curve, this caused the animation to feel too slow near the snap point.
> +

Could you wrap this to a smaller column width?

> Source/WebCore/platform/mac/AxisScrollSnapAnimator.mm:33
> +const float inertialScrollPredictionFactor = 16.6789;

Does this really need to have so many significant digits? It makes it look like it is some scientific value we're not allowed to change. Would 16.7 be good enough?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list