Changeset 235236 in webkit


Ignore:
Timestamp:
Aug 23, 2018, 12:51:22 PM (6 years ago)
Author:
mitz@apple.com
Message:

[Cocoa] First scroll gesture in pinned, non-rubber-banding WKWebView may fail to initiate back/forward swipe
https://bugs.webkit.org/show_bug.cgi?id=188894
<rdar://problem/43651434>

Reviewed by Tim Horton.

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::wheelEvent): Set the rubber-band state on the ScrollingTree

synchronously rather than dispatching doing that to the scrolling thread. This is safe to
do because ScrollingTree synchrnoizes access to the rubber-band state with an internal
mutex.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r235234 r235236  
     12018-08-23  Dan Bernstein  <mitz@apple.com>
     2
     3        [Cocoa] First scroll gesture in pinned, non-rubber-banding WKWebView may fail to initiate back/forward swipe
     4        https://bugs.webkit.org/show_bug.cgi?id=188894
     5        <rdar://problem/43651434>
     6
     7        Reviewed by Tim Horton.
     8
     9        * WebProcess/WebPage/EventDispatcher.cpp:
     10        (WebKit::EventDispatcher::wheelEvent): Set the rubber-band state on the ScrollingTree
     11          synchronously rather than dispatching doing that to the scrolling thread. This is safe to
     12          do because ScrollingTree synchrnoizes access to the rubber-band state with an internal
     13          mutex.
     14
    1152018-08-23  Youenn Fablet  <youenn@apple.com>
    216
  • trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp

    r235205 r235236  
    120120        // scrolling tree can be notified.
    121121        // We only need to do this at the beginning of the gesture.
    122         if (platformWheelEvent.phase() == PlatformWheelEventPhaseBegan) {
    123             ScrollingThread::dispatch([scrollingTree, canRubberBandAtLeft, canRubberBandAtRight, canRubberBandAtTop, canRubberBandAtBottom] {
    124                 scrollingTree->setCanRubberBandState(canRubberBandAtLeft, canRubberBandAtRight, canRubberBandAtTop, canRubberBandAtBottom);
    125             });
    126         }
     122        if (platformWheelEvent.phase() == PlatformWheelEventPhaseBegan)
     123            scrollingTree->setCanRubberBandState(canRubberBandAtLeft, canRubberBandAtRight, canRubberBandAtTop, canRubberBandAtBottom);
    127124
    128125        ScrollingTree::EventResult result = scrollingTree->tryToHandleWheelEvent(platformWheelEvent);
Note: See TracChangeset for help on using the changeset viewer.