From 4fe9ad70fda8c08e5762ad5c57a914cbc92c74c4 Mon Sep 17 00:00:00 2001 From: James Stuckey Weber Date: Wed, 18 Dec 2024 13:13:40 -0500 Subject: [PATCH] Add secure context and iframe to Gamepad features (#2469) --- features/gamepad-haptics.yml | 1 + features/gamepad-haptics.yml.dist | 6 ++++++ features/gamepad-vr.yml | 5 +++++ features/gamepad-vr.yml.dist | 11 +++++++++++ features/gamepad.yml | 7 ++++++- features/gamepad.yml.dist | 23 ++++++++++++++++++++--- 6 files changed, 49 insertions(+), 4 deletions(-) diff --git a/features/gamepad-haptics.yml b/features/gamepad-haptics.yml index b7152252c5c..2990c1d259d 100644 --- a/features/gamepad-haptics.yml +++ b/features/gamepad-haptics.yml @@ -16,3 +16,4 @@ compat_features: - api.GamepadHapticActuator.playEffect.params_rightTrigger_parameter - api.GamepadHapticActuator.playEffect.type_trigger-rumble - api.GamepadHapticActuator.reset + - api.GamepadHapticActuator.secure_context_required diff --git a/features/gamepad-haptics.yml.dist b/features/gamepad-haptics.yml.dist index 6507dd44596..e9b74937f79 100644 --- a/features/gamepad-haptics.yml.dist +++ b/features/gamepad-haptics.yml.dist @@ -54,3 +54,9 @@ compat_features: # firefox_android: "55" - api.Gamepad.hapticActuators - api.GamepadHapticActuator.pulse + + # baseline: false + # support: + # firefox: "91" + # firefox_android: "91" + - api.GamepadHapticActuator.secure_context_required diff --git a/features/gamepad-vr.yml b/features/gamepad-vr.yml index dd6a331cae5..ee71ce0161f 100644 --- a/features/gamepad-vr.yml +++ b/features/gamepad-vr.yml @@ -2,6 +2,10 @@ name: Gamepad VR hands and poses description: The `hand` and `pose` properties of a `Gamepad` object represent the position in space and the hand that WebVR controllers are held in. spec: https://w3c.github.io/gamepad/extensions.html group: gamepad +status: + compute_from: + - api.Gamepad.hand + - api.Gamepad.pose compat_features: - api.Gamepad.hand - api.Gamepad.pose @@ -14,3 +18,4 @@ compat_features: - api.GamepadPose.linearVelocity - api.GamepadPose.orientation - api.GamepadPose.position + - api.GamepadPose.secure_context_required diff --git a/features/gamepad-vr.yml.dist b/features/gamepad-vr.yml.dist index 41345082244..01e2a75461e 100644 --- a/features/gamepad-vr.yml.dist +++ b/features/gamepad-vr.yml.dist @@ -7,6 +7,11 @@ status: firefox: "55" firefox_android: "55" compat_features: + # ⬇️ Same status as overall feature ⬇️ + # baseline: false + # support: + # firefox: "55" + # firefox_android: "55" - api.Gamepad.hand - api.Gamepad.pose - api.GamepadPose @@ -18,3 +23,9 @@ compat_features: - api.GamepadPose.linearVelocity - api.GamepadPose.orientation - api.GamepadPose.position + + # baseline: false + # support: + # firefox: "91" + # firefox_android: "91" + - api.GamepadPose.secure_context_required diff --git a/features/gamepad.yml b/features/gamepad.yml index d79cc3fc238..a1fb4b51c09 100644 --- a/features/gamepad.yml +++ b/features/gamepad.yml @@ -4,7 +4,7 @@ spec: https://w3c.github.io/gamepad/ caniuse: gamepad group: gamepad status: - compute_from: api.Gamepad + compute_from: api.Navigator.getGamepads compat_features: - api.Gamepad - api.Gamepad.axes @@ -13,13 +13,18 @@ compat_features: - api.Gamepad.id - api.Gamepad.index - api.Gamepad.mapping + - api.Gamepad.secure_context_required - api.Gamepad.timestamp - api.GamepadButton - api.GamepadButton.pressed + - api.GamepadButton.secure_context_required - api.GamepadButton.value - api.Navigator.getGamepads + - api.Navigator.getGamepads.secure_context_required - api.GamepadEvent - api.GamepadEvent.GamepadEvent - api.GamepadEvent.gamepad + - api.GamepadEvent.secure_context_required - api.Window.gamepadconnected_event - api.Window.gamepaddisconnected_event + - html.elements.iframe.allow.gamepad diff --git a/features/gamepad.yml.dist b/features/gamepad.yml.dist index a6c917d29a6..973617bff79 100644 --- a/features/gamepad.yml.dist +++ b/features/gamepad.yml.dist @@ -6,15 +6,14 @@ status: baseline_low_date: 2017-03-27 baseline_high_date: 2019-09-27 support: - chrome: "21" - chrome_android: "25" + chrome: "35" + chrome_android: "35" edge: "12" firefox: "29" firefox_android: "32" safari: "10.1" safari_ios: "10.3" compat_features: - # ⬇️ Same status as overall feature ⬇️ # baseline: high # baseline_low_date: 2017-03-27 # baseline_high_date: 2019-09-27 @@ -52,6 +51,7 @@ compat_features: # safari_ios: "10.3" - api.Gamepad.connected + # ⬇️ Same status as overall feature ⬇️ # baseline: high # baseline_low_date: 2017-03-27 # baseline_high_date: 2019-09-27 @@ -74,3 +74,20 @@ compat_features: # safari_ios: "16" - api.Window.gamepadconnected_event - api.Window.gamepaddisconnected_event + + # baseline: false + # support: + # firefox: "91" + # firefox_android: "91" + - api.Gamepad.secure_context_required + - api.GamepadButton.secure_context_required + - api.GamepadEvent.secure_context_required + + # baseline: false + # support: + # firefox: "91" + - api.Navigator.getGamepads.secure_context_required + + # baseline: false + # support: {} + - html.elements.iframe.allow.gamepad