script: add CanGc as argument to methods in HTMLOptionElement (#40873)

script: add CanGc as argument to methods in HTMLOptionElement

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-11-24 20:41:39 -08:00
committed by GitHub
parent 22a13d6b13
commit d0ce02a860
3 changed files with 6 additions and 5 deletions

View File

@@ -283,11 +283,11 @@ impl HTMLOptionElementMethods<crate::DomTypeHolder> for HTMLOptionElement {
}
/// <https://html.spec.whatwg.org/multipage/#dom-option-selected>
fn SetSelected(&self, selected: bool) {
fn SetSelected(&self, selected: bool, can_gc: CanGc) {
self.dirtiness.set(true);
self.selectedness.set(selected);
self.pick_if_selected_and_reset();
self.update_select_validity(CanGc::note());
self.update_select_validity(can_gc);
}
/// <https://html.spec.whatwg.org/multipage/#dom-option-index>