aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-05-12 09:00:14 -0700
committerbors-servo <lbergstrom+bors@mozilla.com>2016-05-12 09:00:14 -0700
commit42141870e764d0763bfbbdbed70b74399ee342de (patch)
treede8afbc81bf98ef03485d70faf3b0ae3db84bc9f /components/script/script_thread.rs
parent9189b9ee63df682a2fc2a57677a8197a69123696 (diff)
parentf60de52aae628a114935ec5e7272596fd798fa1a (diff)
downloadservo-42141870e764d0763bfbbdbed70b74399ee342de.tar.gz
servo-42141870e764d0763bfbbdbed70b74399ee342de.zip
Auto merge of #10714 - KiChjang:user-interaction-task, r=Ms2ger
Implement user interaction task source Part of #7959. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10714) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 9bd7ce26c4f..02f8d9a83ea 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -99,7 +99,7 @@ use task_source::dom_manipulation::{DOMManipulationTaskSource, DOMManipulationTa
use task_source::file_reading::FileReadingTaskSource;
use task_source::history_traversal::HistoryTraversalTaskSource;
use task_source::networking::NetworkingTaskSource;
-use task_source::user_interaction::UserInteractionTaskSource;
+use task_source::user_interaction::{UserInteractionTaskSource, UserInteractionTask};
use time::Tm;
use url::{Url, Position};
use util::opts;
@@ -222,6 +222,8 @@ pub enum MainThreadScriptMsg {
Navigate(PipelineId, LoadData),
/// Tasks that originate from the DOM manipulation task source
DOMManipulation(DOMManipulationTask),
+ /// Tasks that originate from the user interaction task source
+ UserInteraction(UserInteractionTask),
}
impl OpaqueSender<CommonScriptMsg> for Box<ScriptChan + Send> {
@@ -928,8 +930,10 @@ impl ScriptThread {
LiveDOMReferences::cleanup(addr),
MainThreadScriptMsg::Common(CommonScriptMsg::CollectReports(reports_chan)) =>
self.collect_reports(reports_chan),
- MainThreadScriptMsg::DOMManipulation(msg) =>
- msg.handle_msg(self),
+ MainThreadScriptMsg::DOMManipulation(task) =>
+ task.handle_task(self),
+ MainThreadScriptMsg::UserInteraction(task) =>
+ task.handle_task(),
}
}