Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f30c34d4ec6ef1d2c602cbc11e4fc21c1459f41e
      
https://github.com/WebKit/WebKit/commit/f30c34d4ec6ef1d2c602cbc11e4fc21c1459f41e
  Author: Richard Robinson <[email protected]>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    M Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h
    M Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
    M Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h
    M Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm
    M Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm
    M Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h
    M Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm
    M 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.h
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm
    M Source/WebKit/UIProcess/mac/WebViewImpl.h
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm
    M Tools/TestWebKitAPI/Helpers/cocoa/WebPage+Extras.swift
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebPageScrollbarTests.swift

  Log Message:
  -----------
  [AppKit Gestures] Add a mechanism to determine if a point is over a scrollbar
https://bugs.webkit.org/show_bug.cgi?id=319204
rdar://182057923

Reviewed by Simon Fraser and Abrar Rahman Protyasha.

Add a UI-side path to determine whether a point (in web view coordinates) is 
over a scrollbar.

Unlike the existing `_windowResizeMouseLocationIsInVisibleScrollerThumb:` path, 
which relies on
cached web-content information and only considers the vertical scrollbar thumb, 
this works for
both axes and uses the UI-side scrolling tree.

The request flows from WKWebView through WebViewImpl and 
RemoteScrollingCoordinatorProxy into
RemoteScrollingTreeMac, which hit-tests the scroller host layers owned by 
ScrollerPairMac.

Overlay scrollbars whose knob has faded out are treated as not present.

Test: Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebPageScrollbarTests.swift

* Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::isPointOverScrollbar const):
* Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
* Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::isPointOverScrollbar const):
* Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
* Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h:
* Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm:
(-[WKWebView isPointOverScrollbar:]):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::isPointOverScrollbar):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
(WebKit::RemoteScrollingTree::isPointOverScrollbar):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm:
(WebKit::RemoteScrollingTreeMac::isPointOverScrollbar):
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::isPointOverScrollbar):
* Tools/TestWebKitAPI/Helpers/cocoa/WebPage+Extras.swift:
(isPointOverScrollbar(_:)):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebPageScrollbarTests.swift: Added.
(ScrollbarTests.detectsVerticalScrollbarOnRight(_:expectHit:)):
(ScrollbarTests.detectsVerticalScrollbarOnLeft(_:expectHit:)):
(ScrollbarTests.detectsHorizontalScrollbarOnBottom(_:expectHit:)):

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



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

Reply via email to