Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 30fd586f387b94f6c57da4fd6d971366c6ada57c
      
https://github.com/WebKit/WebKit/commit/30fd586f387b94f6c57da4fd6d971366c6ada57c
  Author: Abrar Rahman Protyasha <a_protya...@apple.com>
  Date:   2025-08-07 (Thu, 07 Aug 2025)

  Changed paths:
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm

  Log Message:
  -----------
  REGRESSION(298142@main): Web content may be temporarily offset during Safari 
View Controller presentation
https://bugs.webkit.org/show_bug.cgi?id=297076
rdar://157669095

Reviewed by Wenson Hsieh.

After 298142@main, we notice that the initial web content presented when
an SFSafariViewController sheet is brought up can be temporarily offset.
Logging suggests this can happen when we're in the middle of a live
resize, so _shouldDeferGeometryUpdates is respected and overridden
layout parameter updates are not dispatched on the first layer tree
transaction after obscured insets are set on the web view.

To work around this issue, we introduce a small escape hatch, where even
if _shouldDeferGeometryUpdates holds, we update the layout size if (a)
the web view lives in a Safari view service and (b) the window scene is
not being interactively resized.

We add a couple of API tests as coverage for 298142@main, just to verify
that these geometry updates can be made during animated/live resizes
without hanging the UI process.

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _didCommitLayerTree:]):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
(TEST(AnimatedResize, ChangingWebViewGeometryDuringLiveResizeDoesNotHang)):
(TEST(AnimatedResize, ChangingWebViewGeometryDuringAnimatedResizeDoesNotHang)):

Canonical link: https://commits.webkit.org/298370@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