Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 58512c972d46ac24ddc87a330fcb6894b200e53c
https://github.com/WebKit/WebKit/commit/58512c972d46ac24ddc87a330fcb6894b200e53c
Author: Youenn Fablet <[email protected]>
Date: 2024-03-15 (Fri, 15 Mar 2024)
Changed paths:
M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp
Log Message:
-----------
Media Capability may not be created for a web page after process swap
https://bugs.webkit.org/show_bug.cgi?id=270999
rdar://124491466
Reviewed by Eric Carlson.
We used to recrete a media capability in WebPageProxy::didChangeMainDocument.
In case of process swap, the WebPageProxy has sent its media capability to the
previous web page, but not the new web page in the new process.
WebPageProxy::didChangeMainDocument is not called so the media capability is
not recreated for the new web page.
We move back the potential recreation of the media capbility to
WebPageProxy::didCommitLoadForFrame where it was before
rdar://problem/123381737.
This is ok since we are preserving media capabilities over navigation for same
origin navigations, instead of recreating a media capability for each new main
document.
Manually tested by doing the following in iOS:
1. Load a web page say https://webkit.org.
2. Via web inspector, load another page, for instance: 'window.location =
"https://webrtc.github.io/samples/src/content/getusermedia/gum/"'
3. Start capturing on the new web page and verify camera capture is working
properly.
I also validated that same document navigations are still working using
https://bugs.webkit.org/attachment.cgi?id=470000.
After the fix in https://bugs.webkit.org/show_bug.cgi?id=270995, capture would
not longer fail but would use identity instead of media capability.
We add a warning logging in AVVideoCaptureSource to catch the case of media
capability being empty, which should not happen for safari.
* Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setupSession):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didChangeMainDocument):
Canonical link: https://commits.webkit.org/276211@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