Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream visionOS fullscreen transition logic #15195

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

pxlcoder
Copy link
Member

@pxlcoder pxlcoder commented Jun 22, 2023

9866948

Upstream visionOS fullscreen transition logic
https://bugs.webkit.org/show_bug.cgi?id=258404
rdar://111164029

Reviewed by Wenson Hsieh.

* Source/WebKit/Platform/spi/visionos/MRUIKitSPI.h: Added.
* Source/WebKit/Platform/spi/visionos/RealitySimulationServicesSPI.h: Added.
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(WebKit::useSpatialFullScreenTransition):
(WebKit::resizeScene):
(-[WKFixedSizeWindow _shouldResizeWithScene]):
(-[WKFullScreenParentWindowState initWithWindow:]):
(-[WKFullscreenWindowSceneDelegate initWithController:originalDelegate:]):
(-[WKFullscreenWindowSceneDelegate originalDelegate]):
(-[WKFullscreenWindowSceneDelegate windowScene:shouldCloseForReason:]):
(-[WKFullscreenWindowSceneDelegate methodSignatureForSelector:]):
(-[WKFullscreenWindowSceneDelegate respondsToSelector:]):
(-[WKFullscreenWindowSceneDelegate forwardInvocation:]):
(-[WKFullscreenWindowSceneDelegate forwardingTargetForSelector:]):
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _dismissFullscreenViewController]):
(-[WKFullScreenWindowController _configureSpatialFullScreenTransition]):
(-[WKFullScreenWindowController _performSpatialFullScreenTransition:completionHandler:]):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

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

4adb8ca

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2   πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt   πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@pxlcoder pxlcoder requested a review from cdumez as a code owner June 22, 2023 16:25
@pxlcoder pxlcoder self-assigned this Jun 22, 2023
@pxlcoder pxlcoder added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Jun 22, 2023

auto completion = makeBlockPtr([controller = retainPtr(controller), inWindow = retainPtr(inWindow), originalState = retainPtr(originalState), enter, completionHandler = WTFMove(completionHandler)] (BOOL finished) mutable {
if (!finished)
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Just curious β€” is it intended to skip the completionHandler in the case of !finished?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not intentional... I should remove this check as the animation isn't intended to be interruptible. Probably better in a follow-up, to avoid mixing with upstreaming.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! Definitely good to keep this upstreaming patch as-is.

@pxlcoder pxlcoder added the merge-queue Applied to send a pull request to merge-queue label Jun 22, 2023
https://bugs.webkit.org/show_bug.cgi?id=258404
rdar://111164029

Reviewed by Wenson Hsieh.

* Source/WebKit/Platform/spi/visionos/MRUIKitSPI.h: Added.
* Source/WebKit/Platform/spi/visionos/RealitySimulationServicesSPI.h: Added.
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(WebKit::useSpatialFullScreenTransition):
(WebKit::resizeScene):
(-[WKFixedSizeWindow _shouldResizeWithScene]):
(-[WKFullScreenParentWindowState initWithWindow:]):
(-[WKFullscreenWindowSceneDelegate initWithController:originalDelegate:]):
(-[WKFullscreenWindowSceneDelegate originalDelegate]):
(-[WKFullscreenWindowSceneDelegate windowScene:shouldCloseForReason:]):
(-[WKFullscreenWindowSceneDelegate methodSignatureForSelector:]):
(-[WKFullscreenWindowSceneDelegate respondsToSelector:]):
(-[WKFullscreenWindowSceneDelegate forwardInvocation:]):
(-[WKFullscreenWindowSceneDelegate forwardingTargetForSelector:]):
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _dismissFullscreenViewController]):
(-[WKFullScreenWindowController _configureSpatialFullScreenTransition]):
(-[WKFullScreenWindowController _performSpatialFullScreenTransition:completionHandler:]):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/265416@main
@webkit-commit-queue
Copy link
Collaborator

Committed 265416@main (9866948): https://commits.webkit.org/265416@main

Reviewed commits have been landed. Closing PR #15195 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 9866948 into WebKit:main Jun 22, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Bugs Unclassified bugs are placed in this component until the correct component can be determined.
Projects
None yet
4 participants