mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
More files with CanGc fixes (#33892)
* More files with CanGc fixes Signed-off-by: L Ashwin B <lashwinib@gmail.com> * removed the can_gc inside !task Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
fde8d72aca
commit
af6154cf63
31 changed files with 226 additions and 100 deletions
|
@ -16,6 +16,7 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::xrrigidtransform::XRRigidTransform;
|
||||
use crate::dom::xrsession::{cast_transform, ApiPose, BaseTransform, XRSession};
|
||||
use crate::dom::xrspace::XRSpace;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct XRReferenceSpace {
|
||||
|
@ -42,8 +43,9 @@ impl XRReferenceSpace {
|
|||
global: &GlobalScope,
|
||||
session: &XRSession,
|
||||
ty: XRReferenceSpaceType,
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<XRReferenceSpace> {
|
||||
let offset = XRRigidTransform::identity(global);
|
||||
let offset = XRRigidTransform::identity(global, can_gc);
|
||||
Self::new_offset(global, session, ty, &offset)
|
||||
}
|
||||
|
||||
|
@ -79,9 +81,9 @@ impl XRReferenceSpace {
|
|||
|
||||
impl XRReferenceSpaceMethods for XRReferenceSpace {
|
||||
/// <https://immersive-web.github.io/webxr/#dom-xrreferencespace-getoffsetreferencespace>
|
||||
fn GetOffsetReferenceSpace(&self, new: &XRRigidTransform) -> DomRoot<Self> {
|
||||
fn GetOffsetReferenceSpace(&self, new: &XRRigidTransform, can_gc: CanGc) -> DomRoot<Self> {
|
||||
let offset = new.transform().then(&self.offset.transform());
|
||||
let offset = XRRigidTransform::new(&self.global(), offset);
|
||||
let offset = XRRigidTransform::new(&self.global(), offset, can_gc);
|
||||
Self::new_offset(
|
||||
&self.global(),
|
||||
self.upcast::<XRSpace>().session(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue