mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Various CanGc fixes (#33800)
* CanGc fix for pagetransitionevent Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for dom/node Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for gamepad Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for gpu Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for dom/element Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for xhr Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for dom/worker Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for rtcdatachannel Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for rtcerror Signed-off-by: webbeef <me@webbeef.org> * Address review comments Signed-off-by: webbeef <me@webbeef.org> --------- Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
c00c6e728d
commit
2b71130a8a
24 changed files with 168 additions and 119 deletions
|
@ -20,7 +20,7 @@ use crate::dom::xrhand::XRHand;
|
|||
use crate::dom::xrsession::XRSession;
|
||||
use crate::dom::xrspace::XRSpace;
|
||||
use crate::realms::enter_realm;
|
||||
use crate::script_runtime::JSContext;
|
||||
use crate::script_runtime::{CanGc, JSContext};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct XRInputSource {
|
||||
|
@ -42,6 +42,7 @@ impl XRInputSource {
|
|||
global: &GlobalScope,
|
||||
session: &XRSession,
|
||||
info: InputSource,
|
||||
can_gc: CanGc,
|
||||
) -> XRInputSource {
|
||||
// <https://www.w3.org/TR/webxr-gamepads-module-1/#gamepad-differences>
|
||||
let gamepad = Gamepad::new(
|
||||
|
@ -56,6 +57,7 @@ impl XRInputSource {
|
|||
supports_trigger_rumble: false,
|
||||
},
|
||||
true,
|
||||
can_gc,
|
||||
);
|
||||
XRInputSource {
|
||||
reflector: Reflector::new(),
|
||||
|
@ -74,9 +76,10 @@ impl XRInputSource {
|
|||
global: &GlobalScope,
|
||||
session: &XRSession,
|
||||
info: InputSource,
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<XRInputSource> {
|
||||
let source = reflect_dom_object(
|
||||
Box::new(XRInputSource::new_inherited(global, session, info)),
|
||||
Box::new(XRInputSource::new_inherited(global, session, info, can_gc)),
|
||||
global,
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue