Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a7fd0d9da2784c15f4d9afa9b91c812ebdebce49
      
https://github.com/WebKit/WebKit/commit/a7fd0d9da2784c15f4d9afa9b91c812ebdebce49
  Author: Wenson Hsieh <[email protected]>
  Date:   2023-10-27 (Fri, 27 Oct 2023)

  Changed paths:
    M Source/WTF/wtf/PlatformHave.h
    M 
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm
    M Source/WebKit/UIProcess/ios/UIKitUtilities.h
    M Source/WebKit/UIProcess/ios/UIKitUtilities.mm

  Log Message:
  -----------
  [iOS] Adopt `-[UIScrollView 
setTransfers(Horizontal|Vertical)ScrollingToParent:]`
https://bugs.webkit.org/show_bug.cgi?id=263755
rdar://114330057

Reviewed by Richard Robinson.

Adopt equivalent replacement APIs, corresponding to these two `UIScrollView` 
SPI methods:
• `-_setAllowsParentToBeginHorizontally:`   -> 
`-setTransfersHorizontalScrollingToParent`
• `-_setAllowsParentToBeginVertically:`     -> 
`-setTransfersVerticalScrollingToParent`

To make this work while maintaining compatibility with iOS 17 and prior, we add 
a new compile-time
flag along with a runtime selector check, and only use this new API when both 
checks pass.

* Source/WTF/wtf/PlatformHave.h:

Remove a compile-time flag that's no longer needed.

* 
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateScrollViewForOverscrollBehavior):
* Source/WebKit/UIProcess/ios/UIKitUtilities.h:
* Source/WebKit/UIProcess/ios/UIKitUtilities.mm:
(-[UIScrollView _wk_setTransfersHorizontalScrollingToParent:]):
(-[UIScrollView _wk_setTransfersVerticalScrollingToParent:]):

Add new helper category methods on `UIScrollView` to abstract away the fallback 
logic described
above.

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to