-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=110006 Patch by Conrad Shultz <conrad_shultz@apple.com> on 2013-02-19 Reviewed by Tim Horton. Source/WebCore: Add API to allow matching changes in WebKit2 to control rubber-banding behavior at vertical page extrema. If rubber-banding is disabled during a scroll event that would otherwise trigger rubber-banding, dispatch didNotHandleWheelEvent() to the page UI client. * WebCore.exp.in: Export new rubber-banding API. * page/Page.cpp: (WebCore): (WebCore::Page::rubberBandsAtBottom): Proxy for the corresponding function in ScrollingCoordinator. (WebCore::Page::setRubberBandsAtBottom): Ditto. (WebCore::Page::rubberBandsAtTop): Ditto. (WebCore::Page::setRubberBandsAtTop): Ditto. * page/Page.h: (Page): Declare new rubber-banding API (above). * page/scrolling/ScrollingCoordinator.h: (WebCore::ScrollingCoordinator::rubberBandsAtBottom): Stub API implementation. (WebCore::ScrollingCoordinator::setRubberBandsAtBottom): Ditto. (WebCore::ScrollingCoordinator::rubberBandsAtTop): Ditto. (WebCore::ScrollingCoordinator::setRubberBandsAtTop): Ditto. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::ScrollingTree): Initialize new member variables. (WebCore::ScrollingTree::setMainFramePinState): Set top/bottom pinned states. (WebCore::ScrollingTree::rubberBandsAtBottom): New accessor function. (WebCore::ScrollingTree::setRubberBandsAtBottom): New mutator function. (WebCore::ScrollingTree::rubberBandsAtTop): New accessor function. (WebCore::ScrollingTree::setRubberBandsAtTop): New mutator function. (WebCore::ScrollingTree::willWheelEventStartSwipeGesture): Start a vertical swipe event if the frame is pinned at the top or bottom and associated rubber-banding is disabled. * page/scrolling/ScrollingTree.h: (ScrollingTree): Declare new rubber-banding API and associated member variables. * page/scrolling/mac/ScrollingCoordinatorMac.h: (ScrollingCoordinatorMac): Declare API overrides. * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::rubberBandsAtBottom): Method override; proxy to corresponding function in ScrollingTree. (WebCore::ScrollingCoordinatorMac::setRubberBandsAtBottom): Ditto. (WebCore::ScrollingCoordinatorMac::rubberBandsAtTop): Ditto. (WebCore::ScrollingCoordinatorMac::setRubberBandsAtTop): Ditto. * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: (WebCore::ScrollingTreeScrollingNodeMac::pinnedInDirection): Remove trailing whitespace. (WebCore::ScrollingTreeScrollingNodeMac::updateMainFramePinState): Calculate and pass vertical pinning state to ScrollingTree::setMainFramePinState(). Source/WebKit2: Add API to allow clients to selectively control rubber-banding at vertical page extrema. * UIProcess/API/C/WKPage.cpp: (WKPageRubberBandsAtBottom): Proxy for the corresponding function in WebCore::Page. (WKPageSetRubberBandsAtBottom): Ditto. (WKPageRubberBandsAtTop): Ditto. (WKPageSetRubberBandsAtTop): Ditto. * UIProcess/API/C/WKPage.h: Declare new API. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): Initialize new member variables. (WebKit::WebPageProxy::setRubberBandsAtBottom): New function; dispatches a matching message to the WebKit::WebPage. (WebKit::WebPageProxy::setRubberBandsAtTop): Ditto. * UIProcess/WebPageProxy.h: (WebPageProxy): Declare new API. (WebKit::WebPageProxy::rubberBandsAtBottom): New accessor function. (WebKit::WebPageProxy::rubberBandsAtTop): Ditto. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setRubberBandsAtBottom): New function; call the matching function on the associated WebCore::Page. (WebKit::WebPage::setRubberBandsAtTop): Ditto. * WebProcess/WebPage/WebPage.h: (WebPage): Declare new rubber-banding API. * WebProcess/WebPage/WebPage.messages.in: Declare new rubber-banding API. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
358feb17