Changeset 261709 in webkit
- Timestamp:
- May 14, 2020 1:38:44 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r261708 r261709 1 2020-05-14 Eric Carlson <eric.carlson@apple.com> 2 3 [Cocoa] Don't clear NowPlaying state unless it was set 4 https://bugs.webkit.org/show_bug.cgi?id=211899 5 <rdar://problem/62249870> 6 7 Reviewed by Jer Noble. 8 9 * media/now-playing-status-without-media-expected.txt: Added. 10 * media/now-playing-status-without-media.html: Added. 11 12 * gpu-process/TestExpectations: Skip test because media session isn't fully functional in GPUP. 13 * platform/mac-wk1/TestExpectations: Skip test because media session manager is a singleton. 14 * platform/gtk/TestExpectations: Skip Cocoa-only test. 15 * platform/win/TestExpectations: Ditto. 16 * platform/wpe/TestExpectations: Ditto. 17 1 18 2020-05-14 Myles C. Maxfield <mmaxfield@apple.com> 2 19 -
trunk/LayoutTests/gpu-process/TestExpectations
r261160 r261709 249 249 media/muted-video-is-playing-audio.html [ Skip ] 250 250 media/navigate-with-pip-should-not-crash.html [ Skip ] 251 media/now-playing-status-without-media.html [ Skip ] 251 252 media/picture-in-picture/picture-in-picture-api-css-selector.html [ Skip ] 252 253 media/picture-in-picture/picture-in-picture-api-enter-pip-4.html [ Skip ] -
trunk/LayoutTests/platform/gtk/TestExpectations
r261688 r261709 1163 1163 # Currently enabled on Mac only 1164 1164 media/media-usage-state.html [ Skip ] 1165 media/now-playing-status-without-media.html [ Skip ] 1165 1166 1166 1167 # No support for WebGPU yet -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r261702 r261709 197 197 imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.html [ Skip ] 198 198 199 # Audio session is a singleton199 # Audio session and media session manager are a singletons 200 200 platform/mac/media/media-source/media-source-change-source.html [ Skip ] 201 media/now-playing-status-without-media.html [ Skip ] 201 202 202 203 #////////////////////////////////////////////////////////////////////////////////////////// -
trunk/LayoutTests/platform/win/TestExpectations
r261708 r261709 1164 1164 # Currently enabled on Mac only 1165 1165 media/media-usage-state.html [ Skip ] 1166 media/now-playing-status-without-media.html [ Skip ] 1166 1167 1167 1168 ################################################################################ -
trunk/LayoutTests/platform/wpe/TestExpectations
r261609 r261709 725 725 # Currently enabled on Mac only 726 726 media/media-usage-state.html [ Skip ] 727 media/now-playing-status-without-media.html [ Skip ] 727 728 728 729 webkit.org/b/210487 http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.php [ Failure ] -
trunk/Source/WebCore/ChangeLog
r261705 r261709 1 2020-05-14 Eric Carlson <eric.carlson@apple.com> 2 3 [Cocoa] Don't clear NowPlaying state unless it was set 4 https://bugs.webkit.org/show_bug.cgi?id=211899 5 <rdar://problem/62249870> 6 7 Reviewed by Jer Noble. 8 9 Test: media/now-playing-status-without-media.html 10 11 * platform/audio/PlatformMediaSessionManager.h: 12 (WebCore::PlatformMediaSessionManager::haveEverRegisteredAsNowPlayingApplication const): Method 13 added for testing. 14 15 * platform/audio/cocoa/MediaSessionManagerCocoa.h: 16 * platform/audio/cocoa/MediaSessionManagerCocoa.mm: 17 (WebCore::MediaSessionManagerCocoa::updateNowPlayingInfo): Don't clear NowPlaying state unless 18 it was setup in the first place. 19 20 * testing/Internals.cpp: 21 (WebCore::Internals::nowPlayingState const): Add new property. 22 * testing/Internals.h: 23 * testing/Internals.idl: 24 1 25 2020-05-14 Andres Gonzalez <andresg_22@apple.com> 2 26 -
trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h
r260182 r261709 73 73 virtual MediaSessionIdentifier lastUpdatedNowPlayingInfoUniqueIdentifier() const { return { }; } 74 74 virtual bool registeredAsNowPlayingApplication() const { return false; } 75 virtual bool haveEverRegisteredAsNowPlayingApplication() const { return false; } 75 76 virtual void prepareToSendUserMediaPermissionRequest() { } 76 77 -
trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h
r260182 r261709 56 56 MediaSessionIdentifier lastUpdatedNowPlayingInfoUniqueIdentifier() const final { return m_lastUpdatedNowPlayingInfoUniqueIdentifier; } 57 57 bool registeredAsNowPlayingApplication() const final { return m_registeredAsNowPlayingApplication; } 58 bool haveEverRegisteredAsNowPlayingApplication() const final { return m_haveEverRegisteredAsNowPlayingApplication; } 59 58 60 void prepareToSendUserMediaPermissionRequest() final; 59 61 … … 101 103 bool m_nowPlayingActive { false }; 102 104 bool m_registeredAsNowPlayingApplication { false }; 105 bool m_haveEverRegisteredAsNowPlayingApplication { false }; 103 106 104 107 // For testing purposes only. -
trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm
r261110 r261709 323 323 324 324 if (!nowPlayingInfo) { 325 ALWAYS_LOG(LOGIDENTIFIER, "clearing now playing info"); 326 platformStrategies()->mediaStrategy().clearNowPlayingInfo(); 325 326 if (m_registeredAsNowPlayingApplication) { 327 ALWAYS_LOG(LOGIDENTIFIER, "clearing now playing info"); 328 platformStrategies()->mediaStrategy().clearNowPlayingInfo(); 329 } 327 330 328 331 m_registeredAsNowPlayingApplication = false; … … 336 339 } 337 340 338 ALWAYS_LOG(LOGIDENTIFIER, "title = \"", nowPlayingInfo->title, "\", isPlaying = ", nowPlayingInfo->isPlaying, ", duration = ", nowPlayingInfo->duration, ", now = ", nowPlayingInfo->currentTime, ", id = ", nowPlayingInfo->uniqueIdentifier.toUInt64(), ", registered = ", m_registeredAsNowPlayingApplication); 339 341 m_haveEverRegisteredAsNowPlayingApplication = true; 340 342 platformStrategies()->mediaStrategy().setNowPlayingInfo(!m_registeredAsNowPlayingApplication, *nowPlayingInfo); 341 343 … … 345 347 } 346 348 349 ALWAYS_LOG(LOGIDENTIFIER, "title = \"", nowPlayingInfo->title, "\", isPlaying = ", nowPlayingInfo->isPlaying, ", duration = ", nowPlayingInfo->duration, ", now = ", nowPlayingInfo->currentTime, ", id = ", nowPlayingInfo->uniqueIdentifier.toUInt64(), ", registered = ", m_registeredAsNowPlayingApplication); 350 347 351 if (!nowPlayingInfo->title.isEmpty()) 348 352 m_lastUpdatedNowPlayingTitle = nowPlayingInfo->title; -
trunk/Source/WebCore/testing/Internals.cpp
r261679 r261709 4283 4283 PlatformMediaSessionManager::sharedManager().lastUpdatedNowPlayingInfoUniqueIdentifier().toUInt64(), 4284 4284 PlatformMediaSessionManager::sharedManager().hasActiveNowPlayingSession(), 4285 PlatformMediaSessionManager::sharedManager().registeredAsNowPlayingApplication() 4285 PlatformMediaSessionManager::sharedManager().registeredAsNowPlayingApplication(), 4286 PlatformMediaSessionManager::sharedManager().haveEverRegisteredAsNowPlayingApplication() 4286 4287 } }; 4287 4288 #else -
trunk/Source/WebCore/testing/Internals.h
r261663 r261709 831 831 bool hasActiveSession; 832 832 bool registeredAsNowPlayingApplication; 833 bool haveEverRegisteredAsNowPlayingApplication; 833 834 }; 834 835 ExceptionOr<NowPlayingState> nowPlayingState() const; -
trunk/Source/WebCore/testing/Internals.idl
r261663 r261709 106 106 JSGenerateToJSObject, 107 107 ] dictionary NowPlayingState { 108 boolean hasActiveSession;109 boolean registeredAsNowPlayingApplication;110 108 DOMString title; 111 109 unrestricted double duration; 112 110 unrestricted double elapsedTime; 113 111 unsigned long long uniqueIdentifier; 112 boolean hasActiveSession; 113 boolean registeredAsNowPlayingApplication; 114 boolean haveEverRegisteredAsNowPlayingApplication; 114 115 }; 115 116
Note: See TracChangeset
for help on using the changeset viewer.