Changeset 156924 in webkit for trunk/Source/WebCore/page/Page.cpp


Ignore:
Timestamp:
Oct 4, 2013, 4:25:55 PM (12 years ago)
Author:
[email protected]
Message:

../WebCore: Unify rubberband control
https://bugs.webkit.org/show_bug.cgi?id=122341

Reviewed by Tim Horton.

  • Consolidates the two ways we were passing state about whether to rubber-band on a particular edge down to one.
  • WebCore.exp.in:
  • page/Page.cpp:
  • page/Page.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::isRubberBandInProgress):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::ScrollingTree):
(WebCore::ScrollingTree::setCanRubberBandState):
(WebCore::ScrollingTree::rubberBandsAtLeft):
(WebCore::ScrollingTree::rubberBandsAtRight):
(WebCore::ScrollingTree::rubberBandsAtBottom):
(WebCore::ScrollingTree::rubberBandsAtTop):
(WebCore::ScrollingTree::willWheelEventStartSwipeGesture):

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:
  • page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:

(WebCore::ScrollingTreeScrollingNodeMac::shouldRubberBandInDirection):

../WebKit2: Unify rubber-band control
https://bugs.webkit.org/show_bug.cgi?id=122341

Reviewed by Tim Horton.

  • Consolidates the two ways we were passing state about whether to rubber-band on a particular edge down to one.
  • Adds SPI to control whether you can rubber band on the left or right edge.
  • Add a linked-on-or-after check to control whether we use the legacy implicit rubber band control based on back/forward.
  • UIProcess/API/C/WKPage.cpp:

(WKPageRubberBandsAtLeft):
(WKPageSetRubberBandsAtLeft):
(WKPageRubberBandsAtRight):
(WKPageSetRubberBandsAtRight):
(WKPageRubberBandsAtBottom):
(WKPageSetRubberBandsAtBottom):

  • UIProcess/API/C/WKPage.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::rubberBandsAtLeft):
(WebKit::WebPageProxy::setRubberBandsAtLeft):
(WebKit::WebPageProxy::rubberBandsAtRight):
(WebKit::WebPageProxy::setRubberBandsAtRight):
(WebKit::WebPageProxy::rubberBandsAtTop):
(WebKit::WebPageProxy::setRubberBandsAtTop):
(WebKit::WebPageProxy::rubberBandsAtBottom):
(WebKit::WebPageProxy::setRubberBandsAtBottom):

  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::shouldUseLegacyImplicitRubberBandControl):
(WebKit::WebPageProxy::platformInitialize):

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::wheelEvent):

  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebPage/EventDispatcher.messages.in:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/page/Page.cpp

    r156876 r156924  
    838838}
    839839
    840 bool Page::rubberBandsAtBottom()
    841 {
    842     if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
    843         return scrollingCoordinator->rubberBandsAtBottom();
    844 
    845     return false;
    846 }
    847 
    848 void Page::setRubberBandsAtBottom(bool rubberBandsAtBottom)
    849 {
    850     if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
    851         scrollingCoordinator->setRubberBandsAtBottom(rubberBandsAtBottom);
    852 }
    853 
    854 bool Page::rubberBandsAtTop()
    855 {
    856     if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
    857         return scrollingCoordinator->rubberBandsAtTop();
    858 
    859     return false;
    860 }
    861 
    862 void Page::setRubberBandsAtTop(bool rubberBandsAtTop)
    863 {
    864     if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
    865         scrollingCoordinator->setRubberBandsAtTop(rubberBandsAtTop);
    866 }
    867 
    868840void Page::setPagination(const Pagination& pagination)
    869841{
Note: See TracChangeset for help on using the changeset viewer.