REGRESSION: Overlay scrollbars that have grown are sometimes askew in the track
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Mar 2014 20:22:03 +0000 (20:22 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Mar 2014 20:22:03 +0000 (20:22 +0000)
commitae5a842245a2b4ef14c8a1448e78186edb939ea3
tree1062a0921d2bdab9aaf22f7dc016c04fbaafcc51
parentaecb9fc7472577d10142623491bd9a66e21f5bb1
REGRESSION: Overlay scrollbars that have grown are sometimes askew in the track
https://bugs.webkit.org/show_bug.cgi?id=129691
-and corresponding-
<rdar://problem/15666846>

Reviewed by Simon Fraser.

This regression started happening after we adopted the setPresentationValue
ScrollbarPainter API which allows us to update the position of the scrollbar knob
from our secondary scrolling thread. The bug occurs when the scrollbar grows while
it still thinks it is in presentation-value mode. Whenever the scrollbar grows, it
should be in non-presentation value mode.

If the wheel event has ended or been cancelled, we can switch out of presentation
value mode.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):

Sometimes we will grow the scrollbar before we have received a wheel event with
the end or cancelled phase, and so automatically switch out of presentation-value
mode whenever we start one of these animations.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm
Source/WebCore/platform/mac/ScrollAnimatorMac.mm