Skip to content

Conversation

@youennf
Copy link
Contributor

@youennf youennf commented Jul 6, 2023

e698fda

Reset UserMediaPermissionRequestManagerProxy granted/denied requests in case of a related permission change
https://bugs.webkit.org/show_bug.cgi?id=258915
rdar://111837120

Reviewed by Eric Carlson.

When notified of a camera or microphone permission change, we are now clearing the past granted/denied requests of a given page.
This ensures that we will not grant/deny requests based on the past requests which might be obsolete.

Covered by API tests.

* Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::clearUserMediaPermissionRequestHistory):
* Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::clearUserMediaPermissionRequestHistory):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::permissionChanged):
(WebKit::WebProcessProxy::processPermissionChanged):
(WebKit::WebProcessProxy::sendPermissionChanged): Deleted.
* Source/WebKit/UIProcess/WebProcessProxy.h:
* Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

Canonical link: https://commits.webkit.org/265806@main

bd07109

Misc iOS, tvOS & watchOS macOS Linux Windows
❌ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🛠 gtk
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🧪 gtk-wk2
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ❌ 🧪 api-gtk
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2
✅ 🛠 tv-sim
✅ 🛠 🧪 merge ✅ 🛠 watch
✅ 🛠 watch-sim

@youennf youennf requested a review from cdumez as a code owner July 6, 2023 09:18
@youennf youennf self-assigned this Jul 6, 2023
@youennf youennf added the WebRTC For bugs in WebRTC label Jul 6, 2023
@youennf youennf requested a review from eric-carlson July 6, 2023 12:06
@youennf youennf added the merge-queue Applied to send a pull request to merge-queue label Jul 6, 2023
…in case of a related permission change

https://bugs.webkit.org/show_bug.cgi?id=258915
rdar://111837120

Reviewed by Eric Carlson.

When notified of a camera or microphone permission change, we are now clearing the past granted/denied requests of a given page.
This ensures that we will not grant/deny requests based on the past requests which might be obsolete.

Covered by API tests.

* Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::clearUserMediaPermissionRequestHistory):
* Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::clearUserMediaPermissionRequestHistory):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::permissionChanged):
(WebKit::WebProcessProxy::processPermissionChanged):
(WebKit::WebProcessProxy::sendPermissionChanged): Deleted.
* Source/WebKit/UIProcess/WebProcessProxy.h:
* Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

Canonical link: https://commits.webkit.org/265806@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Reset-UserMediaPermissionRequestManagerProxy-granteddenied-requests-in-case-of-a-related-permission-change branch from bd07109 to e698fda Compare July 6, 2023 16:28
@webkit-commit-queue
Copy link
Collaborator

Committed 265806@main (e698fda): https://commits.webkit.org/265806@main

Reviewed commits have been landed. Closing PR #15591 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit e698fda into WebKit:main Jul 6, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebRTC For bugs in WebRTC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants