Require <iframe allow="display"> for an iframe to use getDisplayMedia
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Nov 2018 17:18:48 +0000 (17:18 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Nov 2018 17:18:48 +0000 (17:18 +0000)
commitae439e688de3164b13d61d309390b24de0c30e1b
tree78379fcd6765054147418c542c5b596b076fbaca
parent66544fb3326212fe4cfd1ec61d1331d6764e98dd
Require <iframe allow="display"> for an iframe to use getDisplayMedia
https://bugs.webkit.org/show_bug.cgi?id=191505
<rdar://problem/45968811>

Reviewed by Jer Noble.

LayoutTests/imported/w3c:

* web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https-expected.txt:

Source/WebCore:

Test: http/tests/media/media-stream/get-display-media-iframe-allow-attribute.html

* Modules/mediastream/MediaDevicesRequest.cpp:
(WebCore::MediaDevicesRequest::start):
* Modules/mediastream/UserMediaController.cpp:
(WebCore::isAllowedToUse):
(WebCore::UserMediaController::canCallGetUserMedia):
(WebCore::UserMediaController::logGetUserMediaDenial):
* Modules/mediastream/UserMediaController.h:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::start):

LayoutTests:

* http/tests/media/media-stream/enumerate-devices-iframe-allow-attribute-expected.txt:
* http/tests/media/media-stream/get-display-media-iframe-allow-attribute-expected.txt: Added.
* http/tests/media/media-stream/get-display-media-iframe-allow-attribute.html: Added.
* http/tests/media/media-stream/resources/get-display-media-devices-iframe.html: Added.
* http/tests/ssl/media-stream/get-user-media-different-host-expected.txt:
* http/tests/ssl/media-stream/get-user-media-nested-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/media/media-stream/enumerate-devices-iframe-allow-attribute-expected.txt
LayoutTests/http/tests/media/media-stream/get-display-media-iframe-allow-attribute-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/media/media-stream/get-display-media-iframe-allow-attribute.html [new file with mode: 0644]
LayoutTests/http/tests/media/media-stream/resources/get-display-media-devices-iframe.html [new file with mode: 0644]
LayoutTests/http/tests/ssl/media-stream/get-user-media-different-host-expected.txt
LayoutTests/http/tests/ssl/media-stream/get-user-media-nested-expected.txt
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaDevicesRequest.cpp
Source/WebCore/Modules/mediastream/UserMediaController.cpp
Source/WebCore/Modules/mediastream/UserMediaController.h
Source/WebCore/Modules/mediastream/UserMediaRequest.cpp