Changeset 143418 in webkit


Ignore:
Timestamp:
Feb 19, 2013 5:42:47 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Allow UI clients to handle vertical wheel events.
https://bugs.webkit.org/show_bug.cgi?id=110006

Patch by Conrad Shultz <Conrad Shultz> 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.

Location:
trunk/Source
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r143417 r143418  
     12013-02-19  Conrad Shultz  <conrad_shultz@apple.com>
     2
     3        Allow UI clients to handle vertical wheel events.
     4        https://bugs.webkit.org/show_bug.cgi?id=110006
     5
     6        Reviewed by Tim Horton.
     7
     8        Add API to allow matching changes in WebKit2 to control rubber-banding behavior at vertical page extrema.
     9        If rubber-banding is disabled during a scroll event that would otherwise trigger rubber-banding, dispatch
     10        didNotHandleWheelEvent() to the page UI client.
     11
     12        * WebCore.exp.in:
     13        Export new rubber-banding API.
     14
     15        * page/Page.cpp:
     16        (WebCore):
     17        (WebCore::Page::rubberBandsAtBottom):
     18        Proxy for the corresponding function in ScrollingCoordinator.
     19        (WebCore::Page::setRubberBandsAtBottom):
     20        Ditto.
     21        (WebCore::Page::rubberBandsAtTop):
     22        Ditto.
     23        (WebCore::Page::setRubberBandsAtTop):
     24        Ditto.
     25
     26        * page/Page.h:
     27        (Page):
     28        Declare new rubber-banding API (above).
     29
     30        * page/scrolling/ScrollingCoordinator.h:
     31        (WebCore::ScrollingCoordinator::rubberBandsAtBottom):
     32        Stub API implementation.
     33        (WebCore::ScrollingCoordinator::setRubberBandsAtBottom):
     34        Ditto.
     35        (WebCore::ScrollingCoordinator::rubberBandsAtTop):
     36        Ditto.
     37        (WebCore::ScrollingCoordinator::setRubberBandsAtTop):
     38        Ditto.
     39
     40        * page/scrolling/ScrollingTree.cpp:
     41        (WebCore::ScrollingTree::ScrollingTree):
     42        Initialize new member variables.
     43        (WebCore::ScrollingTree::setMainFramePinState):
     44        Set top/bottom pinned states.
     45        (WebCore::ScrollingTree::rubberBandsAtBottom):
     46        New accessor function.
     47        (WebCore::ScrollingTree::setRubberBandsAtBottom):
     48        New mutator function.
     49        (WebCore::ScrollingTree::rubberBandsAtTop):
     50        New accessor function.
     51        (WebCore::ScrollingTree::setRubberBandsAtTop):
     52        New mutator function.
     53        (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
     54        Start a vertical swipe event if the frame is pinned at the top or bottom and associated rubber-banding is disabled.
     55
     56        * page/scrolling/ScrollingTree.h:
     57        (ScrollingTree):
     58        Declare new rubber-banding API and associated member variables.
     59
     60        * page/scrolling/mac/ScrollingCoordinatorMac.h:
     61        (ScrollingCoordinatorMac):
     62        Declare API overrides.
     63
     64        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
     65        (WebCore::ScrollingCoordinatorMac::rubberBandsAtBottom):
     66        Method override; proxy to corresponding function in ScrollingTree.
     67        (WebCore::ScrollingCoordinatorMac::setRubberBandsAtBottom):
     68        Ditto.
     69        (WebCore::ScrollingCoordinatorMac::rubberBandsAtTop):
     70        Ditto.
     71        (WebCore::ScrollingCoordinatorMac::setRubberBandsAtTop):
     72        Ditto.
     73
     74        * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
     75        (WebCore::ScrollingTreeScrollingNodeMac::pinnedInDirection):
     76        Remove trailing whitespace.
     77        (WebCore::ScrollingTreeScrollingNodeMac::updateMainFramePinState):
     78        Calculate and pass vertical pinning state to ScrollingTree::setMainFramePinState().
     79
    1802013-02-19  Simon Fraser  <simon.fraser@apple.com>
    281
  • trunk/Source/WebCore/WebCore.exp.in

    r143398 r143418  
    783783__ZN7WebCore4Page19addLayoutMilestonesEj
    784784__ZN7WebCore4Page19visitedStateChangedEPNS_9PageGroupEy
     785__ZN7WebCore4Page19setRubberBandsAtTopEb
    785786__ZN7WebCore4Page20setDeviceScaleFactorEf
    786787__ZN7WebCore4Page20unmarkAllTextMatchesEv
     
    788789__ZN7WebCore4Page22allVisitedStateChangedEPNS_9PageGroupE
    789790__ZN7WebCore4Page22nonFastScrollableRectsEPKNS_5FrameE
     791__ZN7WebCore4Page22setRubberBandsAtBottomEb
    790792__ZN7WebCore4Page23clearUndoRedoOperationsEv
    791793__ZN7WebCore4Page24findStringMatchingRangesERKN3WTF6StringEjiPNS1_6VectorINS1_6RefPtrINS_5RangeEEELm0EEERi
     
    27022704__ZN7WebCore15ScrollingThread8dispatchERKN3WTF8FunctionIFvvEEE
    27032705__ZN7WebCore20ScrollingCoordinator44setForceMainThreadScrollLayerPositionUpdatesEb
     2706__ZNK7WebCore23ScrollingCoordinatorMac19rubberBandsAtBottomEv
     2707__ZNK7WebCore23ScrollingCoordinatorMac16rubberBandsAtTopEv
     2708__ZN7WebCore23ScrollingCoordinatorMac22setRubberBandsAtBottomEb
     2709__ZN7WebCore23ScrollingCoordinatorMac19setRubberBandsAtTopEb
    27042710__ZN7WebCore4Page20scrollingCoordinatorEv
    27052711#endif
  • trunk/Source/WebCore/page/Page.cpp

    r142271 r143418  
    816816}
    817817
     818bool Page::rubberBandsAtBottom()
     819{
     820    if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
     821        return scrollingCoordinator->rubberBandsAtBottom();
     822
     823    return false;
     824}
     825
     826void Page::setRubberBandsAtBottom(bool rubberBandsAtBottom)
     827{
     828    if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
     829        scrollingCoordinator->setRubberBandsAtBottom(rubberBandsAtBottom);
     830}
     831
     832bool Page::rubberBandsAtTop()
     833{
     834    if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
     835        return scrollingCoordinator->rubberBandsAtTop();
     836
     837    return false;
     838}
     839
     840void Page::setRubberBandsAtTop(bool rubberBandsAtTop)
     841{
     842    if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
     843        scrollingCoordinator->setRubberBandsAtTop(rubberBandsAtTop);
     844}
     845
    818846void Page::setPagination(const Pagination& pagination)
    819847{
  • trunk/Source/WebCore/page/Page.h

    r142069 r143418  
    272272    void setShouldSuppressScrollbarAnimations(bool suppressAnimations);
    273273
     274    bool rubberBandsAtBottom();
     275    void setRubberBandsAtBottom(bool);
     276    bool rubberBandsAtTop();
     277    void setRubberBandsAtTop(bool);
     278
    274279    // Page and FrameView both store a Pagination value. Page::pagination() is set only by API,
    275280    // and FrameView::pagination() is set only by CSS. Page::pagination() will affect all
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h

    r143404 r143418  
    125125    virtual String scrollingStateTreeAsText() const;
    126126    virtual bool isRubberBandInProgress() const { return false; }
     127    virtual bool rubberBandsAtBottom() const { return false; }
     128    virtual void setRubberBandsAtBottom(bool) { }
     129    virtual bool rubberBandsAtTop() const { return false; }
     130    virtual void setRubberBandsAtTop(bool) { }
    127131
    128132    // Generated a unique id for scroll layers.
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp

    r142691 r143418  
    11/*
    2  * Copyright (C) 2012 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    5454    , m_mainFramePinnedToTheLeft(false)
    5555    , m_mainFramePinnedToTheRight(false)
     56    , m_rubberBandsAtBottom(true)
     57    , m_rubberBandsAtTop(true)
     58    , m_mainFramePinnedToTheTop(false)
     59    , m_mainFramePinnedToTheBottom(false)
    5660    , m_mainFrameIsRubberBanding(false)
    5761    , m_scrollingPerformanceLoggingEnabled(false)
     
    226230}
    227231
    228 void ScrollingTree::setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight)
     232void ScrollingTree::setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight, bool pinnedToTheTop, bool pinnedToTheBottom)
    229233{
    230234    MutexLocker locker(m_swipeStateMutex);
     
    232236    m_mainFramePinnedToTheLeft = pinnedToTheLeft;
    233237    m_mainFramePinnedToTheRight = pinnedToTheRight;
     238    m_mainFramePinnedToTheTop = pinnedToTheTop;
     239    m_mainFramePinnedToTheBottom = pinnedToTheBottom;
    234240}
    235241
     
    291297}
    292298
     299bool ScrollingTree::rubberBandsAtBottom()
     300{
     301    MutexLocker lock(m_swipeStateMutex);
     302
     303    return m_rubberBandsAtBottom;
     304}
     305
     306void ScrollingTree::setRubberBandsAtBottom(bool rubberBandsAtBottom)
     307{
     308    MutexLocker locker(m_swipeStateMutex);
     309
     310    m_rubberBandsAtBottom = rubberBandsAtBottom;
     311}
     312
     313bool ScrollingTree::rubberBandsAtTop()
     314{
     315    MutexLocker lock(m_swipeStateMutex);
     316
     317    return m_rubberBandsAtTop;
     318}
     319
     320void ScrollingTree::setRubberBandsAtTop(bool rubberBandsAtTop)
     321{
     322    MutexLocker locker(m_swipeStateMutex);
     323
     324    m_rubberBandsAtTop = rubberBandsAtTop;
     325}
     326
    293327bool ScrollingTree::willWheelEventStartSwipeGesture(const PlatformWheelEvent& wheelEvent)
    294328{
    295329    if (wheelEvent.phase() != PlatformWheelEventPhaseBegan)
    296         return false;
    297     if (!wheelEvent.deltaX())
    298330        return false;
    299331
     
    304336    if (wheelEvent.deltaX() < 0 && m_mainFramePinnedToTheRight && m_canGoForward)
    305337        return true;
     338    if (wheelEvent.deltaY() > 0 && m_mainFramePinnedToTheTop && !m_rubberBandsAtTop)
     339        return true;
     340    if (wheelEvent.deltaY() < 0 && m_mainFramePinnedToTheBottom && !m_rubberBandsAtBottom)
     341        return true;
    306342
    307343    return false;
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.h

    r142691 r143418  
    11/*
    2  * Copyright (C) 2012 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    8686    void commitNewTreeState(PassOwnPtr<ScrollingStateTree>);
    8787
    88     void setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight);
     88    void setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight, bool pinnedToTheTop, bool pinnedToTheBottom);
    8989
    9090    void updateMainFrameScrollPosition(const IntPoint& scrollPosition, SetOrSyncScrollingLayerPosition = SyncScrollingLayerPosition);
     
    9797    bool canGoBack();
    9898    bool canGoForward();
     99
     100    bool rubberBandsAtBottom();
     101    void setRubberBandsAtBottom(bool);
     102    bool rubberBandsAtTop();
     103    void setRubberBandsAtTop(bool);
    99104
    100105    bool willWheelEventStartSwipeGesture(const PlatformWheelEvent&);
     
    127132    bool m_mainFramePinnedToTheLeft;
    128133    bool m_mainFramePinnedToTheRight;
     134    bool m_rubberBandsAtBottom;
     135    bool m_rubberBandsAtTop;
     136    bool m_mainFramePinnedToTheTop;
     137    bool m_mainFramePinnedToTheBottom;
    129138    bool m_mainFrameIsRubberBanding;
    130139
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h

    r142504 r143418  
    7777
    7878    virtual bool isRubberBandInProgress() const OVERRIDE;
     79    virtual bool rubberBandsAtBottom() const OVERRIDE;
     80    virtual void setRubberBandsAtBottom(bool) OVERRIDE;
     81    virtual bool rubberBandsAtTop() const OVERRIDE;
     82    virtual void setRubberBandsAtTop(bool) OVERRIDE;
    7983
    8084private:
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm

    r143074 r143418  
    9494}
    9595
     96bool ScrollingCoordinatorMac::rubberBandsAtBottom() const
     97{
     98    return scrollingTree()->rubberBandsAtBottom();
     99}
     100
     101void ScrollingCoordinatorMac::setRubberBandsAtBottom(bool rubberBandsAtBottom)
     102{
     103    scrollingTree()->setRubberBandsAtBottom(rubberBandsAtBottom);
     104}
     105
     106bool ScrollingCoordinatorMac::rubberBandsAtTop() const
     107{
     108    return scrollingTree()->rubberBandsAtTop();
     109}
     110
     111void ScrollingCoordinatorMac::setRubberBandsAtTop(bool rubberBandsAtTop)
     112{
     113    scrollingTree()->setRubberBandsAtTop(rubberBandsAtTop);
     114}
     115
    96116void ScrollingCoordinatorMac::commitTreeStateIfNeeded()
    97117{
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm

    r143404 r143418  
    201201    }
    202202
    203     if ((delta.width() || delta.height()) && (limitDelta.width() < 1 && limitDelta.height() < 1))       
     203    if ((delta.width() || delta.height()) && (limitDelta.width() < 1 && limitDelta.height() < 1))
    204204        return true;
    205205
     
    350350    bool pinnedToTheLeft = scrollPosition.x() <= minimumScrollPosition().x();
    351351    bool pinnedToTheRight = scrollPosition.x() >= maximumScrollPosition().x();
    352 
    353     scrollingTree()->setMainFramePinState(pinnedToTheLeft, pinnedToTheRight);
     352    bool pinnedToTheTop = scrollPosition.y() <= minimumScrollPosition().y();
     353    bool pinnedToTheBottom = scrollPosition.y() >= maximumScrollPosition().y();
     354
     355    scrollingTree()->setMainFramePinState(pinnedToTheLeft, pinnedToTheRight, pinnedToTheTop, pinnedToTheBottom);
    354356}
    355357
  • trunk/Source/WebKit2/ChangeLog

    r143396 r143418  
     12013-02-19  Conrad Shultz  <conrad_shultz@apple.com>
     2
     3        Allow UI clients to handle vertical wheel events.
     4        https://bugs.webkit.org/show_bug.cgi?id=110006
     5
     6        Reviewed by Tim Horton.
     7
     8        Add API to allow clients to selectively control rubber-banding at vertical page extrema.
     9
     10        * UIProcess/API/C/WKPage.cpp:
     11        (WKPageRubberBandsAtBottom):
     12        Proxy for the corresponding function in WebCore::Page.
     13        (WKPageSetRubberBandsAtBottom):
     14        Ditto.
     15        (WKPageRubberBandsAtTop):
     16        Ditto.
     17        (WKPageSetRubberBandsAtTop):
     18        Ditto.
     19
     20        * UIProcess/API/C/WKPage.h:
     21        Declare new API.
     22
     23        * UIProcess/WebPageProxy.cpp:
     24        (WebKit::WebPageProxy::WebPageProxy):
     25        Initialize new member variables.
     26        (WebKit::WebPageProxy::setRubberBandsAtBottom):
     27        New function; dispatches a matching message to the WebKit::WebPage.
     28        (WebKit::WebPageProxy::setRubberBandsAtTop):
     29        Ditto.
     30
     31        * UIProcess/WebPageProxy.h:
     32        (WebPageProxy):
     33        Declare new API.
     34        (WebKit::WebPageProxy::rubberBandsAtBottom):
     35        New accessor function.
     36        (WebKit::WebPageProxy::rubberBandsAtTop):
     37        Ditto.
     38
     39        * WebProcess/WebPage/WebPage.cpp:
     40        (WebKit::WebPage::setRubberBandsAtBottom):
     41        New function; call the matching function on the associated WebCore::Page.
     42        (WebKit::WebPage::setRubberBandsAtTop):
     43        Ditto.
     44
     45        * WebProcess/WebPage/WebPage.h:
     46        (WebPage):
     47        Declare new rubber-banding API.
     48
     49        * WebProcess/WebPage/WebPage.messages.in:
     50        Declare new rubber-banding API.
     51
    1522013-02-19  Anders Carlsson  <andersca@apple.com>
    253
  • trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp

    r141448 r143418  
    395395}
    396396
     397
     398bool WKPageRubberBandsAtBottom(WKPageRef pageRef)
     399{
     400    return toImpl(pageRef)->rubberBandsAtBottom();
     401}
     402
     403void WKPageSetRubberBandsAtBottom(WKPageRef pageRef, bool rubberBandsAtBottom)
     404{
     405    toImpl(pageRef)->setRubberBandsAtBottom(rubberBandsAtBottom);
     406}
     407
     408bool WKPageRubberBandsAtTop(WKPageRef pageRef)
     409{
     410    return toImpl(pageRef)->rubberBandsAtTop();
     411}
     412
     413void WKPageSetRubberBandsAtTop(WKPageRef pageRef, bool rubberBandsAtTop)
     414{
     415    toImpl(pageRef)->setRubberBandsAtTop(rubberBandsAtTop);
     416}
     417
    397418void WKPageSetPaginationMode(WKPageRef pageRef, WKPaginationMode paginationMode)
    398419{
  • trunk/Source/WebKit2/UIProcess/API/C/WKPage.h

    r142762 r143418  
    445445WK_EXPORT bool WKPageIsPinnedToBottomSide(WKPageRef page);
    446446
     447WK_EXPORT bool WKPageRubberBandsAtBottom(WKPageRef);
     448WK_EXPORT void WKPageSetRubberBandsAtBottom(WKPageRef, bool rubberBandsAtBottom);
     449WK_EXPORT bool WKPageRubberBandsAtTop(WKPageRef);
     450WK_EXPORT void WKPageSetRubberBandsAtTop(WKPageRef, bool rubberBandsAtTop);
     451
    447452WK_EXPORT bool WKPageCanDelete(WKPageRef page);
    448453WK_EXPORT bool WKPageHasSelectedRange(WKPageRef page);
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r143275 r143418  
    227227    , m_mainFrameIsPinnedToTopSide(false)
    228228    , m_mainFrameIsPinnedToBottomSide(false)
     229    , m_rubberBandsAtBottom(false)
     230    , m_rubberBandsAtTop(false)
    229231    , m_mainFrameInViewSourceMode(false)
    230232    , m_pageCount(0)
     
    259261#if ENABLE(VIBRATION)
    260262    m_vibration = WebVibrationProxy::create(this);
     263#endif
     264#if ENABLE(THREADED_SCROLLING)
     265    m_rubberBandsAtBottom = true;
     266    m_rubberBandsAtTop = true;
    261267#endif
    262268
     
    16721678    m_suppressScrollbarAnimations = suppressAnimations;
    16731679    m_process->send(Messages::WebPage::SetSuppressScrollbarAnimations(suppressAnimations), m_pageID);
     1680}
     1681
     1682void WebPageProxy::setRubberBandsAtBottom(bool rubberBandsAtBottom)
     1683{
     1684    if (rubberBandsAtBottom == m_rubberBandsAtBottom)
     1685        return;
     1686
     1687    m_rubberBandsAtBottom = rubberBandsAtBottom;
     1688
     1689    if (!isValid())
     1690        return;
     1691
     1692    m_process->send(Messages::WebPage::SetRubberBandsAtBottom(rubberBandsAtBottom), m_pageID);
     1693}
     1694
     1695void WebPageProxy::setRubberBandsAtTop(bool rubberBandsAtTop)
     1696{
     1697    if (rubberBandsAtTop == m_rubberBandsAtTop)
     1698        return;
     1699
     1700    m_rubberBandsAtTop = rubberBandsAtTop;
     1701
     1702    if (!isValid())
     1703        return;
     1704
     1705    m_process->send(Messages::WebPage::SetRubberBandsAtTop(rubberBandsAtTop), m_pageID);
    16741706}
    16751707
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r143275 r143418  
    503503    bool isPinnedToBottomSide() const { return m_mainFrameIsPinnedToBottomSide; }
    504504
     505    bool rubberBandsAtBottom() const { return m_rubberBandsAtBottom; }
     506    void setRubberBandsAtBottom(bool);
     507    bool rubberBandsAtTop() const { return m_rubberBandsAtTop; }
     508    void setRubberBandsAtTop(bool);
     509
    505510    void setPaginationMode(WebCore::Pagination::Mode);
    506511    WebCore::Pagination::Mode paginationMode() const { return m_paginationMode; }
     
    12101215    bool m_mainFrameIsPinnedToBottomSide;
    12111216
     1217    bool m_rubberBandsAtBottom;
     1218    bool m_rubberBandsAtTop;
     1219
    12121220    bool m_mainFrameInViewSourceMode;
    12131221
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r143353 r143418  
    13131313}
    13141314
     1315void WebPage::setRubberBandsAtBottom(bool rubberBandsAtBottom)
     1316{
     1317    m_page->setRubberBandsAtBottom(rubberBandsAtBottom);
     1318}
     1319
     1320void WebPage::setRubberBandsAtTop(bool rubberBandsAtTop)
     1321{
     1322    m_page->setRubberBandsAtTop(rubberBandsAtTop);
     1323}
     1324
    13151325void WebPage::setPaginationMode(uint32_t mode)
    13161326{
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h

    r141486 r143418  
    316316    void setSuppressScrollbarAnimations(bool);
    317317
     318    void setRubberBandsAtBottom(bool);
     319    void setRubberBandsAtTop(bool);
     320
    318321    void setPaginationMode(uint32_t /* WebCore::Pagination::Mode */);
    319322    void setPaginationBehavesLikeColumns(bool);
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in

    r141448 r143418  
    143143    SetSuppressScrollbarAnimations(bool suppressAnimations)
    144144
     145    SetRubberBandsAtBottom(bool rubberBandsAtBottom)
     146    SetRubberBandsAtTop(bool rubberBandsAtTop)
     147
    145148    SetPaginationMode(uint32_t mode)
    146149    SetPaginationBehavesLikeColumns(bool behavesLikeColumns)
Note: See TracChangeset for help on using the changeset viewer.