Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1bb4aac7b597326484a5bfc73b634d2e075b080c
      
https://github.com/WebKit/WebKit/commit/1bb4aac7b597326484a5bfc73b634d2e075b080c
  Author: Tim Horton <[email protected]>
  Date:   2026-02-24 (Tue, 24 Feb 2026)

  Changed paths:
    M Source/WebCore/page/scrolling/ScrollingTree.cpp
    M Source/WebCore/page/scrolling/ScrollingTree.h
    M Source/WebCore/platform/RectEdges.h
    M 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/mac/WKAppKitGestureController.mm

  Log Message:
  -----------
  [AppKit Gestures] Scrolling is not delegated to containing scrollviews when 
needed
https://bugs.webkit.org/show_bug.cgi?id=308353
rdar://165924859

Reviewed by Simon Fraser and Abrar Rahman Protyasha.

When WKWebView is nested inside a containing NSScrollView, our pan gesture needs
to duck out of the way and defer to the parent scroller if the given gesture
is primarily in a direction that we are fully pinned in.

* Source/WebCore/page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::pinnedStateIncludingAncestorsAtPoint):
To do so, make it possible to compute the pinning state at a given point in the
UI process (recursively crawling up the scrolling tree and only claiming 
pinned-ness
if all scrollers are pinned, so that nested subscrollers win over the outer 
scroller).

* Source/WebCore/page/scrolling/ScrollingTree.h:
* Source/WebCore/platform/RectEdges.h:
(WebCore::operator&=):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::pinnedStateIncludingAncestorsAtPoint):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pinnedStateIncludingAncestorsAtPoint):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/mac/WKAppKitGestureController.mm:
(-[WKPanGestureRecognizer initWithPage:target:action:]):
(-[WKPanGestureRecognizer shouldRecognizeForDelta:]):
(-[WKAppKitGestureController setUpPanGestureRecognizer]):
Then, have the gesture bail from recognizing if the gesture is primarily in a
fully-pinned direction.

(isBuiltInScrollViewPanGestureRecognizer):
(-[WKAppKitGestureController 
gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
Also, drive-by allow enclosing scroll views' pan gestures to recognize
simultaneously with our gestures.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to