mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
CanGc fixes from eventtarget.rs (#33973)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
7b392db02f
commit
7fbd2a521e
23 changed files with 108 additions and 81 deletions
|
@ -1586,8 +1586,8 @@ impl HTMLInputElementMethods for HTMLInputElement {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-cva-checkvalidity
|
||||
fn CheckValidity(&self) -> bool {
|
||||
self.check_validity()
|
||||
fn CheckValidity(&self, can_gc: CanGc) -> bool {
|
||||
self.check_validity(can_gc)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-cva-reportvalidity
|
||||
|
@ -1889,8 +1889,8 @@ impl HTMLInputElement {
|
|||
let filelist = FileList::new(&window, files);
|
||||
self.filelist.set(Some(&filelist));
|
||||
|
||||
target.fire_bubbling_event(atom!("input"));
|
||||
target.fire_bubbling_event(atom!("change"));
|
||||
target.fire_bubbling_event(atom!("input"), can_gc);
|
||||
target.fire_bubbling_event(atom!("change"), can_gc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2805,7 +2805,7 @@ impl Activatable for HTMLInputElement {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#run-post-click-activation-steps
|
||||
fn activation_behavior(&self, _event: &Event, _target: &EventTarget, _can_gc: CanGc) {
|
||||
fn activation_behavior(&self, _event: &Event, _target: &EventTarget, can_gc: CanGc) {
|
||||
let ty = self.input_type();
|
||||
match ty {
|
||||
InputType::Submit => {
|
||||
|
@ -2836,8 +2836,8 @@ impl Activatable for HTMLInputElement {
|
|||
return;
|
||||
}
|
||||
let target = self.upcast::<EventTarget>();
|
||||
target.fire_bubbling_event(atom!("input"));
|
||||
target.fire_bubbling_event(atom!("change"));
|
||||
target.fire_bubbling_event(atom!("input"), can_gc);
|
||||
target.fire_bubbling_event(atom!("change"), can_gc);
|
||||
},
|
||||
InputType::File => self.select_files(None, CanGc::note()),
|
||||
_ => (),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue