aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gamepadbuttonlist.rs
diff options
context:
space:
mode:
authorAuguste Baum <52001167+augustebaum@users.noreply.github.com>2025-02-23 01:34:51 +0100
committerGitHub <noreply@github.com>2025-02-23 00:34:51 +0000
commitb0b0289014b707505a6921152b9ecba75afa207f (patch)
treef2ffba650cf28da83904b14e94ba3913967951f2 /components/script/dom/gamepadbuttonlist.rs
parent02199520f2b611c9b5ab7b34a2372689cb4c22cd (diff)
downloadservo-b0b0289014b707505a6921152b9ecba75afa207f.tar.gz
servo-b0b0289014b707505a6921152b9ecba75afa207f.zip
refactor: propagate CanGc arguments through callers (#35591)
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
Diffstat (limited to 'components/script/dom/gamepadbuttonlist.rs')
-rw-r--r--components/script/dom/gamepadbuttonlist.rs38
1 files changed, 19 insertions, 19 deletions
diff --git a/components/script/dom/gamepadbuttonlist.rs b/components/script/dom/gamepadbuttonlist.rs
index acca0bd03cb..92d4edac0a3 100644
--- a/components/script/dom/gamepadbuttonlist.rs
+++ b/components/script/dom/gamepadbuttonlist.rs
@@ -62,27 +62,27 @@ impl GamepadButtonListMethods<crate::DomTypeHolder> for GamepadButtonList {
impl GamepadButtonList {
/// Initialize the number of buttons in the "standard" gamepad mapping.
/// <https://www.w3.org/TR/gamepad/#dfn-initializing-buttons>
- pub(crate) fn init_buttons(global: &GlobalScope) -> DomRoot<GamepadButtonList> {
+ pub(crate) fn init_buttons(global: &GlobalScope, can_gc: CanGc) -> DomRoot<GamepadButtonList> {
let standard_buttons = &[
- GamepadButton::new(global, false, false, CanGc::note()), // Bottom button in right cluster
- GamepadButton::new(global, false, false, CanGc::note()), // Right button in right cluster
- GamepadButton::new(global, false, false, CanGc::note()), // Left button in right cluster
- GamepadButton::new(global, false, false, CanGc::note()), // Top button in right cluster
- GamepadButton::new(global, false, false, CanGc::note()), // Top left front button
- GamepadButton::new(global, false, false, CanGc::note()), // Top right front button
- GamepadButton::new(global, false, false, CanGc::note()), // Bottom left front button
- GamepadButton::new(global, false, false, CanGc::note()), // Bottom right front button
- GamepadButton::new(global, false, false, CanGc::note()), // Left button in center cluster
- GamepadButton::new(global, false, false, CanGc::note()), // Right button in center cluster
- GamepadButton::new(global, false, false, CanGc::note()), // Left stick pressed button
- GamepadButton::new(global, false, false, CanGc::note()), // Right stick pressed button
- GamepadButton::new(global, false, false, CanGc::note()), // Top button in left cluster
- GamepadButton::new(global, false, false, CanGc::note()), // Bottom button in left cluster
- GamepadButton::new(global, false, false, CanGc::note()), // Left button in left cluster
- GamepadButton::new(global, false, false, CanGc::note()), // Right button in left cluster
- GamepadButton::new(global, false, false, CanGc::note()), // Center button in center cluster
+ GamepadButton::new(global, false, false, can_gc), // Bottom button in right cluster
+ GamepadButton::new(global, false, false, can_gc), // Right button in right cluster
+ GamepadButton::new(global, false, false, can_gc), // Left button in right cluster
+ GamepadButton::new(global, false, false, can_gc), // Top button in right cluster
+ GamepadButton::new(global, false, false, can_gc), // Top left front button
+ GamepadButton::new(global, false, false, can_gc), // Top right front button
+ GamepadButton::new(global, false, false, can_gc), // Bottom left front button
+ GamepadButton::new(global, false, false, can_gc), // Bottom right front button
+ GamepadButton::new(global, false, false, can_gc), // Left button in center cluster
+ GamepadButton::new(global, false, false, can_gc), // Right button in center cluster
+ GamepadButton::new(global, false, false, can_gc), // Left stick pressed button
+ GamepadButton::new(global, false, false, can_gc), // Right stick pressed button
+ GamepadButton::new(global, false, false, can_gc), // Top button in left cluster
+ GamepadButton::new(global, false, false, can_gc), // Bottom button in left cluster
+ GamepadButton::new(global, false, false, can_gc), // Left button in left cluster
+ GamepadButton::new(global, false, false, can_gc), // Right button in left cluster
+ GamepadButton::new(global, false, false, can_gc), // Center button in center cluster
];
rooted_vec!(let buttons <- standard_buttons.iter().map(DomRoot::as_traced));
- Self::new(global, buttons.r(), CanGc::note())
+ Self::new(global, buttons.r(), can_gc)
}
}