-[WKWebView _suspendAllMediaPlayback] does not persist across navigation.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Jun 2019 01:22:18 +0000 (01:22 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Jun 2019 01:22:18 +0000 (01:22 +0000)
commit513f489f3a8ea65f16cff44b00558ed8545b6aee
treef0950c7ab4a1d6a47a8c18b863cd6ef102ad99b9
parent9e385edb3776830c772c0a3a7bdd08da449fa9d9
-[WKWebView _suspendAllMediaPlayback] does not persist across navigation.
https://bugs.webkit.org/show_bug.cgi?id=198585

Reviewed by Chris Dumez.

Source/WebKit:

Add a new WebPageCreationParameters entry for mediaPlaybackIsSuspended, and pass
that value across during WebPage creation.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::suspendAllMediaPlayback):
(WebKit::WebPageProxy::resumeAllMediaPlayback):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSuspendAllMediaPlayback.mm: Added.
(TEST):
* TestWebKitAPI/Tests/WebKitLegacy/ios/video-with-audio.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPageCreationParameters.cpp
Source/WebKit/Shared/WebPageCreationParameters.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSuspendAllMediaPlayback.mm [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/video-with-audio.html