mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Multiple CanGc fixes in components/script/dom (#33924)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
ee9e1fbbd6
commit
65c866285f
26 changed files with 77 additions and 37 deletions
|
@ -25,6 +25,7 @@ use crate::dom::htmlelement::HTMLElement;
|
|||
use crate::dom::htmlformelement::{FormControl, FormControlElementHelpers, HTMLFormElement};
|
||||
use crate::dom::node::{Node, ShadowIncluding};
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLLabelElement {
|
||||
|
@ -73,9 +74,9 @@ impl Activatable for HTMLLabelElement {
|
|||
// at all, we are free to do an implementation-dependent thing;
|
||||
// firing a click event is an example, and the precise details of that
|
||||
// click event (e.g. isTrusted) are not specified.
|
||||
fn activation_behavior(&self, _event: &Event, _target: &EventTarget) {
|
||||
fn activation_behavior(&self, _event: &Event, _target: &EventTarget, can_gc: CanGc) {
|
||||
if let Some(e) = self.GetControl() {
|
||||
e.Click();
|
||||
e.Click(can_gc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue