[Webkit-unassigned] [Bug 230136] Implement 'gamepad' Permissions Policy

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 26 00:18:55 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=230136

--- Comment #15 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 444622
  --> https://bugs.webkit.org/attachment.cgi?id=444622
Patch

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

> Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp:84
> +    if (!isFeaturePolicyAllowedByDocumentAndAllOwners(FeaturePolicy::Type::Gamepad, document, LogFeaturePolicyFailure::Yes))

I am not sure this is correct to get the document from the execution state.
It seems to me getting it from the navigator is better.
This could be tested with the edge case of a document having a same origin iframe, the iframe being denied gamepad permission, then calling iframe.contentWindow...
Can you check this case?

> LayoutTests/imported/w3c/ChangeLog:9
> +        * web-platform-tests/not-fully-active.https.html: Added.

This does not seem to be the right folder.
This should probably be in web-platform-tests/gamepad folder.
Looking at wpt, I can see tests that would seem useful, in particular gamepad-supported-by-feature-policy.html, which might be a bit redundant with http/tests/gamepad/gamepad-allow-attribute.https.html.
Can we import wpt/gampepad test, either in this patch or as a preliminary patch?
You can use Tools/Scripts/import-w3c-tests -t web-platform-tests/gamepad to do the import.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211126/4f2f8320/attachment.htm>


More information about the webkit-unassigned mailing list