mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Add event runnables
Make tasks a wrapper over runnables
This commit is contained in:
parent
9b01a4cc97
commit
afc0ccb48d
9 changed files with 79 additions and 61 deletions
|
@ -242,7 +242,7 @@ impl HTMLMediaElement {
|
|||
elem: Trusted::new(self),
|
||||
};
|
||||
let win = window_from_node(self);
|
||||
let _ = win.dom_manipulation_task_source().queue(DOMManipulationTask::Runnable(box task));
|
||||
let _ = win.dom_manipulation_task_source().queue(DOMManipulationTask(box task));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#internal-pause-steps step 2.2
|
||||
|
@ -266,13 +266,13 @@ impl HTMLMediaElement {
|
|||
elem: Trusted::new(self),
|
||||
};
|
||||
let win = window_from_node(self);
|
||||
let _ = win.dom_manipulation_task_source().queue(DOMManipulationTask::Runnable(box task));
|
||||
let _ = win.dom_manipulation_task_source().queue(DOMManipulationTask(box task));
|
||||
}
|
||||
|
||||
fn queue_fire_simple_event(&self, type_: &'static str) {
|
||||
let win = window_from_node(self);
|
||||
let task = FireSimpleEventTask::new(self, type_);
|
||||
let _ = win.dom_manipulation_task_source().queue(DOMManipulationTask::Runnable(box task));
|
||||
let _ = win.dom_manipulation_task_source().queue(DOMManipulationTask(box task));
|
||||
}
|
||||
|
||||
fn fire_simple_event(&self, type_: &str) {
|
||||
|
@ -499,7 +499,7 @@ impl HTMLMediaElement {
|
|||
|
||||
fn queue_dedicated_media_source_failure_steps(&self) {
|
||||
let _ = window_from_node(self).dom_manipulation_task_source().queue(
|
||||
DOMManipulationTask::Runnable(box DedicatedMediaSourceFailureTask::new(self)));
|
||||
DOMManipulationTask(box DedicatedMediaSourceFailureTask::new(self)));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dedicated-media-source-failure-steps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue