Bug 207112 - MediaDevices should handle changes of iframe allow attribute value
Summary: MediaDevices should handle changes of iframe allow attribute value
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-03 03:02 PST by youenn fablet
Modified: 2020-02-04 02:58 PST (History)
15 users (show)

See Also:


Attachments
Patch (36.99 KB, patch)
2020-02-03 05:12 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (48.19 KB, patch)
2020-02-03 08:18 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Rebasing for landing (48.05 KB, patch)
2020-02-04 01:23 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>