add CanGc as argument to methods in HTMLCollection, HTMLDataListElement, HTMLDialogElement, HTMLElement, HTMLFieldSetElement, HTMLFormControlsCollection, HTMLFormElement, HTMLIFrameElement (#36495)

add CanGc as argument to methods in HTMLCollection, HTMLDataListElement,
HTMLDialogElement, HTMLElement, HTMLFieldSetElement,
HTMLFormControlsCollection, HTMLFormElement, HTMLIFrameElement

Testing: These changes do not require tests because they are a refactor.
Addresses 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-13 00:10:00 -07:00 committed by GitHub
parent 06f86f88a2
commit 3babf74986
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 69 additions and 60 deletions

View file

@ -87,7 +87,7 @@ impl HTMLFieldSetElement {
impl HTMLFieldSetElementMethods<crate::DomTypeHolder> for HTMLFieldSetElement {
// https://html.spec.whatwg.org/multipage/#dom-fieldset-elements
fn Elements(&self) -> DomRoot<HTMLCollection> {
fn Elements(&self, can_gc: CanGc) -> DomRoot<HTMLCollection> {
HTMLCollection::new_with_filter_fn(
&self.owner_window(),
self.upcast(),
@ -96,7 +96,7 @@ impl HTMLFieldSetElementMethods<crate::DomTypeHolder> for HTMLFieldSetElement {
.downcast::<HTMLElement>()
.is_some_and(HTMLElement::is_listed_element)
},
CanGc::note(),
can_gc,
)
}
@ -223,7 +223,7 @@ impl VirtualMethods for HTMLFieldSetElement {
);
}
}
element.update_sequentially_focusable_status(CanGc::note());
element.update_sequentially_focusable_status(can_gc);
}
} else {
for field in fields {
@ -244,10 +244,10 @@ impl VirtualMethods for HTMLFieldSetElement {
);
}
}
element.update_sequentially_focusable_status(CanGc::note());
element.update_sequentially_focusable_status(can_gc);
}
}
element.update_sequentially_focusable_status(CanGc::note());
element.update_sequentially_focusable_status(can_gc);
},
local_name!("form") => {
self.form_attribute_mutated(mutation, can_gc);