Tweak the math in ScrollOffsetAnimationCurve::UpdateTarget.

The existing division-by-0 guard was not correct, since MaximumDimension can
return negative values.  This led to occasional wild jumps when scrolling up and
down quickly (because new_velocity had the wrong sign).

This patch addresses the sign issue and improves handling of cases where we have
a large current velocity and a small delta to the new target.

BUG=575
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1553603003

Cr-Commit-Position: refs/heads/master@{#367200}
2 files changed