Propagate CanGc through dommatrix, dommatrixreadonly, and testbindings (#33822)

* CanGc fixes starting from dommatrix.rs
fixed conflicts
Signed-off-by: L Ashwin B <lashwinib@gmail.com>

~

* cleaning up

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* fixed cannot find value can_gc in this scope error

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
chickenleaf 2024-10-13 21:41:46 +05:30 committed by GitHub
parent bdd5fb2e5b
commit 92f12ff7cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 124 additions and 62 deletions

View file

@ -1552,12 +1552,12 @@ impl CanvasState {
}
// https://html.spec.whatwg.org/multipage/#dom-context-2d-gettransform
pub fn get_transform(&self, global: &GlobalScope) -> DomRoot<DOMMatrix> {
pub fn get_transform(&self, global: &GlobalScope, can_gc: CanGc) -> DomRoot<DOMMatrix> {
let (sender, receiver) = ipc::channel::<Transform2D<f32>>().unwrap();
self.send_canvas_2d_msg(Canvas2dMsg::GetTransform(sender));
let transform = receiver.recv().unwrap();
DOMMatrix::new(global, true, transform.cast::<f64>().to_3d())
DOMMatrix::new(global, true, transform.cast::<f64>().to_3d(), can_gc)
}
// https://html.spec.whatwg.org/multipage/#dom-context-2d-settransform