[webkit-changes] [WebKit/WebKit] 642206: User activation should be enabled for gamepadconne...
youennf
noreply at github.com
Tue Jan 21 02:30:15 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 642206b4fe41ffa4b671f18ccae0d828a97405ec
https://github.com/WebKit/WebKit/commit/642206b4fe41ffa4b671f18ccae0d828a97405ec
Author: Youenn Fablet <youenn at apple.com>
Date: 2025-01-21 (Tue, 21 Jan 2025)
Changed paths:
A LayoutTests/gamepad/gamepad-user-activation-expected.txt
A LayoutTests/gamepad/gamepad-user-activation.html
M Source/WebCore/Modules/gamepad/GamepadManager.cpp
Log Message:
-----------
User activation should be enabled for gamepadconnected event
rdar://131557341
https://bugs.webkit.org/show_bug.cgi?id=286259
Reviewed by Brady Eidson.
As per https://w3c.github.io/gamepad/#dfn-update-gamepad-state, the gamepadconnected event is fired if a gamepad contains a user gesture,
https://w3c.github.io/gamepad/#dfn-gamepad-user-gesture.
It follows that it should be feasible to play audio within gamepadconnected callback, as done by websites such as xbox.com.
We add a user gesture indicator before firing the gamepadconnected event to follow the spec.
* LayoutTests/gamepad/gamepad-user-activation-expected.txt: Added.
* LayoutTests/gamepad/gamepad-user-activation.html: Added.
* Source/WebCore/Modules/gamepad/GamepadManager.cpp:
(WebCore::GamepadManager::makeGamepadVisible):
Canonical link: https://commits.webkit.org/289179@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list