6f441c2a59
https://bugs.webkit.org/show_bug.cgi?id=224384 Reviewed by Eric Carlson. Source/WebKit: When a page calls `navigator.requestMediaKeySystemAccess()` in a background tab, the request will be added to a pending request hash map. However, the current implementation of `MediaKeySystemPermissionRequestManager` does not send the request when the tab switches to foreground. This patch fixes this issue by adding the `MediaKeySystemPermissionRequestManager` object as a `MediaCanStartListener` of `Document`, so that it will send its pending requests when the tab switches to foreground (`mediaCanStart()`). * WebKit.xcodeproj/project.pbxproj: Add two cpp files to the xcode project. * WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.cpp: Add the object as a `MediaCanStartListener` so that it can send the `MediaKeySystemRequest` to the UI process when the tab switches to foreground. (WebKit::MediaKeySystemPermissionRequestManager::startMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::cancelMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::mediaCanStart): * WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.h: LayoutTests: * media/encrypted-media/mock-navigator-requestMediaKeySystemAccess-in-background-expected.txt: Added. * media/encrypted-media/mock-navigator-requestMediaKeySystemAccess-in-background.html: Added. Canonical link: https://commits.webkit.org/236448@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275883 268f45cc-cd09-0410-ab3c-d52691b4dbfc |
||
---|---|---|
.. | ||
clearKey | ||
encrypted-media-constants-expected.txt | ||
encrypted-media-constants.html | ||
encrypted-media-is-type-supported-expected.txt | ||
encrypted-media-is-type-supported.html | ||
encrypted-media-session-lifetime-expected.txt | ||
encrypted-media-session-lifetime.html | ||
medias-enc.js | ||
mock-MediaKeySession-close-expected.txt | ||
mock-MediaKeySession-close.html | ||
mock-MediaKeySession-generateRequest-expected.txt | ||
mock-MediaKeySession-generateRequest.html | ||
mock-MediaKeySession-load-expected.txt | ||
mock-MediaKeySession-load.html | ||
mock-MediaKeySession-remove-expected.txt | ||
mock-MediaKeySession-remove.html | ||
mock-MediaKeySession-update-expected.txt | ||
mock-MediaKeySession-update.html | ||
mock-MediaKeySystemAccess-expected.txt | ||
mock-MediaKeySystemAccess.html | ||
mock-MediaKeys-createSession-expected.txt | ||
mock-MediaKeys-createSession.html | ||
mock-MediaKeys-setServerCertificate-expected.txt | ||
mock-MediaKeys-setServerCertificate.html | ||
mock-navigator-requestMediaKeySystemAccess-expected.txt | ||
mock-navigator-requestMediaKeySystemAccess-in-background-expected.txt | ||
mock-navigator-requestMediaKeySystemAccess-in-background.html | ||
mock-navigator-requestMediaKeySystemAccess.html |