Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1935a83b4fdaacb26d179f4189020bd39efcc04e
https://github.com/WebKit/WebKit/commit/1935a83b4fdaacb26d179f4189020bd39efcc04e
Author: Ben Nham <[email protected]>
Date: 2025-02-20 (Thu, 20 Feb 2025)
Changed paths:
A
LayoutTests/http/tests/site-isolation/mediastream/getDisplayMedia-starts-expected.txt
A
LayoutTests/http/tests/site-isolation/mediastream/getDisplayMedia-starts.html
A
LayoutTests/http/tests/site-isolation/mediastream/getUserMedia-audio-starts-expected.txt
A
LayoutTests/http/tests/site-isolation/mediastream/getUserMedia-audio-starts.html
A
LayoutTests/http/tests/site-isolation/mediastream/getUserMedia-video-starts-expected.txt
A
LayoutTests/http/tests/site-isolation/mediastream/getUserMedia-video-starts.html
A
LayoutTests/http/tests/site-isolation/resources/getDisplayMedia-starts-frame.html
A
LayoutTests/http/tests/site-isolation/resources/getUserMedia-audio-starts-frame.html
A
LayoutTests/http/tests/site-isolation/resources/getUserMedia-video-starts-frame.html
M Source/WebKit/UIProcess/RemotePageProxy.cpp
M Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
M Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h
M Source/WebKit/UIProcess/UserMediaProcessManager.cpp
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebProcessProxy.cpp
Log Message:
-----------
[Site Isolation] getDisplayMedia does not work in a out of process iframes
https://bugs.webkit.org/show_bug.cgi?id=287299
rdar://129194055
Reviewed by Charlie Wolfe and Eric Carlson.
Starting a display stream via getDisplayMedia does not work in an OOP iframe
when site isolation is
enabled. This is because many of the related operations assumed that only the
main frame's process
could start a capture.
Fix this by making various parts of setting up a display stream (such as
`updateCaptureAccess`,
`UserMediaAccessWasGranted`, `UserMediaAccessWasDenied`, extending sandbox to
allow capture, etc.)
to use the process associated with the frame in the UserMediaRequest, rather
than unconditionally
using the main frame's process.
Since a WebProcessProxy associated with an OOP iframe can enter the process
cache while the main
page is still has an active capture session, also make
`WebProcessProxy::removeWebPage` check to see
if it's okay to remove capture sandbox extensions when pages are removed from
the process.
*
LayoutTests/http/tests/site-isolation/mediastream/getDisplayMedia-starts-expected.txt:
Added.
*
LayoutTests/http/tests/site-isolation/mediastream/getDisplayMedia-starts.html:
Added.
*
LayoutTests/http/tests/site-isolation/mediastream/getUserMedia-audio-starts-expected.txt:
Added.
*
LayoutTests/http/tests/site-isolation/mediastream/getUserMedia-audio-starts.html:
Added.
*
LayoutTests/http/tests/site-isolation/mediastream/getUserMedia-video-starts-expected.txt:
Added.
*
LayoutTests/http/tests/site-isolation/mediastream/getUserMedia-video-starts.html:
Added.
*
LayoutTests/http/tests/site-isolation/resources/getDisplayMedia-starts-frame.html:
Added.
*
LayoutTests/http/tests/site-isolation/resources/getUserMedia-audio-starts-frame.html:
Added.
*
LayoutTests/http/tests/site-isolation/resources/getUserMedia-video-starts-frame.html:
Added.
* Source/WebKit/UIProcess/RemotePageProxy.cpp:
(WebKit::RemotePageProxy::isPlayingMediaDidChange):
* Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::revokeSandboxExtensionsIfNeededForPage):
(WebKit::UserMediaPermissionRequestManagerProxy::disconnectFromPage):
(WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
(WebKit::UserMediaPermissionRequestManagerProxy::denyRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::captureStateChanged):
* Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h:
* Source/WebKit/UIProcess/UserMediaProcessManager.cpp:
(WebKit::UserMediaProcessManager::willCreateMediaStream):
(WebKit::UserMediaProcessManager::revokeSandboxExtensionsIfNeeded):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::userMediaPermissionRequestManagerIfExists):
(WebKit::WebPageProxy::willStartCapture):
(WebKit::WebPageProxy::setOrientationForMediaCapture):
(WebKit::WebPageProxy::gpuProcessExited):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):
Canonical link: https://commits.webkit.org/290715@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes