Scrollbars still show sometimes even when WKPageSetSuppressScrollbarAnimations()
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 May 2013 02:29:22 +0000 (02:29 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 May 2013 02:29:22 +0000 (02:29 +0000)
commite89e146f684dd96713168b94ee455e7bfb168d80
treea998217c6a1fa2fd5cde7d4da08f57389ec0b94b
parent28183f50ebe3c984a0fc356c6be053f8e8e22e70
Scrollbars still show sometimes even when WKPageSetSuppressScrollbarAnimations()
is set
https://bugs.webkit.org/show_bug.cgi?id=116493
-and corresponding-
<rdar://problem/13912871>

Reviewed by Dean Jackson.

We need to be more aggressive with our approach since AppKit may still ask the
scrollbars to paint here.

scrollbarAnimationsAreSuppressed() will allow us to find out if the setting has
been set.
* page/FrameView.cpp:
(WebCore::FrameView::scrollbarAnimationsAreSuppressed):
* page/FrameView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollbarAnimationsAreSuppressed):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scrollbarAnimationsAreSuppressed):
* rendering/RenderListBox.h:

Don’t allow animations if scrollbars are suppressed.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):

Call cancelAnimations() to prevent a just-started animation from continuing.
(WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/platform/ScrollableArea.h
Source/WebCore/platform/mac/ScrollAnimatorMac.mm
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderListBox.h