Bug 207112

Summary: MediaDevices should handle changes of iframe allow attribute value
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, hta, jer.noble, mkwst, philipj, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Rebasing for landing none

Description youenn fablet 2020-02-03 03:02:29 PST
MediaDevices should handle changes of iframe allow attribute value
Comment 1 youenn fablet 2020-02-03 05:12:11 PST
Created attachment 389499 [details]
Patch
Comment 2 Eric Carlson 2020-02-03 05:42:20 PST
Comment on attachment 389499 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=389499&action=review

> Source/WebCore/Modules/mediastream/MediaDevices.cpp:165
> +    bool canAccessCamera = isFeaturePolicyAllowedByDocumentAndAllOwners(FeaturePolicy::Type::Camera, *document, LogFeaturePolicyFailure::No);
> +    bool canAccessMicrophone = isFeaturePolicyAllowedByDocumentAndAllOwners(FeaturePolicy::Type::Microphone, *document, LogFeaturePolicyFailure::No);

It might be worth adding a helper function that calls both of these.

> Source/WebCore/Modules/mediastream/UserMediaController.cpp:68
> +        window->printErrorMessage(makeString("Not allowed to call getDisplayMedia."));

This isn't tested.

> Source/WebCore/html/FeaturePolicy.cpp:65
> +                document.domWindow()->printErrorMessage(makeString("Feature policy '", policyTypeName(type), "' check failed."));

Ditto.
Comment 3 youenn fablet 2020-02-03 08:18:04 PST
Created attachment 389511 [details]
Patch
Comment 4 youenn fablet 2020-02-04 01:23:31 PST
Created attachment 389636 [details]
Rebasing for landing
Comment 5 WebKit Commit Bot 2020-02-04 02:57:50 PST
Comment on attachment 389636 [details]
Rebasing for landing

Clearing flags on attachment: 389636

Committed r255668: <https://trac.webkit.org/changeset/255668>
Comment 6 WebKit Commit Bot 2020-02-04 02:57:51 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2020-02-04 02:58:18 PST
<rdar://problem/59144287>