[webkit-changes] [WebKit/WebKit] 82e7a7: Implement 'gamepad' Permissions Policy

Marcos Cáceres noreply at github.com
Sun Dec 17 19:40:38 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 82e7a7f647642e9e5158ec4bdc8f628f2e86e1e4
      https://github.com/WebKit/WebKit/commit/82e7a7f647642e9e5158ec4bdc8f628f2e86e1e4
  Author: Marcos Caceres <marcos at marcosc.com>
  Date:   2023-12-17 (Sun, 17 Dec 2023)

  Changed paths:
    A LayoutTests/http/tests/gamepad/gamepad-allow-attribute.https-expected.txt
    A LayoutTests/http/tests/gamepad/gamepad-allow-attribute.https.html
    A LayoutTests/http/tests/gamepad/resources/gamepad-postmessage.html
    M Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp
    M Source/WebCore/Modules/gamepad/NavigatorGamepad.h
    M Source/WebCore/html/FeaturePolicy.cpp
    M Source/WebCore/html/FeaturePolicy.h

  Log Message:
  -----------
  Implement 'gamepad' Permissions Policy
https://bugs.webkit.org/show_bug.cgi?id=230136
rdar://83219098

Reviewed by Youenn Fablet.

Implements "gampad" permission policy defaulting to '*' for the allow list.
This matches Chrome's behavior and is also what's intended to go into the spec:
https://github.com/w3c/gamepad/pull/156

* LayoutTests/http/tests/gamepad/gamepad-allow-attribute.https-expected.txt: Added.
* LayoutTests/http/tests/gamepad/gamepad-allow-attribute.https.html: Added.
* LayoutTests/http/tests/gamepad/resources/gamepad-postmessage.html: Added.
* Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::getGamepads): Deleted.
* Source/WebCore/Modules/gamepad/NavigatorGamepad.h:
* Source/WebCore/html/FeaturePolicy.cpp:
(WebCore::policyTypeName):
(WebCore::processOriginItem):
(WebCore::FeaturePolicy::parse):
(WebCore::FeaturePolicy::allows const):
* Source/WebCore/html/FeaturePolicy.h:

Canonical link: https://commits.webkit.org/272199@main




More information about the webkit-changes mailing list