Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 14e114dfe9593b8ad94eb21ace9923e9968b21b2
https://github.com/WebKit/WebKit/commit/14e114dfe9593b8ad94eb21ace9923e9968b21b2
Author: Charlie Wolfe <[email protected]>
Date: 2026-06-17 (Wed, 17 Jun 2026)
Changed paths:
A
LayoutTests/http/tests/gamepad/initial-gamepads-skips-empty-slot-expected.txt
A LayoutTests/http/tests/gamepad/initial-gamepads-skips-empty-slot.html
A LayoutTests/http/tests/gamepad/resources/initial-gamepads-iframe.html
M LayoutTests/platform/glib/TestExpectations
M Source/WebKit/WebProcess/Gamepad/WebGamepadProvider.cpp
Log Message:
-----------
WebGamepadProvider::setInitialGamepads stops at the first empty slot instead
of skipping it
https://bugs.webkit.org/show_bug.cgi?id=317217
rdar://179838322
Reviewed by Brady Eidson.
setInitialGamepads() returned at the first empty (std::nullopt) slot, dropping
every gamepad at a
later index. It only runs with a populated snapshot in a process that starts
monitoring after
gamepads are already connected, and the first such process always gets an empty
snapshot. So the
test enables site isolation: the main frame connects gamepads at indices 0 and
2 (index 1 empty),
then a cross-origin iframe's separate process gets the gapped snapshot via
SetInitialGamepads() and
reports a missing index 2.
Test: http/tests/gamepad/initial-gamepads-skips-empty-slot.html
*
LayoutTests/http/tests/gamepad/initial-gamepads-skips-empty-slot-expected.txt:
Added.
* LayoutTests/http/tests/gamepad/initial-gamepads-skips-empty-slot.html: Added.
* LayoutTests/http/tests/gamepad/resources/initial-gamepads-iframe.html: Added.
* Source/WebKit/WebProcess/Gamepad/WebGamepadProvider.cpp:
(WebKit::WebGamepadProvider::setInitialGamepads):
Canonical link: https://commits.webkit.org/315393@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications