add CanGc as argument to methods in DissimilarOriginWindow, DocumentFragment, DocumentType, DOMRect, DOMRectReadOnly, DOMStringMap (#36395)

add CanGc as argument to methods in DissimilarOriginWindow,
DocumentFragment, DocumentType, DOMRect, DOMRectReadOnly, DOMStringMap

Testing: These changes do not require tests because they are a refactor.
Addressed part of https://github.com/servo/servo/issues/34573.

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
Yerkebulan Tulibergenov 2025-04-07 19:33:21 -07:00 committed by GitHub
parent 76e0b8ec06
commit 40655cc06c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 31 additions and 15 deletions

View file

@ -75,10 +75,10 @@ impl DOMRectMethods<crate::DomTypeHolder> for DOMRect {
// https://drafts.fxtf.org/geometry/#dom-domrect-fromrect
#[cfg_attr(crown, allow(crown::unrooted_must_root))]
fn FromRect(global: &GlobalScope, other: &DOMRectInit) -> DomRoot<DOMRect> {
fn FromRect(global: &GlobalScope, other: &DOMRectInit, can_gc: CanGc) -> DomRoot<DOMRect> {
let rect = create_a_domrectreadonly_from_the_dictionary(other);
reflect_dom_object(Box::new(Self { rect }), global, CanGc::note())
reflect_dom_object(Box::new(Self { rect }), global, can_gc)
}
// https://drafts.fxtf.org/geometry/#dom-domrect-x