mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Propagate CanGc
arguments through callers in constructors (#35541)
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
parent
5465bfc2af
commit
863d2ce871
260 changed files with 986 additions and 603 deletions
|
@ -27,11 +27,15 @@ impl GamepadButtonList {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn new(global: &GlobalScope, list: &[&GamepadButton]) -> DomRoot<GamepadButtonList> {
|
||||
pub(crate) fn new(
|
||||
global: &GlobalScope,
|
||||
list: &[&GamepadButton],
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<GamepadButtonList> {
|
||||
reflect_dom_object(
|
||||
Box::new(GamepadButtonList::new_inherited(list)),
|
||||
global,
|
||||
CanGc::note(),
|
||||
can_gc,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -60,25 +64,25 @@ impl GamepadButtonList {
|
|||
/// <https://www.w3.org/TR/gamepad/#dfn-initializing-buttons>
|
||||
pub(crate) fn init_buttons(global: &GlobalScope) -> DomRoot<GamepadButtonList> {
|
||||
let standard_buttons = &[
|
||||
GamepadButton::new(global, false, false), // Bottom button in right cluster
|
||||
GamepadButton::new(global, false, false), // Right button in right cluster
|
||||
GamepadButton::new(global, false, false), // Left button in right cluster
|
||||
GamepadButton::new(global, false, false), // Top button in right cluster
|
||||
GamepadButton::new(global, false, false), // Top left front button
|
||||
GamepadButton::new(global, false, false), // Top right front button
|
||||
GamepadButton::new(global, false, false), // Bottom left front button
|
||||
GamepadButton::new(global, false, false), // Bottom right front button
|
||||
GamepadButton::new(global, false, false), // Left button in center cluster
|
||||
GamepadButton::new(global, false, false), // Right button in center cluster
|
||||
GamepadButton::new(global, false, false), // Left stick pressed button
|
||||
GamepadButton::new(global, false, false), // Right stick pressed button
|
||||
GamepadButton::new(global, false, false), // Top button in left cluster
|
||||
GamepadButton::new(global, false, false), // Bottom button in left cluster
|
||||
GamepadButton::new(global, false, false), // Left button in left cluster
|
||||
GamepadButton::new(global, false, false), // Right button in left cluster
|
||||
GamepadButton::new(global, false, false), // Center button in center cluster
|
||||
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
|
||||
];
|
||||
rooted_vec!(let buttons <- standard_buttons.iter().map(DomRoot::as_traced));
|
||||
Self::new(global, buttons.r())
|
||||
Self::new(global, buttons.r(), CanGc::note())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue