[webkit-changes] [WebKit/WebKit] 668728: Adopt GCController.physicalInputProfile

Brady Eidson noreply at github.com
Tue Nov 22 12:30:07 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6687281bb75fb8bbebd4904a403742911ce5f033
      https://github.com/WebKit/WebKit/commit/6687281bb75fb8bbebd4904a403742911ce5f033
  Author: Brady Eidson <beidson at apple.com>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M Source/WebCore/Modules/gamepad/GamepadButton.cpp
    M Source/WebCore/Modules/gamepad/GamepadButton.h
    M Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h
    M Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm
    M Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm
    M Source/WebCore/platform/gamepad/cocoa/GameControllerSoftLink.h
    M Source/WebCore/platform/gamepad/cocoa/GameControllerSoftLink.mm
    M Tools/TestWebKitAPI/Tests/mac/HIDGamepads.mm
    M Tools/TestWebKitAPI/mac/VirtualGamepad.h

  Log Message:
  -----------
  Adopt GCController.physicalInputProfile
https://bugs.webkit.org/show_bug.cgi?id=248110
rdar://102365548

Reviewed by Megan Gardner.

Due to GameController framework changes in Ventura, it's possible (even likely!) for a GCController to have neither
an extendedGamepad or gamepad (which was deprecated anyways)

Instead, the widely increased number of supported devices can all be represented by physicalInputProfile.

So let's adopt that, while further tinkering with an API test that was covered by this change.

* Source/WebCore/Modules/gamepad/GamepadButton.cpp:
(WebCore::GamepadButton::GamepadButton):
* Source/WebCore/Modules/gamepad/GamepadButton.h:
* Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h:
* Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm:
(WebCore::GameControllerGamepad::GameControllerGamepad):
(WebCore::GameControllerGamepad::setupElements):
(WebCore::homeButtonFromExtendedGamepad): Deleted.
(WebCore::GameControllerGamepad::setupAsExtendedGamepad): Deleted.
(WebCore::GameControllerGamepad::setupAsGamepad): Deleted.
* Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
(WebCore::GameControllerGamepadProvider::prewarmGameControllerDevicesIfNecessary):
* Source/WebCore/platform/gamepad/cocoa/GameControllerSoftLink.h:
* Source/WebCore/platform/gamepad/cocoa/GameControllerSoftLink.mm:
* Tools/TestWebKitAPI/Tests/mac/HIDGamepads.mm:
* Tools/TestWebKitAPI/mac/VirtualGamepad.h:
(TestWebKitAPI::VirtualGamepad::buttonCount const):
(TestWebKitAPI::VirtualGamepad::axisCount const):

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




More information about the webkit-changes mailing list