mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
added pipelines to all task sources
changed task sources to accept pipeline ids
This commit is contained in:
parent
2ffbe53989
commit
52b63def44
20 changed files with 194 additions and 230 deletions
|
@ -7,6 +7,7 @@ use dom::bindings::refcounted::Trusted;
|
|||
use dom::event::{EventBubbles, EventCancelable, EventTask};
|
||||
use dom::eventtarget::EventTarget;
|
||||
use dom::window::Window;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
|
||||
use script_thread::MainThreadScriptMsg;
|
||||
use servo_atoms::Atom;
|
||||
|
@ -17,7 +18,7 @@ use task::{TaskCanceller, TaskOnce};
|
|||
use task_source::TaskSource;
|
||||
|
||||
#[derive(Clone, JSTraceable)]
|
||||
pub struct UserInteractionTaskSource(pub Sender<MainThreadScriptMsg>);
|
||||
pub struct UserInteractionTaskSource(pub Sender<MainThreadScriptMsg>, pub PipelineId);
|
||||
|
||||
impl fmt::Debug for UserInteractionTaskSource {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
@ -37,7 +38,7 @@ impl TaskSource for UserInteractionTaskSource {
|
|||
let msg = MainThreadScriptMsg::Common(CommonScriptMsg::Task(
|
||||
ScriptThreadEventCategory::InputEvent,
|
||||
Box::new(canceller.wrap_task(task)),
|
||||
None
|
||||
Some(self.1)
|
||||
));
|
||||
self.0.send(msg).map_err(|_| ())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue