Add event runnables

Make tasks a wrapper over runnables
This commit is contained in:
Connor Brewster 2016-07-11 22:21:45 -06:00
parent 9b01a4cc97
commit afc0ccb48d
9 changed files with 79 additions and 61 deletions

View file

@ -982,7 +982,7 @@ impl ScriptThread {
MainThreadScriptMsg::DOMManipulation(task) =>
task.handle_task(self),
MainThreadScriptMsg::UserInteraction(task) =>
task.handle_task(),
task.handle_task(self),
}
}
@ -1221,7 +1221,7 @@ impl ScriptThread {
// https://html.spec.whatwg.org/multipage/#the-end step 7
let handler = box DocumentProgressHandler::new(Trusted::new(doc));
self.dom_manipulation_task_source.queue(DOMManipulationTask::Runnable(handler)).unwrap();
self.dom_manipulation_task_source.queue(DOMManipulationTask(handler)).unwrap();
self.constellation_chan.send(ConstellationMsg::LoadComplete(pipeline)).unwrap();
}