⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 242670 in webkit


Ignore:
Timestamp:
Mar 8, 2019, 6:35:57 PM (7 years ago)
Author:
Simon Fraser
Message:

Make it clearer which data is protected by the two locks in ScrollingTree
https://bugs.webkit.org/show_bug.cgi?id=195501

Reviewed by Tim Horton.

Gather ScrollingTree member variables into two structs, and name the struct
members and the locks to make it clear which data is protected by each lock.

We only need to protect data read by multiple threads; these are the scrolling
thread, the event handling thread (which runs ThreadedScrollingTree::tryToHandleWheelEvent()),
and the main thread, which pokes various bits of pin/rubber-banding state.
Ideally the main thread would always push data to the scrolling thread via a commit,
but that's not what happens now.

Suspiciously, ScrollingTree::shouldHandleWheelEventSynchronously() uses the root node,
so should probably hold a lock shared with the scrolling thread (webkit.org/b/195502).

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
(WebCore::ScrollingTree::commitTreeState):
(WebCore::ScrollingTree::setAsyncFrameOrOverflowScrollingEnabled):
(WebCore::ScrollingTree::setMainFrameScrollPosition):
(WebCore::ScrollingTree::eventTrackingTypeForPoint):
(WebCore::ScrollingTree::isRubberBandInProgress):
(WebCore::ScrollingTree::setMainFrameIsRubberBanding):
(WebCore::ScrollingTree::isScrollSnapInProgress):
(WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
(WebCore::ScrollingTree::setMainFramePinState):
(WebCore::ScrollingTree::setCanRubberBandState):
(WebCore::ScrollingTree::setScrollPinningBehavior):
(WebCore::ScrollingTree::scrollPinningBehavior):
(WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
(WebCore::ScrollingTree::latchedNode):
(WebCore::ScrollingTree::setLatchedNode):
(WebCore::ScrollingTree::clearLatchedNode):
(WebCore::ScrollingTree::scrollingTreeAsText):
(WebCore::ScrollingTree::touchActionDataAtPoint const):
(WebCore::ScrollingTree::mainFrameScrollPosition): Deleted.
(WebCore::ScrollingTree::mainFrameLayoutViewport): Deleted.
(WebCore::ScrollingTree::rubberBandsAtLeft): Deleted.
(WebCore::ScrollingTree::rubberBandsAtRight): Deleted.
(WebCore::ScrollingTree::rubberBandsAtBottom): Deleted.
(WebCore::ScrollingTree::rubberBandsAtTop): Deleted.

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::hasLatchedNode const):

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::stretchAmount):

  • platform/graphics/FloatPoint.h:

