aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/task_source/dom_manipulation.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-09-16 02:09:26 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-09-16 15:43:26 +0200
commit56117d31856be46d7df417e659a4406305b4e258 (patch)
treec3a6b03f1bf9f3b9c8c1a2f67b0a8ac703f93d0a /components/script/task_source/dom_manipulation.rs
parent52a6f63608a25e0574fd43b69f404f79a9a6c28f (diff)
downloadservo-56117d31856be46d7df417e659a4406305b4e258.tar.gz
servo-56117d31856be46d7df417e659a4406305b4e258.zip
Rename Runnable to Task
The changes are: * `*Runnable` -> `*Task`; * `RunnableMsg` -> `Task`; * `RunnableWrapper` -> `TaskCanceller`; * `MainThreadRunnable` -> `MainThreadTask`; * `wrap_runnable` -> `wrap_task`; * `get_runnable_wrapper` -> `task_canceller`; * `handler` -> `run`; * `main_thread_handler` -> `run_with_script_thread`.
Diffstat (limited to 'components/script/task_source/dom_manipulation.rs')
-rw-r--r--components/script/task_source/dom_manipulation.rs24
1 files changed, 10 insertions, 14 deletions
diff --git a/components/script/task_source/dom_manipulation.rs b/components/script/task_source/dom_manipulation.rs
index 636b99f87bf..f7b7a6577f8 100644
--- a/components/script/task_source/dom_manipulation.rs
+++ b/components/script/task_source/dom_manipulation.rs
@@ -4,11 +4,11 @@
use dom::bindings::inheritance::Castable;
use dom::bindings::refcounted::Trusted;
-use dom::event::{EventBubbles, EventCancelable, EventRunnable, SimpleEventRunnable};
+use dom::event::{EventBubbles, EventCancelable, EventTask, SimpleEventTask};
use dom::eventtarget::EventTarget;
use dom::window::Window;
use script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
-use script_thread::{MainThreadScriptMsg, Runnable, RunnableWrapper};
+use script_thread::{MainThreadScriptMsg, Task, TaskCanceller};
use servo_atoms::Atom;
use std::fmt;
use std::result::Result;
@@ -25,17 +25,17 @@ impl fmt::Debug for DOMManipulationTaskSource {
}
impl TaskSource for DOMManipulationTaskSource {
- fn queue_with_wrapper<T>(
+ fn queue_with_canceller<T>(
&self,
msg: Box<T>,
- wrapper: &RunnableWrapper,
+ canceller: &TaskCanceller,
) -> Result<(), ()>
where
- T: Runnable + Send + 'static,
+ T: Task + Send + 'static,
{
- let msg = MainThreadScriptMsg::Common(CommonScriptMsg::RunnableMsg(
+ let msg = MainThreadScriptMsg::Common(CommonScriptMsg::Task(
ScriptThreadEventCategory::ScriptEvent,
- wrapper.wrap_runnable(msg),
+ canceller.wrap_task(msg),
));
self.0.send(msg).map_err(|_| ())
}
@@ -49,21 +49,17 @@ impl DOMManipulationTaskSource {
cancelable: EventCancelable,
window: &Window) {
let target = Trusted::new(target);
- let runnable = box EventRunnable {
+ let task = box EventTask {
target: target,
name: name,
bubbles: bubbles,
cancelable: cancelable,
};
- let _ = self.queue(runnable, window.upcast());
+ let _ = self.queue(task, window.upcast());
}
pub fn queue_simple_event(&self, target: &EventTarget, name: Atom, window: &Window) {
let target = Trusted::new(target);
- let runnable = box SimpleEventRunnable {
- target: target,
- name: name,
- };
- let _ = self.queue(runnable, window.upcast());
+ let _ = self.queue(box SimpleEventTask { target, name }, window.upcast());
}
}