Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0a7fbd0e87756615ec98e0f674be8886bbac17ab
      
https://github.com/WebKit/WebKit/commit/0a7fbd0e87756615ec98e0f674be8886bbac17ab
  Author: Wenson Hsieh <wenson_hs...@apple.com>
  Date:   2025-07-20 (Sun, 20 Jul 2025)

  Changed paths:
    M Source/WebKit/Platform/spi/ios/UIKitSPI.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/ios/UIKitUtilities.h

  Log Message:
  -----------
  [Liquid Glass] [iOS] Scroll pockets disappear after ending a navigation swipe
https://bugs.webkit.org/show_bug.cgi?id=296254
rdar://156274449

Reviewed by Abrar Rahman Protyasha.

Work around another case where scroll pockets disappear on iOS, when swiping 
backwards/forwards.
After recent changes in UIKit, pocketed element bounds are cached per scroll 
pocket, but these
bounds are (sometimes) not invalidated when scroll views change 
positions/transforms or are
reparented in the view hierarchy. One of these cases is when swiping 
back/forwards, where
`WKScrollView` is temporarily parented under the `LiveSwipeViewClipping` layer 
before being moved
back under the `WKWebView` after the swipe is complete. The end result is that 
scroll pockets are
*removed* from the view hierarchy, since UIKit determines they aren't 
necessary, due to the fact
that the pocketed element rects don't intersect with the scroll view's frame 
right after the swipe
finishes, since the scroll view is offscreen.

As a temporary workaround, we forcibly invalidate the scroll pockets' cached 
geometries after a
navigation swipe finishes. This change should be reverted once the fix for the 
underlying issue
lands, in rdar://156271879.

* Source/WebKit/Platform/spi/ios/UIKitSPI.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _navigationGestureDidEnd]):
(-[WKWebView _forceScrollPocketsToRecomputeElementRegions]):
* Source/WebKit/UIProcess/ios/UIKitUtilities.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to