A 'devicechange' event should not be fired in an iframe unless it has access to capture devices.
<rdar://problem/46562063>
Created attachment 356832 [details] Patch
Comment on attachment 356832 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=356832&action=review > Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:103 > + auto accessState = originHasPersistentAccess ? DeviceAccessState::PersistentAccess : DeviceAccessState::SessionAccess; Do we need to send that information any longer? It seems that just knowing that we have access is good enough now. > LayoutTests/http/tests/media/media-stream/device-change-event-in-iframe.html:6 > + <iframe id="camera" allow="camera" src="http://localhost:8000/media/media-stream/resources/device-change-iframe.html?2"></iframe> For the sake of completeness, I would tend to add a frame with an allow="microphone" as well.
Comment on attachment 356832 [details] Patch Attachment 356832 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/10308982 New failing tests: http/tests/media/media-stream/device-change-event-in-iframe.html
Created attachment 356836 [details] Archive of layout-test-results from ews107 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Created attachment 356854 [details] Patch for landing.
Comment on attachment 356854 [details] Patch for landing. Clearing flags on attachment: 356854 Committed r239006: <https://trac.webkit.org/changeset/239006>
All reviewed patches have been landed. Closing bug.