Implement <iframe allow="camera; microphone">
https://bugs.webkit.org/show_bug.cgi?id=167430
LayoutTests/imported/w3c:
Patch by Youenn Fablet <youenn@apple.com> on 2017-12-14
Reviewed by Eric Carlson.
* resources/import-expectations.json:
* web-platform-tests/feature-policy/resources/: Added as this is used for some mediacapture-streams tests.
* web-platform-tests/mediacapture-streams/: Added.
Source/WebCore:
Patch by Youenn Fablet <youenn@apple.com> on 2017-12-14
Reviewed by Eric Carlson.
Tests: imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.sub.html
Adding allow attribute to HTMLIFrameElement as per https://wicg.github.io/feature-policy/#iframe-allow-attribute.
Cross-origin iframes will get access to camera/microphone based on this attribute value.
Same-origin iframes do not need any attribute.
In case getUserMedia requests both camera and microphone, and allow attribute is only one of these,
getUserMedia access is denied. This goes against the tests but is not very clear from the specification.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::isSecure):
(WebCore::isAllowedToUse):
(WebCore::canCallGetUserMedia):
(WebCore::UserMediaRequest::start):
* html/HTMLAttributeNames.in:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::parseAttribute):
* html/HTMLIFrameElement.h:
* html/HTMLIFrameElement.idl:
LayoutTests:
<rdar://problem/
34887226>
Patch by Youenn Fablet <youenn@apple.com> on 2017-12-14
Reviewed by Eric Carlson.
Skipping mediastream tests for wpe.
Updating expectations based on new error message.
* TestExpectations: Skipping sync XHR test using allow attribute.
* http/tests/ssl/media-stream/get-user-media-different-host-expected.txt:
* http/tests/ssl/media-stream/get-user-media-nested-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-sync-default-feature-policy.sub-expected.txt:
* platform/wpe/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225963
268f45cc-cd09-0410-ab3c-
d52691b4dbfc