Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 759ae11c550eac10168abfdc0fedc8b68171fdee
https://github.com/WebKit/WebKit/commit/759ae11c550eac10168abfdc0fedc8b68171fdee
Author: Phipson Lee <[email protected]>
Date: 2026-02-11 (Wed, 11 Feb 2026)
Changed paths:
M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
Log Message:
-----------
Animate Scene Resize for Video Element Fullscreen Transition
https://bugs.webkit.org/show_bug.cgi?id=306149
rdar://164879910
Reviewed by Aditya Keerthi.
This PR updates the Element Fullscreen animation for visionOS. Currently,
visionOS requires 2 separate scene resizes
during the fullscreen animation: one that resized the scene so that it
encompasses the bounds of both the inWindow and outWindow,
and one that resized the scene to fit the inWindow once the animation has
settled.
To simplify this animation, we now combine both animations into one, such that
the scene resizes while the windows
are transitioning.
Note that this is a visionOS specific change. Other OSes and third party apps
using WebKit with fullscreen transitions will use
the old transition behavior.
To synchronize the UIView animations with the scene resize animation, this PR
also moves all the animations into the
scene resizing function's completion block. This is because the completion
block notifies the client that the
resize request has been received, which corresponds to when the scene resize
has started, rather than when the resize
has completed.
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(WebKit::resizeScene):
- Removes the scene geometry animation call in resizeScene. The completion
handler in mrui_requestResize
corresponds to when the resize animation begins, so we instead apply the scene
geometry animation in the
completion block.
(-[WKFullScreenWindowController
beganEnterFullScreenWithInitialFrame:finalFrame:completionHandler:]):
- Moves the completionHandler for when the fullscreen animation finishes to
after _performSpatialFullScreenTransition
completes, instead of before the transition begins. Applies to only visionOS.
(-[WKFullScreenWindowController _shouldAnimateResizeScene]):
(-[WKFullScreenWindowController _configureSpatialFullScreenTransition]):
- For the animated case, we removed the extraneous scene resize call to set a
temporary scene size. Now, all the resize animations happen in
_performSpatialFullScreenTransition. This function is only used to apply the
WKFixedSizeWindow to prevent windows
from resizing while the scene is resizing.
(-[WKFullScreenWindowController
_configureSpatialFullScreenTransitionWithSceneResizeAnimation]):
(-[WKFullScreenWindowController
_configureSpatialFullScreenTransitionWithoutSceneResizeAnimation]):
(-[WKFullScreenWindowController
_performSpatialFullScreenTransition:completionHandler:]):
- Applies all window animations to the completion block of resizeScene, which
corresponds to when the animation
begins.
- Applies an XY offset to the in and out window such that they are centered
while the scene is resizing, because
the content is left and top aligned.
- Added an animation to the ornament such that it is properly positioned as it
moves in and out of the scene, even
while scene is resizing
- Applies the original completion handler to the inWindow fade-in animation,
which is the last animation to complete
in the animation block.
Canonical link: https://commits.webkit.org/307321@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications