[webkit-changes] [WebKit/WebKit] f72d58: [UI-side compositing] Keyboard scroll should not s...

Richard Robinson noreply at github.com
Mon Mar 13 12:12:53 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f72d588a05aa866762a1cf414496ad92a57f1237
      https://github.com/WebKit/WebKit/commit/f72d588a05aa866762a1cf414496ad92a57f1237
  Author: Richard Robinson <richard_robinson2 at apple.com>
  Date:   2023-03-13 (Mon, 13 Mar 2023)

  Changed paths:
    M LayoutTests/fast/scrolling/mac/keyboard-scrolling-with-mouse-scroll-expected.txt
    M LayoutTests/fast/scrolling/mac/keyboard-scrolling-with-mouse-scroll.html
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/WebCore/page/scrolling/ScrollingTree.cpp
    M Source/WebCore/page/scrolling/ScrollingTree.h
    M Source/WebCore/platform/KeyboardScrollingAnimator.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h
    M Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingTreeIOS.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingTreeIOS.h
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.h
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.h
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm

  Log Message:
  -----------
  [UI-side compositing] Keyboard scroll should not start if a wheel gesture event is in progress
https://bugs.webkit.org/show_bug.cgi?id=253726
rdar://106563114

Reviewed by Simon Fraser.

Wheel event scrolls should always take precedence over keyboard scrolls. Without UI Side Compositing,
this currently works by stopping any keyboard scrolls whenever any wheel event is received. For
keyboard scrolling with UI Side Compositing enabled, this is not an ideal mechanism. Instead, a
keyboard scroll should never begin in the first place if a wheel event gesture scroll is in progress.

There already exists ways to know if a wheel event gesture scroll is in progress on iOS, so this PR
just brings the same logic to macOS. Then, when a keyboard scroll is about to begin, it bails out
if there is a wheel event gesture scroll in progress.

This PR also improves and fixes the flakyness of the existing layout test which tests this
functionality, and makes it work when UI-side compositing is enabled or disabled.

* Source/WebCore/platform/KeyboardScrollingAnimator.cpp:
(WebCore::KeyboardScrollingAnimator::beginKeyboardScrollGesture):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll):
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll): Deleted.
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll): Deleted.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartScroll):
(WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndScroll):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.h:
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxyIOS::scrollingTreeNodeWillStartScroll): Deleted.
(WebKit::RemoteScrollingCoordinatorProxyIOS::scrollingTreeNodeDidEndScroll): Deleted.
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingTreeIOS.cpp:
(WebKit::RemoteScrollingTreeIOS::scrollingTreeNodeWillStartScroll): Deleted.
(WebKit::RemoteScrollingTreeIOS::scrollingTreeNodeDidEndScroll): Deleted.
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingTreeIOS.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm:
(WebKit::RemoteScrollingTreeMac::handleWheelEventPhase):

Canonical link: https://commits.webkit.org/261581@main




More information about the webkit-changes mailing list