Replace CanGc::note() calls with arguments in components/script/dom (#33692)

* Replace CanGc::note() calls with arguments in components/script/dom

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Add methods to Bindings.conf

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Modify existing interface sections

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Resolve conflicts

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

---------

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
tanishka 2024-10-08 18:28:09 +05:30 committed by GitHub
parent 38c5ebbf8e
commit 39133a5478
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 53 additions and 31 deletions

View file

@ -2341,7 +2341,7 @@ impl ElementMethods for Element {
}
// https://drafts.csswg.org/cssom-view/#dom-element-getclientrects
fn GetClientRects(&self) -> Vec<DomRoot<DOMRect>> {
fn GetClientRects(&self, can_gc: CanGc) -> Vec<DomRoot<DOMRect>> {
let win = window_from_node(self);
let raw_rects = self.upcast::<Node>().content_boxes();
raw_rects
@ -2353,13 +2353,14 @@ impl ElementMethods for Element {
rect.origin.y.to_f64_px(),
rect.size.width.to_f64_px(),
rect.size.height.to_f64_px(),
can_gc,
)
})
.collect()
}
// https://drafts.csswg.org/cssom-view/#dom-element-getboundingclientrect
fn GetBoundingClientRect(&self) -> DomRoot<DOMRect> {
fn GetBoundingClientRect(&self, can_gc: CanGc) -> DomRoot<DOMRect> {
let win = window_from_node(self);
let rect = self.upcast::<Node>().bounding_content_box_or_zero();
DOMRect::new(
@ -2368,6 +2369,7 @@ impl ElementMethods for Element {
rect.origin.y.to_f64_px(),
rect.size.width.to_f64_px(),
rect.size.height.to_f64_px(),
can_gc,
)
}