Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 06265c042be1975112546b4b5f026f8ea6aa440d
      
https://github.com/WebKit/WebKit/commit/06265c042be1975112546b4b5f026f8ea6aa440d
  Author: Tim Horton <[email protected]>
  Date:   2025-05-24 (Sat, 24 May 2025)

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

  Log Message:
  -----------
  Stage Manager resize is very jumpy
https://bugs.webkit.org/show_bug.cgi?id=293530
rdar://151952483

Reviewed by Wenson Hsieh.

Fix two bugs with the "automatic live resize" mechanism:

1) In _beginLiveResize, we record the current scroll position; in 
_updateLiveResizeTransform
   we pass the scroll position through _contentOffsetAdjustedForObscuredInset 
before comparing
   it to the current one. But, the originally saved scroll position had the 
obscured inset
   factored into it. Subtract it out so that the math works out (this didn't 
cause trouble
   where automatic live resize was originally introduced, on visionOS, because 
it has no
   obscured insets).

2) Don't start a animated resize if we're about to kick off an automatic live 
resize.
   The precise timing of `_beginLiveResize` vs. clients calling into 
`_beginAnimatedResizeWithUpdates`
   is hard to guarantee, so make sure that if `_beginAnimatedResizeWithUpdates` 
is called first
   in a situation where we *will* start a live resize, we bail from the 
animated resize.
   We already guard against animated resize happening *during* live resize, we 
just missed this
   ordering.

* Source/WebKit/Platform/spi/ios/UIKitSPI.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _canBeginAutomaticLiveResize]):
(-[WKWebView _beginLiveResize]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):

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



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

Reply via email to