servo/components/script
Daniel Adams c999d4546c
Implement non-XR Gamepad discovery and input (#31200)
* Create embedder event to send to constellation

* Handle gamepad message in constellation, send to script thread

* Handle GamepadEvent in script thread and dispatch event to document

* Add missing Clones, fix event

* Add gamepad task source

* Adjust GamepadIndex type, remove unused imports

* Add internal getter for gamepads list

* Update gamepad new methods

* Handle gamepad connect and disconnect events

* Proto will be none, no need for HandleObject

* Initialize buttons and axes to standard mapping

* Adjust update type index types

* Update GamepadButton update function

* Adjust Gamepad mapping comments to match spec, add update logic

* Amend comment

* Update button and axis inputs on Updated event

* Add GilRs as gamepad backend in servoshell

* Add spec links, queue gamepad updates on task source

* ./mach fmt

* Fix comment length

* Split out button init, update spec comments

* Move gamepad event handling from document to global

* Map and normalize axes/button values

* Use std::time for gamepad timestamp

* Adjust gamepad handling in event loop

* Move button press/touch check into map+normalize function

- Small change but is more in line with spec

* ./mach fmt

* Update comment spec links and warning messages

* Doc comments -> regular comments

* Add window event handlers for gamepad connect/disconnect

* Adjust gamepad disconnect behavior

* Add missing TODO's, adjust gamepad/gamepadbutton list methods and formatting

* Update button handling from gilrs, add comments

* Enable gamepad pref during WPT tests and update expectations

* Update WPT expectations in meta-legacy-layout
2024-02-17 18:42:31 +00:00
..
docs Update branch name to main (#30877) 2023-12-16 09:32:20 +00:00
dom Implement non-XR Gamepad discovery and input (#31200) 2024-02-17 18:42:31 +00:00
layout_dom Further changes required by Servo 2023-11-24 08:57:14 +01:00
task_source Implement non-XR Gamepad discovery and input (#31200) 2024-02-17 18:42:31 +00:00
animation_timeline.rs script: Start replacing time with std::time and chrono (#30639) 2024-01-16 12:23:18 +00:00
animations.rs Replace script_plugins with a clippy like rustc driver (named crown) (#30508) 2023-12-01 15:50:52 +00:00
body.rs rustdoc: Fix many rustdoc errors (#31147) 2024-01-22 13:13:48 +00:00
build.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
canvas_state.rs style: Remove dependency on servo_url (#31358) 2024-02-16 11:56:35 +00:00
Cargo.toml script: implement navigator.hardwareConcurrency (#31268) 2024-02-07 18:41:58 +00:00
clipboard_provider.rs
devtools.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
document_loader.rs Replace script_plugins with a clippy like rustc driver (named crown) (#30508) 2023-12-01 15:50:52 +00:00
euclidext.rs Update euclid 2020-04-07 08:51:08 -07:00
fetch.rs rustdoc: Fix many rustdoc errors (#31147) 2024-01-22 13:13:48 +00:00
image_listener.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
init.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
layout_image.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
lib.rs Compile Servo with the latest version of rust stable (#30831) 2023-12-06 17:36:07 +00:00
mem.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
microtask.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
network_listener.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
realms.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
script_module.rs Remove deprecated remove function (#31213) 2024-01-30 03:49:11 +00:00
script_runtime.rs android: disable JIT in SM to workaround #31134 (#31270) 2024-02-07 03:59:28 +00:00
script_thread.rs Implement non-XR Gamepad discovery and input (#31200) 2024-02-17 18:42:31 +00:00
serviceworker_manager.rs rustdoc: Fix many rustdoc errors (#31147) 2024-01-22 13:13:48 +00:00
stylesheet_loader.rs style: Remove dependency on servo_url (#31358) 2024-02-16 11:56:35 +00:00
stylesheet_set.rs
task.rs ensure clean shutdown of all threads running JS 2020-06-30 13:22:38 +08:00
task_manager.rs Implement non-XR Gamepad discovery and input (#31200) 2024-02-17 18:42:31 +00:00
task_queue.rs rustdoc: Fix many rustdoc errors (#31147) 2024-01-22 13:13:48 +00:00
test.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
textinput.rs Update textinput.rs (#30643) 2023-11-01 13:27:32 +00:00
timers.rs rustdoc: Fix many rustdoc errors (#31147) 2024-01-22 13:13:48 +00:00
unpremultiplytable.rs
webdriver_handlers.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
window_named_properties.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00