Changeset 254387 in webkit
- Timestamp:
- Jan 10, 2020 6:32:00 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/platform/ipad/TestExpectations
r253976 r254387 55 55 fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1.html [ Skip ] 56 56 57 # <rdar://problem/51918994> [ iPad Sim ] Layout test media/video-concurrent-visible-playback.html is a flaky timeout58 media/video-concurrent-visible-playback.html [ Pass Timeout ]59 60 # <rdar://problem/51920910> [ iPad Sim ] Layout test media/video-object-fit-change.html is a flaky timeout61 media/video-concurrent-visible-playback.html [ Pass Timeout ]62 63 57 # <rdar://problem/52914585> (Layout Test fast/forms/file/file-input-reset-using-open-panel.html is Failing) 64 58 fast/forms/file/file-input-reset-using-open-panel.html [ ImageOnlyFailure ] -
trunk/Source/WebKit/ChangeLog
r254384 r254387 1 2020-01-10 Jer Noble <jer.noble@apple.com> 2 3 [iOS] Audio from non-frontmost tab continues when app is backgrounded 4 https://bugs.webkit.org/show_bug.cgi?id=206101 5 <rdar://problem/58089916> 6 7 Reviewed by Eric Carlson. 8 9 Tests: WKWebViewPausePlayingAudioTests.InWindow 10 WKWebViewPausePlayingAudioTests.OutOfWindow 11 12 The ApplicationStateTracker will only send notifications about application state to 13 WebPageProxies when those proxies' views are actually in-window. Add a separate application 14 state observer strictly for media which fires only when application state notifications are 15 received while the view is not in-window. 16 17 * UIProcess/WebPageProxy.h: 18 * UIProcess/ios/WKContentView.mm: 19 (-[WKContentView _commonInitializationWithProcessPool:configuration:]): 20 (-[WKContentView _applicationDidEnterBackground:]): 21 (-[WKContentView _applicationWillEnterForeground:]): 22 * UIProcess/ios/WebPageProxyIOS.mm: 23 (WebKit::WebPageProxy::applicationDidEnterBackgroundForMedia): 24 (WebKit::WebPageProxy::applicationWillEnterForegroundForMedia): 25 * WebProcess/WebPage/WebPage.h: 26 * WebProcess/WebPage/WebPage.messages.in: 27 * WebProcess/WebPage/ios/WebPageIOS.mm: 28 (WebKit::WebPage::applicationDidEnterBackgroundForMedia): 29 (WebKit::WebPage::applicationWillEnterForegroundForMedia): 30 1 31 2020-01-10 Simon Fraser <simon.fraser@apple.com> 2 32 -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r254384 r254387 760 760 void applicationWillResignActive(); 761 761 void applicationDidBecomeActive(); 762 void applicationDidEnterBackgroundForMedia(); 763 void applicationWillEnterForegroundForMedia(); 762 764 void commitPotentialTapFailed(); 763 765 void didNotHandleTapAsClick(const WebCore::IntPoint&); -
trunk/Source/WebKit/UIProcess/ios/WKContentView.mm
r254241 r254387 204 204 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_applicationWillResignActive:) name:UIApplicationWillResignActiveNotification object:[UIApplication sharedApplication]]; 205 205 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_applicationDidBecomeActive:) name:UIApplicationDidBecomeActiveNotification object:[UIApplication sharedApplication]]; 206 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:[UIApplication sharedApplication]]; 207 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_applicationWillEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:[UIApplication sharedApplication]]; 206 208 207 209 #if USE(UIKIT_KEYBOARD_ADDITIONS) … … 719 721 } 720 722 723 - (void)_applicationDidEnterBackground:(NSNotification*)notification 724 { 725 if (!self.window) 726 _page->applicationDidEnterBackgroundForMedia(); 727 } 728 729 - (void)_applicationWillEnterForeground:(NSNotification*)notification 730 { 731 if (!self.window) 732 _page->applicationWillEnterForegroundForMedia(); 733 } 734 721 735 @end 722 736 -
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
r254345 r254387 697 697 } 698 698 699 void WebPageProxy::applicationDidEnterBackgroundForMedia() 700 { 701 bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock]; 702 RELEASE_LOG_IF_ALLOWED(ViewState, "applicationWillEnterForegroundForMedia: isSuspendedUnderLock? %d", isSuspendedUnderLock); 703 704 m_process->send(Messages::WebPage::ApplicationDidEnterBackgroundForMedia(isSuspendedUnderLock), m_webPageID); 705 } 706 707 void WebPageProxy::applicationWillEnterForegroundForMedia() 708 { 709 bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock]; 710 RELEASE_LOG_IF_ALLOWED(ViewState, "applicationDidEnterBackgroundForMedia: isSuspendedUnderLock? %d", isSuspendedUnderLock); 711 712 m_process->send(Messages::WebPage::ApplicationWillEnterForegroundForMedia(isSuspendedUnderLock), m_webPageID); 713 } 714 699 715 void WebPageProxy::applicationDidBecomeActive() 700 716 { -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r254384 r254387 978 978 void applicationWillEnterForeground(bool isSuspendedUnderLock); 979 979 void applicationDidBecomeActive(); 980 void applicationDidEnterBackgroundForMedia(bool isSuspendedUnderLock); 981 void applicationWillEnterForegroundForMedia(bool isSuspendedUnderLock); 980 982 void didFinishContentChangeObserving(WKContentChange); 981 983 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
r254183 r254387 100 100 ApplicationWillEnterForeground(bool isSuspendedUnderLock) 101 101 ApplicationDidBecomeActive() 102 ApplicationDidEnterBackgroundForMedia(bool isSuspendedUnderLock) 103 ApplicationWillEnterForegroundForMedia(bool isSuspendedUnderLock) 102 104 ContentSizeCategoryDidChange(String contentSizeCategory) 103 105 GetSelectionContext(WebKit::CallbackID callbackID) -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r254153 r254387 3597 3597 } 3598 3598 3599 void WebPage::applicationDidEnterBackgroundForMedia(bool isSuspendedUnderLock) 3600 { 3601 [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationDidEnterBackgroundNotification object:nil userInfo:@{@"isSuspendedUnderLock": @(isSuspendedUnderLock)}]; 3602 } 3603 3604 void WebPage::applicationWillEnterForegroundForMedia(bool isSuspendedUnderLock) 3605 { 3606 [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationWillEnterForegroundNotification object:nil userInfo:@{@"isSuspendedUnderLock": @(isSuspendedUnderLock)}]; 3607 } 3608 3599 3609 static inline void adjustVelocityDataForBoundedScale(VelocityData& velocityData, double exposedRectScale, double minimumScale, double maximumScale) 3600 3610 { -
trunk/Tools/ChangeLog
r254383 r254387 1 2020-01-10 Jer Noble <jer.noble@apple.com> 2 3 [iOS] Audio from non-frontmost tab continues when app is backgrounded 4 https://bugs.webkit.org/show_bug.cgi?id=206101 5 <rdar://problem/58089916> 6 7 Reviewed by Eric Carlson. 8 9 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 10 * TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm: Added. 11 (TestWebKitAPI::autoplayingConfiguration): 12 (TestWebKitAPI::TEST): 13 1 14 2020-01-10 Jonathan Bedard <jbedard@apple.com> 2 15 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r254183 r254387 902 902 CD0BD0A81F79982D001AB2CF /* ContextMenuImgWithVideo.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD0BD0A71F7997C2001AB2CF /* ContextMenuImgWithVideo.html */; }; 903 903 CD227E44211A4D5D00D285AF /* PreferredAudioBufferSize.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD227E43211A4D5D00D285AF /* PreferredAudioBufferSize.mm */; }; 904 CD27A1C123C661ED006E11DD /* WKWebViewPausePlayingAudioTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD27A1C023C661ED006E11DD /* WKWebViewPausePlayingAudioTests.mm */; }; 904 905 CD2D0D1A213465560018C784 /* NowPlaying.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD2D0D19213465560018C784 /* NowPlaying.mm */; }; 905 906 CD3065E02165682E00E895DF /* VideoQualityDisplayCompositing.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD3065DF2165682E00E895DF /* VideoQualityDisplayCompositing.mm */; }; … … 2416 2417 CD225C071C45A69200140761 /* ParsedContentRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParsedContentRange.cpp; sourceTree = "<group>"; }; 2417 2418 CD227E43211A4D5D00D285AF /* PreferredAudioBufferSize.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = PreferredAudioBufferSize.mm; sourceTree = "<group>"; }; 2419 CD27A1C023C661ED006E11DD /* WKWebViewPausePlayingAudioTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewPausePlayingAudioTests.mm; sourceTree = "<group>"; }; 2418 2420 CD2D0D19213465560018C784 /* NowPlaying.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = NowPlaying.mm; sourceTree = "<group>"; }; 2419 2421 CD3065DF2165682E00E895DF /* VideoQualityDisplayCompositing.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = VideoQualityDisplayCompositing.mm; sourceTree = "<group>"; }; … … 3222 3224 514958BD1F7427AC00E87BAD /* WKWebViewAutofillTests.mm */, 3223 3225 1CACADA0230620AD0007D54C /* WKWebViewOpaque.mm */, 3226 CD27A1C023C661ED006E11DD /* WKWebViewPausePlayingAudioTests.mm */, 3224 3227 ); 3225 3228 path = ios; … … 4852 4855 7C83E0C41D0A654200FEBCF3 /* RequiresUserActionForPlayback.mm in Sources */, 4853 4856 7CCE7F0E1A411AE600447C4C /* ResizeReversePaginatedWebView.cpp in Sources */, 4857 CD27A1C123C661ED006E11DD /* WKWebViewPausePlayingAudioTests.mm in Sources */, 4854 4858 7CCE7F0F1A411AE600447C4C /* ResizeWindowAfterCrash.cpp in Sources */, 4855 4859 5CB7AFDC23C4529700E49CF3 /* ResourceLoadDelegate.mm in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.