mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Rename ToggleEventRunnable to DetailsNotificationRunnable
This commit is contained in:
parent
c1252a40d9
commit
ce302c78c1
1 changed files with 4 additions and 4 deletions
|
@ -74,7 +74,7 @@ impl VirtualMethods for HTMLDetailsElement {
|
||||||
let window = window.r();
|
let window = window.r();
|
||||||
let task_source = window.dom_manipulation_task_source();
|
let task_source = window.dom_manipulation_task_source();
|
||||||
let details = Trusted::new(self);
|
let details = Trusted::new(self);
|
||||||
let runnable = box ToggleEventRunnable {
|
let runnable = box DetailsNotificationRunnable {
|
||||||
element: details,
|
element: details,
|
||||||
toggle_number: counter
|
toggle_number: counter
|
||||||
};
|
};
|
||||||
|
@ -83,13 +83,13 @@ impl VirtualMethods for HTMLDetailsElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct ToggleEventRunnable {
|
pub struct DetailsNotificationRunnable {
|
||||||
element: Trusted<HTMLDetailsElement>,
|
element: Trusted<HTMLDetailsElement>,
|
||||||
toggle_number: u32
|
toggle_number: u32
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Runnable for ToggleEventRunnable {
|
impl Runnable for DetailsNotificationRunnable {
|
||||||
fn handler(self: Box<ToggleEventRunnable>) {
|
fn handler(self: Box<DetailsNotificationRunnable>) {
|
||||||
let target = self.element.root();
|
let target = self.element.root();
|
||||||
if target.check_toggle_count(self.toggle_number) {
|
if target.check_toggle_count(self.toggle_number) {
|
||||||
target.upcast::<EventTarget>().fire_simple_event("toggle");
|
target.upcast::<EventTarget>().fire_simple_event("toggle");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue