[webkit-changes] [WebKit/WebKit] 011d6a: [iOS] Add a restriction that prevents publishing t...
aestes
noreply at github.com
Wed Jan 8 15:00:36 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 011d6a1fc9c65d642a4a8469f630c2d3ed64d0f2
https://github.com/WebKit/WebKit/commit/011d6a1fc9c65d642a4a8469f630c2d3ed64d0f2
Author: Andy Estes <aestes at apple.com>
Date: 2025-01-08 (Wed, 08 Jan 2025)
Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/html/MediaElementSession.cpp
M Source/WebCore/html/MediaElementSession.h
M Source/WebCore/testing/Internals.cpp
M Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
M Source/WebKit/Shared/WebPreferencesDefaultValues.h
M Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
M Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm
Log Message:
-----------
[iOS] Add a restriction that prevents publishing to NowPlaying when a video is not in a visible page
https://bugs.webkit.org/show_bug.cgi?id=285542
rdar://139471645
Reviewed by Eric Carlson.
Added a setting and behavior restriction that prevents an HTMLVideoElement from being eligible for
Now Playing when it's not in a visible page.
Added an API test.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::initializeMediaSession):
* Source/WebCore/html/MediaElementSession.cpp:
(WebCore::MediaElementSession::canShowControlsManager const):
* Source/WebCore/html/MediaElementSession.h:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::setMediaElementRestrictions):
* Source/WebKit/Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultRequiresPageVisibilityForVideoToBeNowPlaying):
* Source/WebKit/Shared/WebPreferencesDefaultValues.h:
* Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setRequiresPageVisibilityForVideoToBeNowPlayingForTesting:]):
(-[WKPreferences _requiresPageVisibilityForVideoToBeNowPlayingForTesting]):
* Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm:
(-[NowPlayingTestWebView requestActiveNowPlayingSessionInfo]):
(-[NowPlayingTestWebView expectHasActiveNowPlayingSession:]):
(-[NowPlayingTestWebView expectRegisteredAsNowPlayingApplication:]):
(TestWebKitAPI::TEST(NowPlayingControlsTests, NowPlayingApplicationNotRegisteredForBackgroundPage)):
(-[NowPlayingTestWebView hasActiveNowPlayingSession]): Deleted.
Canonical link: https://commits.webkit.org/288616@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list