(WebCore::FloatPoint::isZero const):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r242669 r242670  
     12019-03-08  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make it clearer which data is protected by the two locks in ScrollingTree
     4        https://bugs.webkit.org/show_bug.cgi?id=195501
     5
     6        Reviewed by Tim Horton.
     7
     8        Gather ScrollingTree member variables into two structs, and name the struct
     9        members and the locks to make it clear which data is protected by each lock.
     10       
     11        We only need to protect data read by multiple threads; these are the scrolling
     12        thread, the event handling thread (which runs ThreadedScrollingTree::tryToHandleWheelEvent()),
     13        and the main thread, which pokes various bits of pin/rubber-banding state.
     14        Ideally the main thread would always push data to the scrolling thread via a commit,
     15        but that's not what happens now.
     16
     17        Suspiciously, ScrollingTree::shouldHandleWheelEventSynchronously() uses the root node,
     18        so should probably hold a lock shared with the scrolling thread (webkit.org/b/195502).
     19       
     20        * page/scrolling/ScrollingTree.cpp:
     21        (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
     22        (WebCore::ScrollingTree::commitTreeState):
     23        (WebCore::ScrollingTree::setAsyncFrameOrOverflowScrollingEnabled):
     24        (WebCore::ScrollingTree::setMainFrameScrollPosition):
     25        (WebCore::ScrollingTree::eventTrackingTypeForPoint):
     26        (WebCore::ScrollingTree::isRubberBandInProgress):
     27        (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
     28        (WebCore::ScrollingTree::isScrollSnapInProgress):
     29        (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
     30        (WebCore::ScrollingTree::setMainFramePinState):
     31        (WebCore::ScrollingTree::setCanRubberBandState):
     32        (WebCore::ScrollingTree::setScrollPinningBehavior):
     33        (WebCore::ScrollingTree::scrollPinningBehavior):
     34        (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
     35        (WebCore::ScrollingTree::latchedNode):
     36        (WebCore::ScrollingTree::setLatchedNode):
     37        (WebCore::ScrollingTree::clearLatchedNode):
     38        (WebCore::ScrollingTree::scrollingTreeAsText):
     39        (WebCore::ScrollingTree::touchActionDataAtPoint const):
     40        (WebCore::ScrollingTree::mainFrameScrollPosition): Deleted.
     41        (WebCore::ScrollingTree::mainFrameLayoutViewport): Deleted.
     42        (WebCore::ScrollingTree::rubberBandsAtLeft): Deleted.
     43        (WebCore::ScrollingTree::rubberBandsAtRight): Deleted.
     44        (WebCore::ScrollingTree::rubberBandsAtBottom): Deleted.
     45        (WebCore::ScrollingTree::rubberBandsAtTop): Deleted.
     46        * page/scrolling/ScrollingTree.h:
     47        (WebCore::ScrollingTree::hasLatchedNode const):
     48        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
     49        (WebCore::ScrollingTreeScrollingNodeDelegateMac::stretchAmount):
     50        * platform/graphics/FloatPoint.h:
     51        (WebCore::FloatPoint::isZero const):
     52
    1532019-03-08  Simon Fraser  <simon.fraser@apple.com>
    254
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp

    r242359 r242670  
    5050{
    5151    // This method is invoked by the event handling thread
    52     LockHolder lock(m_mutex);
     52    LockHolder lock(m_treeStateMutex);
    5353
    5454    bool shouldSetLatch = wheelEvent.shouldConsiderLatching();
     
    5858
    5959    if (shouldSetLatch)
    60         m_latchedNodeID = 0;
    61    
    62     if (!m_eventTrackingRegions.isEmpty() && m_rootNode) {
     60        m_treeState.latchedNodeID = 0;
     61   
     62    if (!m_treeState.eventTrackingRegions.isEmpty() && m_rootNode) {
    6363        auto& frameScrollingNode = downcast<ScrollingTreeFrameScrollingNode>(*m_rootNode);
    6464        FloatPoint position = wheelEvent.position();
    65         position.move(frameScrollingNode.viewToContentsOffset(m_mainFrameScrollPosition));
     65        position.move(frameScrollingNode.viewToContentsOffset(m_treeState.mainFrameScrollPosition));
    6666
    6767        const EventNames& names = eventNames();
     
    6969
    7070        // Event regions are affected by page scale, so no need to map through scale.
    71         bool isSynchronousDispatchRegion = m_eventTrackingRegions.trackingTypeForPoint(names.wheelEvent, roundedPosition) == TrackingType::Synchronous
    72             || m_eventTrackingRegions.trackingTypeForPoint(names.mousewheelEvent, roundedPosition) == TrackingType::Synchronous;
     71        bool isSynchronousDispatchRegion = m_treeState.eventTrackingRegions.trackingTypeForPoint(names.wheelEvent, roundedPosition) == TrackingType::Synchronous
     72            || m_treeState.eventTrackingRegions.trackingTypeForPoint(names.mousewheelEvent, roundedPosition) == TrackingType::Synchronous;
    7373        LOG_WITH_STREAM(Scrolling, stream << "ScrollingTree::shouldHandleWheelEventSynchronously: wheelEvent at " << wheelEvent.position() << " mapped to content point " << position << ", in non-fast region " << isSynchronousDispatchRegion);
    7474
     
    151151            || rootNode->hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer)
    152152            || rootNode->hasChangedProperty(ScrollingStateFrameScrollingNode::AsyncFrameOrOverflowScrollingEnabled))) {
    153         LockHolder lock(m_mutex);
     153        LockHolder lock(m_treeStateMutex);
    154154
    155155        if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
    156             m_mainFrameScrollPosition = FloatPoint();
     156            m_treeState.mainFrameScrollPosition = { };
    157157
    158158        if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateFrameScrollingNode::EventTrackingRegion))
    159             m_eventTrackingRegions = scrollingStateTree->rootStateNode()->eventTrackingRegions();
     159            m_treeState.eventTrackingRegions = scrollingStateTree->rootStateNode()->eventTrackingRegions();
    160160
    161161        if (rootStateNodeChanged || rootNode->hasChangedProperty(ScrollingStateFrameScrollingNode::AsyncFrameOrOverflowScrollingEnabled))
     
    177177   
    178178    for (auto nodeID : unvisitedNodes) {
    179         if (nodeID == m_latchedNodeID)
     179        if (nodeID == m_treeState.latchedNodeID)
    180180            clearLatchedNode();
    181181       
     
    288288void ScrollingTree::setAsyncFrameOrOverflowScrollingEnabled(bool enabled)
    289289{
    290     LockHolder lock(m_mutex);
    291290    m_asyncFrameOrOverflowScrollingEnabled = enabled;
    292291}
    293292
     293void ScrollingTree::setMainFrameScrollPosition(FloatPoint position)
     294{
     295    LockHolder lock(m_treeStateMutex);
     296    m_treeState.mainFrameScrollPosition = position;
     297}
     298
     299TrackingType ScrollingTree::eventTrackingTypeForPoint(const AtomicString& eventName, IntPoint p)
     300{
     301    LockHolder lock(m_treeStateMutex);
     302    return m_treeState.eventTrackingRegions.trackingTypeForPoint(eventName, p);
     303}
     304
     305// Can be called from the main thread.
     306bool ScrollingTree::isRubberBandInProgress()
     307{
     308    LockHolder lock(m_treeStateMutex);
     309    return m_treeState.mainFrameIsRubberBanding;
     310}
     311
     312void ScrollingTree::setMainFrameIsRubberBanding(bool isRubberBanding)
     313{
     314    LockHolder locker(m_treeStateMutex);
     315    m_treeState.mainFrameIsRubberBanding = isRubberBanding;
     316}
     317
     318// Can be called from the main thread.
     319bool ScrollingTree::isScrollSnapInProgress()
     320{
     321    LockHolder lock(m_treeStateMutex);
     322    return m_treeState.mainFrameIsScrollSnapping;
     323}
     324   
     325void ScrollingTree::setMainFrameIsScrollSnapping(bool isScrollSnapping)
     326{
     327    LockHolder locker(m_treeStateMutex);
     328    m_treeState.mainFrameIsScrollSnapping = isScrollSnapping;
     329}
     330
    294331void ScrollingTree::setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight, bool pinnedToTheTop, bool pinnedToTheBottom)
    295332{
    296333    LockHolder locker(m_swipeStateMutex);
    297334
    298     m_mainFramePinnedToTheLeft = pinnedToTheLeft;
    299     m_mainFramePinnedToTheRight = pinnedToTheRight;
    300     m_mainFramePinnedToTheTop = pinnedToTheTop;
    301     m_mainFramePinnedToTheBottom = pinnedToTheBottom;
    302 }
    303 
    304 FloatPoint ScrollingTree::mainFrameScrollPosition()
    305 {
    306     LockHolder lock(m_mutex);
    307     return m_mainFrameScrollPosition;
    308 }
    309 
    310 FloatRect ScrollingTree::mainFrameLayoutViewport()
    311 {
    312     if (!m_rootNode)
    313         return { };
    314 
    315     auto& frameScrollingNode = downcast<ScrollingTreeFrameScrollingNode>(*m_rootNode);
    316     return frameScrollingNode.layoutViewport();
    317 }
    318 
    319 void ScrollingTree::setMainFrameScrollPosition(FloatPoint position)
    320 {
    321     LockHolder lock(m_mutex);
    322     m_mainFrameScrollPosition = position;
    323 }
    324 
    325 TrackingType ScrollingTree::eventTrackingTypeForPoint(const AtomicString& eventName, IntPoint p)
    326 {
    327     LockHolder lock(m_mutex);
    328    
    329     return m_eventTrackingRegions.trackingTypeForPoint(eventName, p);
    330 }
    331 
    332 bool ScrollingTree::isRubberBandInProgress()
    333 {
    334     LockHolder lock(m_mutex);   
    335 
    336     return m_mainFrameIsRubberBanding;
    337 }
    338 
    339 void ScrollingTree::setMainFrameIsRubberBanding(bool isRubberBanding)
    340 {
    341     LockHolder locker(m_mutex);
    342 
    343     m_mainFrameIsRubberBanding = isRubberBanding;
    344 }
    345 
    346 bool ScrollingTree::isScrollSnapInProgress()
    347 {
    348     LockHolder lock(m_mutex);
    349    
    350     return m_mainFrameIsScrollSnapping;
    351 }
    352    
    353 void ScrollingTree::setMainFrameIsScrollSnapping(bool isScrollSnapping)
    354 {
    355     LockHolder locker(m_mutex);
    356    
    357     m_mainFrameIsScrollSnapping = isScrollSnapping;
     335    m_swipeState.mainFramePinnedToTheLeft = pinnedToTheLeft;
     336    m_swipeState.mainFramePinnedToTheRight = pinnedToTheRight;
     337    m_swipeState.mainFramePinnedToTheTop = pinnedToTheTop;
     338    m_swipeState.mainFramePinnedToTheBottom = pinnedToTheBottom;
    358339}
    359340
     
    362343    LockHolder locker(m_swipeStateMutex);
    363344
    364     m_rubberBandsAtLeft = canRubberBandAtLeft;
    365     m_rubberBandsAtRight = canRubberBandAtRight;
    366     m_rubberBandsAtTop = canRubberBandAtTop;
    367     m_rubberBandsAtBottom = canRubberBandAtBottom;
    368 }
    369 
    370 bool ScrollingTree::rubberBandsAtLeft()
     345    m_swipeState.rubberBandsAtLeft = canRubberBandAtLeft;
     346    m_swipeState.rubberBandsAtRight = canRubberBandAtRight;
     347    m_swipeState.rubberBandsAtTop = canRubberBandAtTop;
     348    m_swipeState.rubberBandsAtBottom = canRubberBandAtBottom;
     349}
     350
     351bool ScrollingTree::isHandlingProgrammaticScroll()
     352{
     353    return m_isHandlingProgrammaticScroll;
     354}
     355
     356// Can be called from the main thread.
     357void ScrollingTree::setScrollPinningBehavior(ScrollPinningBehavior pinning)
     358{
     359    LockHolder locker(m_swipeStateMutex);
     360   
     361    m_swipeState.scrollPinningBehavior = pinning;
     362}
     363
     364ScrollPinningBehavior ScrollingTree::scrollPinningBehavior()
    371365{
    372366    LockHolder lock(m_swipeStateMutex);
    373 
    374     return m_rubberBandsAtLeft;
    375 }
    376 
    377 bool ScrollingTree::rubberBandsAtRight()
    378 {
    379     LockHolder lock(m_swipeStateMutex);
    380 
    381     return m_rubberBandsAtRight;
    382 }
    383 
    384 bool ScrollingTree::rubberBandsAtBottom()
    385 {
    386     LockHolder lock(m_swipeStateMutex);
    387 
    388     return m_rubberBandsAtBottom;
    389 }
    390 
    391 bool ScrollingTree::rubberBandsAtTop()
    392 {
    393     LockHolder lock(m_swipeStateMutex);
    394 
    395     return m_rubberBandsAtTop;
    396 }
    397 
    398 bool ScrollingTree::isHandlingProgrammaticScroll()
    399 {
    400     return m_isHandlingProgrammaticScroll;
    401 }
    402 
    403 void ScrollingTree::setScrollPinningBehavior(ScrollPinningBehavior pinning)
    404 {
    405     LockHolder locker(m_swipeStateMutex);
    406    
    407     m_scrollPinningBehavior = pinning;
    408 }
    409 
    410 ScrollPinningBehavior ScrollingTree::scrollPinningBehavior()
    411 {
    412     LockHolder lock(m_swipeStateMutex);
    413    
    414     return m_scrollPinningBehavior;
     367   
     368    return m_swipeState.scrollPinningBehavior;
    415369}
    416370
     
    422376    LockHolder lock(m_swipeStateMutex);
    423377
    424     if (wheelEvent.deltaX() > 0 && m_mainFramePinnedToTheLeft && !m_rubberBandsAtLeft)
     378    if (wheelEvent.deltaX() > 0 && m_swipeState.mainFramePinnedToTheLeft && !m_swipeState.rubberBandsAtLeft)
    425379        return true;
    426     if (wheelEvent.deltaX() < 0 && m_mainFramePinnedToTheRight && !m_rubberBandsAtRight)
     380    if (wheelEvent.deltaX() < 0 && m_swipeState.mainFramePinnedToTheRight && !m_swipeState.rubberBandsAtRight)
    427381        return true;
    428     if (wheelEvent.deltaY() > 0 && m_mainFramePinnedToTheTop && !m_rubberBandsAtTop)
     382    if (wheelEvent.deltaY() > 0 && m_swipeState.mainFramePinnedToTheTop && !m_swipeState.rubberBandsAtTop)
    429383        return true;
    430     if (wheelEvent.deltaY() < 0 && m_mainFramePinnedToTheBottom && !m_rubberBandsAtBottom)
     384    if (wheelEvent.deltaY() < 0 && m_swipeState.mainFramePinnedToTheBottom && !m_swipeState.rubberBandsAtBottom)
    431385        return true;
    432386
     
    446400ScrollingNodeID ScrollingTree::latchedNode()
    447401{
    448     LockHolder locker(m_mutex);
    449     return m_latchedNodeID;
     402    LockHolder locker(m_treeStateMutex);
     403    return m_treeState.latchedNodeID;
    450404}
    451405
    452406void ScrollingTree::setLatchedNode(ScrollingNodeID node)
    453407{
    454     LockHolder locker(m_mutex);
    455     m_latchedNodeID = node;
     408    LockHolder locker(m_treeStateMutex);
     409    m_treeState.latchedNodeID = node;
    456410}
    457411
    458412void ScrollingTree::clearLatchedNode()
    459413{
    460     LockHolder locker(m_mutex);
    461     m_latchedNodeID = 0;
     414    LockHolder locker(m_treeStateMutex);
     415    m_treeState.latchedNodeID = 0;
    462416}
    463417
     
    468422    TextStream::GroupScope scope(ts);
    469423    ts << "scrolling tree";
    470    
    471     if (m_latchedNodeID)
    472         ts.dumpProperty("latched node", m_latchedNodeID);
    473 
    474     if (m_mainFrameScrollPosition != IntPoint())
    475         ts.dumpProperty("main frame scroll position", m_mainFrameScrollPosition);
    476    
    477     {
    478         LockHolder lock(m_mutex);
    479         if (m_rootNode) {
    480             TextStream::GroupScope scope(ts);
    481             m_rootNode->dump(ts, ScrollingStateTreeAsTextBehaviorIncludeLayerPositions);
    482         }
     424
     425    LockHolder locker(m_treeStateMutex);
     426
     427    if (m_treeState.latchedNodeID)
     428        ts.dumpProperty("latched node", m_treeState.latchedNodeID);
     429
     430    if (!m_treeState.mainFrameScrollPosition.isZero())
     431        ts.dumpProperty("main frame scroll position", m_treeState.mainFrameScrollPosition);
     432   
     433    if (m_rootNode) {
     434        TextStream::GroupScope scope(ts);
     435        m_rootNode->dump(ts, ScrollingStateTreeAsTextBehaviorIncludeLayerPositions);
    483436    }
    484437
     
    490443{
    491444    // FIXME: This does not handle the case where there are multiple regions matching this point.
    492     for (auto& touchActionData : m_eventTrackingRegions.touchActionData) {
     445    for (auto& touchActionData : m_treeState.eventTrackingRegions.touchActionData) {
    493446        if (touchActionData.region.contains(p))
    494447            return touchActionData;
    495448    }
    496449
    497     return WTF::nullopt;
     450    return { };
    498451}
    499452#endif
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.h

    r242313 r242670  
    7070    WEBCORE_EXPORT virtual void commitTreeState(std::unique_ptr<ScrollingStateTree>);
    7171
    72     void setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight, bool pinnedToTheTop, bool pinnedToTheBottom);
    73 
    7472    virtual Ref<ScrollingTreeNode> createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) = 0;
    7573
     
    8987    virtual void reportSynchronousScrollingReasonsChanged(MonotonicTime, SynchronousScrollingReasons) { }
    9088    virtual void reportExposedUnfilledArea(MonotonicTime, unsigned /* unfilledArea */) { }
    91 
    92     FloatPoint mainFrameScrollPosition();
    93     WEBCORE_EXPORT virtual FloatRect mainFrameLayoutViewport();
    9489
    9590#if PLATFORM(IOS_FAMILY)
     
    115110#endif
    116111
     112    void setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight, bool pinnedToTheTop, bool pinnedToTheBottom);
     113
    117114    // Can be called from any thread. Will update what edges allow rubber-banding.
    118115    WEBCORE_EXPORT void setCanRubberBandState(bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom);
    119116
    120     bool rubberBandsAtLeft();
    121     bool rubberBandsAtRight();
    122     bool rubberBandsAtTop();
    123     bool rubberBandsAtBottom();
    124117    bool isHandlingProgrammaticScroll();
    125118   
     
    138131    void clearLatchedNode();
    139132
    140     bool hasLatchedNode() const { return m_latchedNodeID; }
     133    bool hasLatchedNode() const { return m_treeState.latchedNodeID; }
    141134    void setOrClearLatchedNode(const PlatformWheelEvent&, ScrollingNodeID);
    142135
     
    169162    ScrollingTreeNodeMap m_nodeMap;
    170163
    171     Lock m_mutex;
    172     EventTrackingRegions m_eventTrackingRegions;
    173     FloatPoint m_mainFrameScrollPosition;
     164    struct TreeState {
     165        ScrollingNodeID latchedNodeID { 0 };
     166        EventTrackingRegions eventTrackingRegions;
     167        FloatPoint mainFrameScrollPosition;
     168        bool mainFrameIsRubberBanding { false };
     169        bool mainFrameIsScrollSnapping { false };
     170    };
     171   
     172    Lock m_treeStateMutex;
     173    TreeState m_treeState;
     174
     175    struct SwipeState {
     176        ScrollPinningBehavior scrollPinningBehavior { DoNotPin };
     177        bool rubberBandsAtLeft { true };
     178        bool rubberBandsAtRight { true };
     179        bool rubberBandsAtTop { true };
     180        bool rubberBandsAtBottom { true };
     181        bool mainFramePinnedToTheLeft { true };
     182        bool mainFramePinnedToTheRight { true };
     183        bool mainFramePinnedToTheTop { true };
     184        bool mainFramePinnedToTheBottom { true };
     185    };
    174186
    175187    Lock m_swipeStateMutex;
    176     ScrollPinningBehavior m_scrollPinningBehavior { DoNotPin };
    177     ScrollingNodeID m_latchedNodeID { 0 };
     188    SwipeState m_swipeState;
    178189
    179190    unsigned m_fixedOrStickyNodeCount { 0 };
    180 
    181     bool m_rubberBandsAtLeft { true };
    182     bool m_rubberBandsAtRight { true };
    183     bool m_rubberBandsAtTop { true };
    184     bool m_rubberBandsAtBottom { true };
    185     bool m_mainFramePinnedToTheLeft { true };
    186     bool m_mainFramePinnedToTheRight { true };
    187     bool m_mainFramePinnedToTheTop { true };
    188     bool m_mainFramePinnedToTheBottom { true };
    189     bool m_mainFrameIsRubberBanding { false };
    190     bool m_mainFrameIsScrollSnapping { false };
    191191    bool m_scrollingPerformanceLoggingEnabled { false };
    192192    bool m_isHandlingProgrammaticScroll { false };
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm

    r242359 r242670  
    179179        stretch.setWidth(scrollPosition.x() - maximumScrollPosition().x());
    180180
     181    // FIXME: calling this function should not have these side-effects.
    181182    if (scrollingNode().isRootNode()) {
    182183        if (stretch.isZero())
  • trunk/Source/WebCore/platform/graphics/FloatPoint.h

    r225512 r242670  
    7171
    7272    static FloatPoint zero() { return FloatPoint(); }
     73    bool isZero() const { return !m_x && !m_y; }
    7374
    7475    WEBCORE_EXPORT static FloatPoint narrowPrecision(double x, double y);
Note: See TracChangeset for help on using the changeset viewer.