Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gamepad.vibrationActuator should be nullable #8539

Merged

Conversation

cdumez
Copy link
Contributor

@cdumez cdumez commented Jan 11, 2023

3d4e479

Gamepad.vibrationActuator should be nullable
https://bugs.webkit.org/show_bug.cgi?id=250411

Reviewed by Brent Fulgham.

Gamepad.vibrationActuator should be nullable:
- w3c/gamepad#178

Gamepad.vibrationActuator is supposed to return null if the gamepad doesn't support dual-rumble:
- https://w3c.github.io/gamepad/extensions.html#gamepadhapticactuator-interface (Construction section)

* LayoutTests/gamepad/gamepad-event-handlers.html:
* LayoutTests/gamepad/gamepad-polling-access.html:
* LayoutTests/gamepad/gamepad-timestamp.html:
* LayoutTests/gamepad/gamepad-vibrationActuator-SameObject.html:
* LayoutTests/gamepad/gamepad-vibrationActuator-nullable-expected.txt: Added.
* LayoutTests/gamepad/gamepad-vibrationActuator-nullable.html: Added.
* LayoutTests/gamepad/gamepad-vibrationActuator-playEffect-validation.html:
* LayoutTests/gamepad/gamepad-vibrationActuator-type.html:
* LayoutTests/gamepad/gamepad-visibility-1.html:
* Source/WebCore/Modules/gamepad/Gamepad.cpp:
(WebCore::Gamepad::Gamepad):
(WebCore::Gamepad::vibrationActuator): Deleted.
* Source/WebCore/Modules/gamepad/Gamepad.h:
* Source/WebCore/Modules/gamepad/Gamepad.idl:
* Source/WebCore/testing/MockGamepad.cpp:
(WebCore::MockGamepad::MockGamepad):
(WebCore::MockGamepad::updateDetails):
* Source/WebCore/testing/MockGamepad.h:
* Source/WebCore/testing/MockGamepadProvider.cpp:
(WebCore::MockGamepadProvider::setMockGamepadDetails):
* Source/WebCore/testing/MockGamepadProvider.h:
* Source/WebCore/testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::setMockGamepadDetails):
* Source/WebCore/testing/js/WebCoreTestSupport.h:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setMockGamepadDetails):
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

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

a6beec0

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2   πŸ§ͺ api-mac βœ… πŸ§ͺ gtk-wk2
  πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk1   πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk2
βœ… πŸ›  tv-sim   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch βœ… πŸ§ͺ mac-wk2-stress
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch-sim

@cdumez cdumez self-assigned this Jan 11, 2023
@cdumez cdumez added the WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit). label Jan 11, 2023
Copy link
Contributor

@brentfulgham brentfulgham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@cdumez cdumez added the merge-queue Applied to send a pull request to merge-queue label Jan 11, 2023
https://bugs.webkit.org/show_bug.cgi?id=250411

Reviewed by Brent Fulgham.

Gamepad.vibrationActuator should be nullable:
- w3c/gamepad#178

Gamepad.vibrationActuator is supposed to return null if the gamepad doesn't support dual-rumble:
- https://w3c.github.io/gamepad/extensions.html#gamepadhapticactuator-interface (Construction section)

* LayoutTests/gamepad/gamepad-event-handlers.html:
* LayoutTests/gamepad/gamepad-polling-access.html:
* LayoutTests/gamepad/gamepad-timestamp.html:
* LayoutTests/gamepad/gamepad-vibrationActuator-SameObject.html:
* LayoutTests/gamepad/gamepad-vibrationActuator-nullable-expected.txt: Added.
* LayoutTests/gamepad/gamepad-vibrationActuator-nullable.html: Added.
* LayoutTests/gamepad/gamepad-vibrationActuator-playEffect-validation.html:
* LayoutTests/gamepad/gamepad-vibrationActuator-type.html:
* LayoutTests/gamepad/gamepad-visibility-1.html:
* Source/WebCore/Modules/gamepad/Gamepad.cpp:
(WebCore::Gamepad::Gamepad):
(WebCore::Gamepad::vibrationActuator): Deleted.
* Source/WebCore/Modules/gamepad/Gamepad.h:
* Source/WebCore/Modules/gamepad/Gamepad.idl:
* Source/WebCore/testing/MockGamepad.cpp:
(WebCore::MockGamepad::MockGamepad):
(WebCore::MockGamepad::updateDetails):
* Source/WebCore/testing/MockGamepad.h:
* Source/WebCore/testing/MockGamepadProvider.cpp:
(WebCore::MockGamepadProvider::setMockGamepadDetails):
* Source/WebCore/testing/MockGamepadProvider.h:
* Source/WebCore/testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::setMockGamepadDetails):
* Source/WebCore/testing/js/WebCoreTestSupport.h:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setMockGamepadDetails):
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

Canonical link: https://commits.webkit.org/258812@main
@webkit-commit-queue webkit-commit-queue merged commit 3d4e479 into WebKit:main Jan 12, 2023
@webkit-commit-queue
Copy link
Collaborator

Committed 258812@main (3d4e479): https://commits.webkit.org/258812@main

Reviewed commits have been landed. Closing PR #8539 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit).
Projects
None yet
4 participants