[webkit-changes] [WebKit/WebKit] 215882: [visionOS] Add button to control scene dimming in ...
Aditya Keerthi
noreply at github.com
Tue Jun 27 12:00:12 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 215882f10b4576ca5bf383c234b589dfb722655e
https://github.com/WebKit/WebKit/commit/215882f10b4576ca5bf383c234b589dfb722655e
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2023-06-27 (Tue, 27 Jun 2023)
Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.h
M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm
M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
Log Message:
-----------
[visionOS] Add button to control scene dimming in element fullscreen
https://bugs.webkit.org/show_bug.cgi?id=258476
rdar://110674947
Reviewed by Wenson Hsieh.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
Add an off-by-default preference to support scene dimming. A button to toggle
will be shown when the preference is enabled.
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.h:
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(-[WKFullScreenViewController initWithWebView:]):
(-[WKFullScreenViewController videoControlsManagerDidChange]):
(-[WKFullScreenViewController hideCustomControls:]):
Rename method to `hideCustomControls`, since it is now responsible for more
than the cancel and PiP buttons.
(-[WKFullScreenViewController setSceneDimmed:]):
(-[WKFullScreenViewController loadView]):
(-[WKFullScreenViewController _toggleDimmingAction:]):
(-[WKFullScreenViewController _createButtonWithExtrinsicContentSize:]):
(-[WKFullScreenViewController hideCancelAndPIPButtons:]): Deleted.
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
Adjust the duration of the dimming animation.
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController _sceneDimmingEnabled]):
Scene dimming is only supported if the preference is enabled.
(-[WKFullScreenWindowController _prefersSceneDimming]):
Rely on a user default to maintain the user's dimming preference. If scene dimming
is supported, the scene will be dimmed by default.
(-[WKFullScreenWindowController _performSpatialFullScreenTransition:completionHandler:]):
Drive-by: Remove early return, as the animation is not intended to be interruptible.
(-[WKFullScreenWindowController _toggleSceneDimming]):
Canonical link: https://commits.webkit.org/265559@main
More information about the webkit-changes
mailing list