aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/script_task.rs
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2014-05-20 12:16:35 -0400
committerbors-servo <release+servo@mozilla.com>2014-05-20 12:16:35 -0400
commit28e3c1734048217cd2194ea37c887911ad03e894 (patch)
tree8a3c5cc1a7dbb4ef751a9e96487dfdf7e9db3309 /src/components/script/script_task.rs
parentca9396ff9c7ebeea48d881b421854168b9afb825 (diff)
parent533fab46f95ec64da3385851e0a09cae15211e90 (diff)
downloadservo-28e3c1734048217cd2194ea37c887911ad03e894.tar.gz
servo-28e3c1734048217cd2194ea37c887911ad03e894.zip
auto merge of #2442 : Manishearth/servo/xhr-async, r=jdm
(Note that only `getAllResponseHeaders()` is supported at the moment, I'll be adding the other header methods later.)
Diffstat (limited to 'src/components/script/script_task.rs')
-rw-r--r--src/components/script/script_task.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs
index 0ce993d5e19..9c50b2f5b5d 100644
--- a/src/components/script/script_task.rs
+++ b/src/components/script/script_task.rs
@@ -22,6 +22,7 @@ use dom::eventtarget::{EventTarget, EventTargetHelpers};
use dom::node;
use dom::node::{Node, NodeHelpers};
use dom::window::{TimerId, Window, WindowHelpers};
+use dom::xmlhttprequest::{TrustedXHRAddress, XMLHttpRequest, XHRProgress};
use html::hubbub_html_parser::HtmlParserResult;
use html::hubbub_html_parser::{HtmlDiscoveredStyle, HtmlDiscoveredScript};
use html::hubbub_html_parser;
@@ -89,6 +90,8 @@ pub enum ScriptMsg {
ExitPipelineMsg(PipelineId),
/// Notifies the script that a window associated with a particular pipeline should be closed.
ExitWindowMsg(PipelineId),
+ /// Notifies the script of progress on a fetch
+ XHRProgressMsg(TrustedXHRAddress, XHRProgress)
}
pub struct NewLayoutInfo {
@@ -780,6 +783,7 @@ impl ScriptTask {
ExitPipelineMsg(id) => if self.handle_exit_pipeline_msg(id) { return false },
ExitWindowMsg(id) => self.handle_exit_window_msg(id),
ResizeMsg(..) => fail!("should have handled ResizeMsg already"),
+ XHRProgressMsg(addr, progress) => XMLHttpRequest::handle_xhr_progress(addr, progress),
}
}