mac: Fix scrollbar flickering.
mac: Fix scrollbar flickering.

WebScrollbarPartAnimationTimer::stop() was being used in two different contexts
with different intended effects. It was being called in
WebScrollbarPartAnimationTimer::timerFired() with the intended effect: stop the
animation timer and set the progress to 1. It was being called by the owner of
WebScrollbarPartAnimationTimer with the intended effect: stop the animation
timer. I changed the implementation of timerFired() to not call stop().

Aside: WebScrollbarPartAnimationTimer was intended as a drop-in replacement for
NSAnimation. Through manual testing of NSAnimation, I determined that
[NSAnimation stopAnimation] does not result in a call to [NSAnimation
setCurrentProgress:]. I changed the behavior of stop() to match the behavior of
[NSAnimation stopAnimation].

Furthermore, the implementation of timerFired() was implicitly relying on the
assumption that WTF::currentTime() is monotonically increasing. It was
theoretically possible for timerFired() to invoke setCurrentProgress: with a
negative progress. I updated the logic in timerFired() to clamp the progress to
[0, 1].

BUG=421629

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

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@187191 bbb929c8-8fbe-4397-9dbb-9b2b20218538

primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs