[webkit-changes] [WebKit/WebKit] 2e3db9: [visionOS] Safari URL bar goes up a bit when enter...
Aditya Keerthi
noreply at github.com
Wed Aug 16 21:21:18 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2e3db948f82fab5aa0533be7f38aff5d263334b2
https://github.com/WebKit/WebKit/commit/2e3db948f82fab5aa0533be7f38aff5d263334b2
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2023-08-16 (Wed, 16 Aug 2023)
Changed paths:
M Source/WebKit/Platform/spi/visionos/MRUIKitSPI.h
M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
Log Message:
-----------
[visionOS] Safari URL bar goes up a bit when entering fullscreen, and back down when exiting
https://bugs.webkit.org/show_bug.cgi?id=260315
rdar://113512242
Reviewed by Tim Horton and Richard Robinson.
Safari's URL bar is implemented as an ornament. An ornament's position is
determined relative to its scene, using its `sceneAnchorPoint`. When performing
the fullscreen transition, the scene is temporarily resized to fit the original
window, as well as the fullscreen window. Since ornaments are anchored to scenes,
they move along with the resize.
Fix by temporarily updating ornament offsets to account for the temporary scene
size.
* Source/WebKit/Platform/spi/visionos/MRUIKitSPI.h:
`offset2D` is relative to the `sceneAnchorPoint`.
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKMRUIPlatterOrnamentProperties initWithOrnament:]):
Store the original `offset2D`, so that it can be restored when exiting fullscreen.
(-[WKFullScreenParentWindowState initWithWindow:]):
Store the original scene size, in order to determine the relative change in an
ornament's position.
(-[WKFullScreenWindowController _configureSpatialFullScreenTransition]):
(-[WKFullScreenWindowController _updateOrnamentOffsetsForTemporarySceneSize:]):
Update ornaments offsets to account for the temporary scene size.
(-[WKFullScreenWindowController _performSpatialFullScreenTransition:completionHandler:]):
Restore the original ornament offsets when exiting fullscreen.
Canonical link: https://commits.webkit.org/266984@main
More information about the webkit-changes
mailing list