-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[visionOS] Add delegate method to prevent docking from element fullscreen. #46937
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
[visionOS] Add delegate method to prevent docking from element fullscreen. #46937
Conversation
EWS run on previous version of this PR (hash 8d0df36) |
EWS run on previous version of this PR (hash 0b7eab8) |
0b7eab8
to
5583ae2
Compare
EWS run on previous version of this PR (hash 5583ae2) |
@@ -57,6 +57,10 @@ class FullscreenClient { | |||
#if PLATFORM(IOS_FAMILY) | |||
virtual void requestPresentingViewController(CompletionHandler<void(UIViewController *, NSError *)>&&) { } | |||
#endif | |||
|
|||
#if ENABLE(LINEAR_MEDIA_PLAYER) | |||
virtual bool preventDocking(WebKit::WebPageProxy*) { return true; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this return true but the default value of FullscreenClient::preventDocking is false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this! I flipped the naming from allow
to prevent
precisely because I wanted the default to be false
not true
, but forgot to update this when I made the change. Fixed!
5583ae2
to
2c4a51f
Compare
EWS run on current version of this PR (hash 2c4a51f) |
…reen. rdar://145799817 https://bugs.webkit.org/show_bug.cgi?id=294702 Reviewed by Alex Christensen. Safari on visionOS would like to prevent docking from element fullscreen when the browser is in a certain state (spatial browsing). To accomplish this, add a new delegate method to FullscreenClient that gives the client the option to preventDocking (only for LinearMediaPlayer). WKFullScreenViewController checks this method, and if configured to prevent, removes the environment picker button / prevents it being added. * Source/WebKit/UIProcess/API/APIFullscreenClient.h: (API::FullscreenClient::preventDocking): * Source/WebKit/UIProcess/API/Cocoa/_WKFullscreenDelegate.h: * Source/WebKit/UIProcess/Cocoa/FullscreenClient.h: * Source/WebKit/UIProcess/Cocoa/FullscreenClient.mm: (WebKit::FullscreenClient::setDelegate): (WebKit::FullscreenClient::preventDocking): * Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm: (-[WKFullScreenViewController configureEnvironmentPickerOrFullscreenVideoButtonView]): Canonical link: https://commits.webkit.org/296597@main
2c4a51f
to
9338c51
Compare
Committed 296597@main (9338c51): https://commits.webkit.org/296597@main Reviewed commits have been landed. Closing PR #46937 and removing active labels. |
9338c51
2c4a51f
🛠 playstation