Changeset 269373 in webkit


Ignore:
Timestamp:
Nov 4, 2020 10:45:14 AM (21 months ago)
Author:
Simon Fraser
Message:

A programmatic scroll should stop any rubberbanding
https://bugs.webkit.org/show_bug.cgi?id=218545

Reviewed by Antti Koivisto.

Part of rdar://problem/69599531: Scrolling on netflix.com sometimes jumps to the top.

If the scrolling thread is in the middle of a rubberband (say, when a modal overlay is
up), and then the main thread triggers a programmatic scroll to some other location,
we should stop rubberbanding immediately. If we don't, then the rubberband timer
continues to generate scrolls on the scrolling thread which get to the main thread
after it has handled the programatic scroll, thus resetting the scroll position.

This change shares some edgePinnedState() around which is used to allow rubberbanding
to continue of the programmatic scroll is to the edge which is already pinned
(commonly the top).

Also address some review comments from a previous patch.

Very hard to make tests that do things while rubberbanding is happening.

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::applyLayerPositionsInternal):
(WebCore::ScrollingTree::addPendingScrollUpdate):
(WebCore::ScrollingTree::takePendingScrollUpdates):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::scrollTo):
(WebCore::ScrollingTreeScrollingNode::currentScrollPositionChanged):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:

(WebCore::ScrollingTreeOverflowScrollingNodeMac::currentScrollPositionChanged):

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::currentScrollPositionChanged):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::edgePinnedState const):

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::notifyPositionChanged):

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::edgePinnedState const):

  • platform/ScrollableArea.h:
  • platform/cocoa/ScrollController.h:
  • platform/cocoa/ScrollController.mm:

(WebCore::ScrollController::snapRubberBandTimerFired):
(WebCore::ScrollController::scrollPositionChanged):
(WebCore::ScrollController::stopRubberbanding):
(WebCore::ScrollController::updateRubberBandingState):
(WebCore::ScrollController::updateRubberBandingEdges):
(WebCore::ScrollController::scrolledToRubberbandingEdge const):

  • platform/mac/ScrollAnimatorMac.h:
  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::edgePinnedState const):

  • platform/mock/ScrollAnimatorMock.h:
Location:
trunk/Source/WebCore
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r269371 r269373  
     12020-11-04  Simon Fraser  <simon.fraser@apple.com>
     2
     3        A programmatic scroll should stop any rubberbanding
     4        https://bugs.webkit.org/show_bug.cgi?id=218545
     5
     6        Reviewed by Antti Koivisto.
     7       
     8        Part of rdar://problem/69599531: Scrolling on netflix.com sometimes jumps to the top.
     9
     10        If the scrolling thread is in the middle of a rubberband (say, when a modal overlay is
     11        up), and then the main thread triggers a programmatic scroll to some other location,
     12        we should stop rubberbanding immediately. If we don't, then the rubberband timer
     13        continues to generate scrolls on the scrolling thread which get to the main thread
     14        after it has handled the programatic scroll, thus resetting the scroll position.
     15
     16        This change shares some edgePinnedState() around which is used to allow rubberbanding
     17        to continue of the programmatic scroll is to the edge which is already pinned
     18        (commonly the top).
     19
     20        Also address some review comments from a previous patch.
     21
     22        Very hard to make tests that do things while rubberbanding is happening.
     23
     24        * page/scrolling/ScrollingTree.cpp:
     25        (WebCore::ScrollingTree::applyLayerPositionsInternal):
     26        (WebCore::ScrollingTree::addPendingScrollUpdate):
     27        (WebCore::ScrollingTree::takePendingScrollUpdates):
     28        * page/scrolling/ScrollingTreeScrollingNode.cpp:
     29        (WebCore::ScrollingTreeScrollingNode::scrollTo):
     30        (WebCore::ScrollingTreeScrollingNode::currentScrollPositionChanged):
     31        * page/scrolling/ScrollingTreeScrollingNode.h:
     32        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
     33        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
     34        (WebCore::ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged):
     35        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
     36        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
     37        (WebCore::ScrollingTreeOverflowScrollingNodeMac::currentScrollPositionChanged):
     38        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
     39        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
     40        (WebCore::ScrollingTreeScrollingNodeDelegateMac::currentScrollPositionChanged):
     41        (WebCore::ScrollingTreeScrollingNodeDelegateMac::edgePinnedState const):
     42        * platform/ScrollAnimator.cpp:
     43        (WebCore::ScrollAnimator::notifyPositionChanged):
     44        * platform/ScrollableArea.cpp:
     45        (WebCore::ScrollableArea::edgePinnedState const):
     46        * platform/ScrollableArea.h:
     47        * platform/cocoa/ScrollController.h:
     48        * platform/cocoa/ScrollController.mm:
     49        (WebCore::ScrollController::snapRubberBandTimerFired):
     50        (WebCore::ScrollController::scrollPositionChanged):
     51        (WebCore::ScrollController::stopRubberbanding):
     52        (WebCore::ScrollController::updateRubberBandingState):
     53        (WebCore::ScrollController::updateRubberBandingEdges):
     54        (WebCore::ScrollController::scrolledToRubberbandingEdge const):
     55        * platform/mac/ScrollAnimatorMac.h:
     56        * platform/mac/ScrollAnimatorMac.mm:
     57        (WebCore::ScrollAnimatorMac::edgePinnedState const):
     58        * platform/mock/ScrollAnimatorMock.h:
     59
    1602020-11-04  Youenn Fablet  <youenn@apple.com>
    261
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp

    r269312 r269373  
    403403        return;
    404404
    405 //    LOG(Scrolling, "\nScrollingTree %p applyLayerPositions (main thread %d)", this, isMainThread());
    406405    applyLayerPositionsRecursive(*m_rootNode);
    407406}
     
    580579void ScrollingTree::addPendingScrollUpdate(ScrollUpdate&& update)
    581580{
    582     LockHolder locker(m_pendingScrollUpdatesLock);
     581    auto locker = holdLock(m_pendingScrollUpdatesLock);
    583582    for (auto& existingUpdate : m_pendingScrollUpdates) {
    584583        if (existingUpdate.canMerge(update)) {
     
    593592Vector<ScrollingTree::ScrollUpdate> ScrollingTree::takePendingScrollUpdates()
    594593{
    595     LockHolder locker(m_pendingScrollUpdatesLock);
     594    auto locker = holdLock(m_pendingScrollUpdatesLock);
    596595    return std::exchange(m_pendingScrollUpdates, { });
    597596}
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp

    r269184 r269373  
    259259
    260260    scrollingTree().setIsHandlingProgrammaticScroll(scrollType == ScrollType::Programmatic);
    261    
     261
    262262    m_currentScrollPosition = adjustedScrollPosition(position, clamp);
    263263   
    264     LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreeScrollingNode " << scrollingNodeID() << " scrollTo " << position << " (" << scrollType << ") (delta from last committed position " << (m_lastCommittedScrollPosition - m_currentScrollPosition) << ")");
     264    LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreeScrollingNode " << scrollingNodeID() << " scrollTo " << position << " adjusted to "
     265        << m_currentScrollPosition << " (" << scrollType << ") (delta from last committed position " << (m_lastCommittedScrollPosition - m_currentScrollPosition) << ")"
     266        << " rubberbanding " << scrollingTree().isRubberBandInProgressForNode(scrollingNodeID()));
    265267
    266268    updateViewportForCurrentScrollPosition();
    267     currentScrollPositionChanged();
     269    currentScrollPositionChanged(scrollType);
    268270
    269271    scrollingTree().setIsHandlingProgrammaticScroll(false);
    270272}
    271273
    272 void ScrollingTreeScrollingNode::currentScrollPositionChanged(ScrollingLayerPositionAction action)
     274void ScrollingTreeScrollingNode::currentScrollPositionChanged(ScrollType, ScrollingLayerPositionAction action)
    273275{
    274276    m_scrolledSinceLastCommit = true;
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h

    r264203 r269373  
    128128    virtual FloatPoint adjustedScrollPosition(const FloatPoint&, ScrollClamping = ScrollClamping::Clamped) const;
    129129
    130     virtual void currentScrollPositionChanged(ScrollingLayerPositionAction = ScrollingLayerPositionAction::Sync);
     130    virtual void currentScrollPositionChanged(ScrollType, ScrollingLayerPositionAction = ScrollingLayerPositionAction::Sync);
    131131    virtual void updateViewportForCurrentScrollPosition(Optional<FloatRect> = { }) { }
    132132    virtual bool scrollPositionAndLayoutViewportMatch(const FloatPoint& position, Optional<FloatRect> overrideLayoutViewport);
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h

    r262294 r269373  
    6868    FloatPoint adjustedScrollPosition(const FloatPoint&, ScrollClamping) const override;
    6969
    70     void currentScrollPositionChanged(ScrollingLayerPositionAction) final;
     70    void currentScrollPositionChanged(ScrollType, ScrollingLayerPositionAction) final;
    7171    void repositionScrollingLayers() final;
    7272
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm

    r269184 r269373  
    140140}
    141141
    142 void ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged(ScrollingLayerPositionAction action)
    143 {
    144     LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged to " << currentScrollPosition() << " min: " << minimumScrollPosition() << " max: " << maximumScrollPosition() << " sync: " << hasSynchronousScrollingReasons());
    145 
    146     m_delegate.currentScrollPositionChanged();
     142void ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged(ScrollType scrollType, ScrollingLayerPositionAction action)
     143{
     144    LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreeFrameScrollingNodeMac " << scrollingNodeID() << " currentScrollPositionChanged to " << currentScrollPosition() << " min: " << minimumScrollPosition() << " max: " << maximumScrollPosition() << " sync: " << hasSynchronousScrollingReasons());
     145
     146    m_delegate.currentScrollPositionChanged(scrollType);
    147147
    148148    if (isRootNode())
    149149        updateMainFramePinAndRubberbandState();
    150150
    151     ScrollingTreeFrameScrollingNode::currentScrollPositionChanged(hasSynchronousScrollingReasons() ? ScrollingLayerPositionAction::Set : action);
     151    ScrollingTreeFrameScrollingNode::currentScrollPositionChanged(scrollType, hasSynchronousScrollingReasons() ? ScrollingLayerPositionAction::Set : action);
    152152
    153153    if (scrollingTree().scrollingPerformanceLoggingEnabled()) {
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h

    r267002 r269373  
    4848    FloatPoint adjustedScrollPosition(const FloatPoint&, ScrollClamping) const override;
    4949
    50     void currentScrollPositionChanged(ScrollingLayerPositionAction) final;
     50    void currentScrollPositionChanged(ScrollType, ScrollingLayerPositionAction) final;
    5151
    5252    void repositionScrollingLayers() override;
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm

    r269184 r269373  
    8787}
    8888
    89 void ScrollingTreeOverflowScrollingNodeMac::currentScrollPositionChanged(ScrollingLayerPositionAction action)
     89void ScrollingTreeOverflowScrollingNodeMac::currentScrollPositionChanged(ScrollType scrollType, ScrollingLayerPositionAction action)
    9090{
    91     ScrollingTreeOverflowScrollingNode::currentScrollPositionChanged(action);
    92     m_delegate.currentScrollPositionChanged();
     91    ScrollingTreeOverflowScrollingNode::currentScrollPositionChanged(scrollType, action);
     92    m_delegate.currentScrollPositionChanged(scrollType);
    9393}
    9494
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h

    r267002 r269373  
    5252    bool handleWheelEvent(const PlatformWheelEvent&);
    5353   
    54     void currentScrollPositionChanged();
     54    void currentScrollPositionChanged(ScrollType);
    5555
    5656#if ENABLE(CSS_SCROLL_SNAP)
     
    7979    IntSize stretchAmount() const final;
    8080    bool pinnedInDirection(const FloatSize&) const final;
     81    RectEdges<bool> edgePinnedState() const final;
    8182    bool canScrollHorizontally() const final;
    8283    bool canScrollVertically() const final;
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm

    r269184 r269373  
    161161}
    162162
    163 void ScrollingTreeScrollingNodeDelegateMac::currentScrollPositionChanged()
    164 {
    165     m_scrollController.scrollPositionChanged();
     163void ScrollingTreeScrollingNodeDelegateMac::currentScrollPositionChanged(ScrollType scrollType)
     164{
     165    m_scrollController.scrollPositionChanged(scrollType);
    166166}
    167167
     
    292292}
    293293
     294RectEdges<bool> ScrollingTreeScrollingNodeDelegateMac::edgePinnedState() const
     295{
     296    return scrollingNode().edgePinnedState();
     297}
     298
    294299bool ScrollingTreeScrollingNodeDelegateMac::canScrollHorizontally() const
    295300{
  • trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp

    r269184 r269373  
    246246}
    247247
    248 void ScrollingTreeFrameScrollingNodeNicosia::currentScrollPositionChanged(ScrollingLayerPositionAction action)
     248void ScrollingTreeFrameScrollingNodeNicosia::currentScrollPositionChanged(ScrollType scrollType, ScrollingLayerPositionAction action)
    249249{
    250250    LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreeFrameScrollingNodeNicosia::currentScrollPositionChanged to " << currentScrollPosition() << " min: " << minimumScrollPosition() << " max: " << maximumScrollPosition() << " sync: " << hasSynchronousScrollingReasons());
    251251
    252     ScrollingTreeFrameScrollingNode::currentScrollPositionChanged(hasSynchronousScrollingReasons() ? ScrollingLayerPositionAction::Set : action);
     252    ScrollingTreeFrameScrollingNode::currentScrollPositionChanged(scrollType, hasSynchronousScrollingReasons() ? ScrollingLayerPositionAction::Set : action);
    253253}
    254254
  • trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h

    r268522 r269373  
    6767    FloatPoint adjustedScrollPosition(const FloatPoint&, ScrollClamping) const override;
    6868
    69     void currentScrollPositionChanged(ScrollingLayerPositionAction) override;
     69    void currentScrollPositionChanged(ScrollType, ScrollingLayerPositionAction) override;
    7070
    7171    void repositionScrollingLayers() override;
  • trunk/Source/WebCore/platform/ScrollAnimator.cpp

    r269143 r269373  
    236236
    237237#if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING)
    238     m_scrollController.scrollPositionChanged();
     238    m_scrollController.scrollPositionChanged(ScrollType::Programmatic);
    239239#endif
    240240}
  • trunk/Source/WebCore/platform/ScrollableArea.cpp

    r268031 r269373  
    627627}
    628628
     629RectEdges<bool> ScrollableArea::edgePinnedState() const
     630{
     631    auto scrollPosition = this->scrollPosition();
     632    auto minScrollPosition = minimumScrollPosition();
     633    auto maxScrollPosition = maximumScrollPosition();
     634
     635    // Top, right, bottom, left.
     636    return {
     637        scrollPosition.y() <= minScrollPosition.y(),
     638        scrollPosition.x() >= maxScrollPosition.x(),
     639        scrollPosition.y() >= maxScrollPosition.y(),
     640        scrollPosition.x() <= minScrollPosition.x()
     641    };
     642}
     643
    629644int ScrollableArea::horizontalScrollbarIntrusion() const
    630645{
  • trunk/Source/WebCore/platform/ScrollableArea.h

    r268031 r269373  
    2626#pragma once
    2727
     28#include "RectEdges.h"
    2829#include "ScrollSnapOffsetsInfo.h"
    2930#include "ScrollTypes.h"
     
    328329    bool isPinnedVerticallyInDirection(int verticalScrollDelta) const;
    329330
     331    RectEdges<bool> edgePinnedState() const;
     332
    330333    // True if scrolling happens by moving compositing layers.
    331334    virtual bool usesCompositedScrolling() const { return false; }
  • trunk/Source/WebCore/platform/cocoa/ScrollController.h

    r267002 r269373  
    3030#include "FloatPoint.h"
    3131#include "FloatSize.h"
     32#include "RectEdges.h"
    3233#include "ScrollTypes.h"
    3334#include "WheelEventTestMonitor.h"
     
    7677    virtual bool allowsVerticalStretching(const PlatformWheelEvent&) const = 0;
    7778    virtual IntSize stretchAmount() const = 0;
     79
    7880    virtual bool pinnedInDirection(const FloatSize&) const = 0;
     81
     82    virtual RectEdges<bool> edgePinnedState() const = 0;
     83
    7984    virtual bool canScrollHorizontally() const = 0;
    8085    virtual bool canScrollVertically() const = 0;
     
    147152    bool isScrollSnapInProgress() const;
    148153   
    149     void scrollPositionChanged();
     154    void scrollPositionChanged(ScrollType);
    150155
    151156#if ENABLE(CSS_SCROLL_SNAP)
     
    174179private:
    175180#if ENABLE(RUBBER_BANDING)
     181    void stopRubberbanding();
     182
    176183    void startSnapRubberbandTimer();
    177184    void stopSnapRubberbandTimer();
     
    184191    bool isRubberBandInProgressInternal() const;
    185192    void updateRubberBandingState();
     193    void updateRubberBandingEdges(IntSize clientStretch);
     194   
     195    bool scrolledToRubberbandingEdge() const;
    186196#endif
    187197
     
    216226    FloatSize m_startStretch;
    217227    FloatSize m_origVelocity;
     228    RectEdges<bool> m_rubberBandingEdges;
    218229    std::unique_ptr<ScrollControllerTimer> m_snapRubberbandTimer;
    219230#endif
  • trunk/Source/WebCore/platform/cocoa/ScrollController.mm

    r267002 r269373  
    408408        return;
    409409   
     410    LOG_WITH_STREAM(Scrolling, stream << "ScrollController::snapRubberBandTimerFired() - main thread " << isMainThread());
     411
    410412    if (!m_momentumScrollInProgress || m_ignoreMomentumScrolls) {
    411413        auto timeDelta = MonotonicTime::now() - m_startTime;
     
    414416            m_startStretch = m_client.stretchAmount();
    415417            if (m_startStretch == FloatSize()) {
    416                 stopSnapRubberbandTimer();
    417 
    418                 m_stretchScrollForce = { };
    419                 m_startTime = { };
    420                 m_startStretch = { };
    421                 m_origVelocity = { };
    422 
    423                 updateRubberBandingState();
     418                stopRubberbanding();
    424419                return;
    425420            }
     
    452447        } else {
    453448            m_client.adjustScrollPositionToBoundsIfNecessary();
    454 
    455             stopSnapRubberbandTimer();
    456             m_stretchScrollForce = { };
    457             m_startTime = { };
    458             m_startStretch = { };
    459             m_origVelocity = { };
     449            stopRubberbanding();
    460450        }
    461451    } else {
     
    470460#endif
    471461
    472 void ScrollController::scrollPositionChanged()
     462void ScrollController::scrollPositionChanged(ScrollType scrollType)
    473463{
    474464#if ENABLE(RUBBER_BANDING)
     465    if (scrollType == ScrollType::Programmatic && !scrolledToRubberbandingEdge())
     466        stopRubberbanding();
     467
    475468    updateRubberBandingState();
     469#else
     470    UNUSED_PARAM(scrollType);
    476471#endif
    477472}
     
    517512
    518513#if ENABLE(RUBBER_BANDING)
     514void ScrollController::stopRubberbanding()
     515{
     516    stopSnapRubberbandTimer();
     517    m_stretchScrollForce = { };
     518    m_startTime = { };
     519    m_startStretch = { };
     520    m_origVelocity = { };
     521    updateRubberBandingState();
     522}
     523
    519524void ScrollController::startSnapRubberbandTimer()
    520525{
     
    585590    if (isRubberBanding == m_isRubberBanding)
    586591        return;
     592
     593    m_isRubberBanding = isRubberBanding;
     594    if (m_isRubberBanding)
     595        updateRubberBandingEdges(m_client.stretchAmount());
     596    else
     597        m_rubberBandingEdges = { };
     598
     599    m_client.rubberBandingStateChanged(m_isRubberBanding);
     600}
     601
     602void ScrollController::updateRubberBandingEdges(IntSize clientStretch)
     603{
     604    m_rubberBandingEdges.setLeft(clientStretch.width() < 0);
     605    m_rubberBandingEdges.setRight(clientStretch.width() > 0);
     606
     607    m_rubberBandingEdges.setTop(clientStretch.height() < 0);
     608    m_rubberBandingEdges.setBottom(clientStretch.height() > 0);
     609}
     610
     611bool ScrollController::scrolledToRubberbandingEdge() const
     612{
     613    auto pinnedEdges = m_client.edgePinnedState();
    587614   
    588     m_isRubberBanding = isRubberBanding;
    589     m_client.rubberBandingStateChanged(m_isRubberBanding);
     615    for (auto side : allBoxSides) {
     616        if (m_rubberBandingEdges[side] && !pinnedEdges[side])
     617            return false;
     618    }
     619   
     620    return true;
    590621}
    591622
  • trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h

    r264151 r269373  
    148148    bool allowsVerticalStretching(const PlatformWheelEvent&) const final;
    149149    bool pinnedInDirection(const FloatSize&) const final;
     150    RectEdges<bool> edgePinnedState() const final;
    150151    bool canScrollHorizontally() const final;
    151152    bool canScrollVertically() const final;
  • trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm

    r264280 r269373  
    13201320}
    13211321
     1322RectEdges<bool> ScrollAnimatorMac::edgePinnedState() const
     1323{
     1324    return m_scrollableArea.edgePinnedState();
     1325}
     1326
    13221327// FIXME: We should find a way to share some of the code from newGestureIsStarting(), isAlreadyPinnedInDirectionOfGesture(),
    13231328// allowsVerticalStretching(), and allowsHorizontalStretching() with the implementation in ScrollingTreeFrameScrollingNodeMac.
  • trunk/Source/WebCore/platform/mock/ScrollAnimatorMock.h

    r251173 r269373  
    5050    IntSize stretchAmount() const override { return IntSize(); }
    5151    bool pinnedInDirection(const FloatSize&) const override { return false; }
     52    RectEdges<bool> edgePinnedState() const override { return { }; }
    5253    bool canScrollHorizontally() const override { return false; }
    5354    bool canScrollVertically() const override { return false; }
Note: See TracChangeset for help on using the changeset viewer.