CanGc fixes (#33852)

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
chickenleaf 2024-10-16 08:20:28 +05:30 committed by GitHub
parent 5b8fbb023d
commit a2f81d69c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 92 additions and 63 deletions

View file

@ -759,7 +759,7 @@ impl DOMMatrixReadOnlyMethods for DOMMatrixReadOnly {
}
// https://drafts.fxtf.org/geometry-1/#dom-dommatrixreadonly-transformpoint
fn TransformPoint(&self, point: &DOMPointInit, _can_gc: CanGc) -> DomRoot<DOMPoint> {
fn TransformPoint(&self, point: &DOMPointInit, can_gc: CanGc) -> DomRoot<DOMPoint> {
// Euclid always normalizes the homogeneous coordinate which is usually the right
// thing but may (?) not be compliant with the CSS matrix spec (or at least is
// probably not the behavior web authors will expect even if it is mathematically
@ -772,7 +772,7 @@ impl DOMMatrixReadOnlyMethods for DOMMatrixReadOnly {
let z = point.x * mat.m13 + point.y * mat.m23 + point.z * mat.m33 + point.w * mat.m43;
let w = point.x * mat.m14 + point.y * mat.m24 + point.z * mat.m34 + point.w * mat.m44;
DOMPoint::new(&self.global(), x, y, z, w)
DOMPoint::new(&self.global(), x, y, z, w, can_gc)
}
// https://drafts.fxtf.org/geometry-1/#dom-dommatrixreadonly-tofloat32array