https://bugs.webkit.org/show_bug.cgi?id=59048
Need to track whether overlay scrollbar is currently visible and in lower-
righthand corner
-and corresponding-
<rdar://problem/9211232>

Reviewed by Dan Bernstein.

Source/WebCore: 

Whenever we start a new ScrollbarPartAnimation, check if the scrollbar is vertical 
and showing (alpha of 1), and if so, call setVisibleScrollerThumbRect with the 
knob rect, otherwise with an empty rect. ScrollAnimatorMac has a local rect to 
track this value so that it can avoid sending messages across the ChromeClient to 
the UIProcess if the rect has not changed.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):

Plumbing for the chrome client.
* page/ChromeClient.h:
(WebCore::ChromeClient::notifyScrollerThumbIsVisibleInRect):
* page/FrameView.cpp:
(WebCore::FrameView::setVisibleScrollerThumbRect):
* page/FrameView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::setVisibleScrollerThumbRect):

New WebCoreSystemInterface function to get the knob rect.
* WebCore.exp.in:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

Source/WebKit/mac: 

A new WebSystemInterface is needed for this.
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

Source/WebKit2: 

WebPageProxy now stores an IntRect of the scroller thumb set by WebCore through 
the client.

_windowResizeMouseLocationIsInVisibleScrollerThumb tests if the parameter point is 
inside the cached scroller thumb rect.
* UIProcess/API/mac/WKView.mm:
(-[WKView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):

Client work to cache the rect.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::notifyScrollerThumbIsVisibleInRect):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::visibleScrollerThumbRect):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::notifyScrollerThumbIsVisibleInRect):
* WebProcess/WebCoreSupport/WebChromeClient.h:

New WebSystemInterface is needed by WebCore for this.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed