refactor: propagate CanGc arguments through callers (#35565)

Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
Auguste Baum 2025-02-21 18:35:17 +01:00 committed by GitHub
parent 085cd981aa
commit ca1f0486ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 62 additions and 42 deletions

View file

@ -317,7 +317,7 @@ impl Activatable for HTMLAnchorElement {
}
//https://html.spec.whatwg.org/multipage/#the-a-element:activation-behaviour
fn activation_behavior(&self, event: &Event, target: &EventTarget, _can_gc: CanGc) {
fn activation_behavior(&self, event: &Event, target: &EventTarget, can_gc: CanGc) {
let element = self.as_element();
let mouse_event = event.downcast::<MouseEvent>().unwrap();
let mut ismap_suffix = None;
@ -327,7 +327,7 @@ impl Activatable for HTMLAnchorElement {
if let Some(element) = target.downcast::<Element>() {
if target.is::<HTMLImageElement>() && element.has_attribute(&local_name!("ismap")) {
let target_node = element.upcast::<Node>();
let rect = target_node.bounding_content_box_or_zero(CanGc::note());
let rect = target_node.bounding_content_box_or_zero(can_gc);
ismap_suffix = Some(format!(
"?{},{}",
mouse_event.ClientX().to_f32().unwrap() - rect.origin.x.to_f32_px(),