Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7c97c209930082bfc693e7a65269200f6a48efac
https://github.com/WebKit/WebKit/commit/7c97c209930082bfc693e7a65269200f6a48efac
Author: Jer Noble <[email protected]>
Date: 2024-04-08 (Mon, 08 Apr 2024)
Changed paths:
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
M Source/WebCore/testing/Internals.cpp
M Source/WebCore/testing/Internals.h
M Source/WebCore/testing/Internals.idl
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/ios/WKContentView.mm
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSpatialTrackingLabels.mm
Log Message:
-----------
[visionOS] Expose a _defaultSTSLabel SPI
https://bugs.webkit.org/show_bug.cgi?id=272093
rdar://120018549
Reviewed by Eric Carlson.
When an application allows users to switch between WKWebViews within a single
UIWindow
(e.g., via tabs in a web browser app), the unparented WKWebView may still be
generating
audio and that audio still needs to be located spatially. Add a SPI for a client
application to provide a "default" spatial tracking label which can be used for
the
fallback scenario where the WKWebView itself is not visible. Clients can use
this SPI
to ensure that a background tab continues to have its audio playback
spatialized to
the UIWindow that previously hosted it.
In adding this SPI, also move the responsibility for tracking whether the
WKWebView is
parented or not up from MediaPlayerPrivate implementations into WebPageProxy.
When the
web view is unparented, pass the defaultSTSLabel provided by the client down to
the
WebContent and GPU processes for use by MediaPlayerPrivate and other internal
clients.
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateSpatialTrackingLabel):
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateSpatialTrackingLabel):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _defaultSTSLabel]):
(-[WKWebView _setDefaultSTSLabel:]):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewDidLeaveWindow):
(WebKit::WebPageProxy::viewDidEnterWindow):
(WebKit::WebPageProxy::setDefaultSpatialTrackingLabel):
(WebKit::WebPageProxy::defaultSpatialTrackingLabel const):
(WebKit::WebPageProxy::updateDefaultSpatialTrackingLabel):
(WebKit::WebPageProxy::setSpatialTrackingLabel): Deleted.
(WebKit::WebPageProxy::spatialTrackingLabel const): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
Canonical link: https://commits.webkit.org/277218@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes