Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b2b580981c464483f2228f4da9b9981178424a7b
      
https://github.com/WebKit/WebKit/commit/b2b580981c464483f2228f4da9b9981178424a7b
  Author: Phipson Lee <[email protected]>
  Date:   2026-06-22 (Mon, 22 Jun 2026)

  Changed paths:
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm

  Log Message:
  -----------
  [Fullscreen] Element Video resizing causes video to shift partly out of 
window or become smaller than window
https://bugs.webkit.org/show_bug.cgi?id=317417
rdar://179974251

Reviewed by Abrar Rahman Protyasha.

The introduction of responsive live resizing on visionOS from 312437@main 
triggers additional
relayouts that conflict with the 
WKFullScreenViewController.viewDidLayoutSubviews when entering
element fullscreen. This causes issues where, while the fullscreen controller 
tries to layout
its subviews, the web view is also committing additional updates to the layer 
tree.

In general, the responsive live resize behavior is not needed for element 
fullscreen, so this
patch applies three changes:
1. We separate the logic behind _endLiveResize for the general case (without 
responsive relayout)
and the responsive relayout case. This also addresses the concerns raised in
https://bugs.webkit.org/show_bug.cgi?id=317000

2. We guard the `endLiveResizeHysteresis` change in 
`_rescheduleEndLiveResizeTimer` if we are
in fullscreen. This prevents us from triggering resize relayouts while resizing 
the fullscreen
window.

3. We also guard the `_endLiveResizeWithResponsiveRelayout` path if we are in 
fullscreen. This
prevents us from setting the liveResizeSnapshotState and the 
transactionIDForEndLiveResize
during fullscreen, which can cause issues with the rest of the layer tree 
commit flow.

The combination of these 3 changes result in us defaulting to the general, 
non-responsive live
resize relayout machinery when we are in fullscreen, which is pre-existing 
behavior.

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _rescheduleEndLiveResizeTimer]):
Add a guard to setting endLiveResizeHysteresis to 0ms if we are in fullscreen

(-[WKWebView _endLiveResizeWithResponsiveRelayout]):
(-[WKWebView _endLiveResizeDefault]):
Separate the "default live resize" logic from the "responsive live resize" logic
_endLiveResizeWithResponsiveRelayout also calls _endLiveResizeDefault when we 
are
in fullscreen

(-[WKWebView _endLiveResize]):
Update calls to use the helper functions as explained above

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



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

Reply via email to