aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/script_task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/script_task.rs')
-rw-r--r--src/components/script/script_task.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs
index bd52d3f8e20..9e2b6a7984b 100644
--- a/src/components/script/script_task.rs
+++ b/src/components/script/script_task.rs
@@ -560,6 +560,8 @@ impl ScriptTask {
/// The entry point to document loading. Defines bindings, sets up the window and document
/// objects, parses HTML and CSS, and kicks off initial layout.
fn load(&mut self, pipeline_id: PipelineId, url: Url) {
+ debug!("ScriptTask: loading %?", url);
+
let page = self.page_tree.find(pipeline_id).expect("ScriptTask: received a load
message for a layout channel that is not associated with this script task. This
is a bug.").page;
@@ -569,8 +571,8 @@ impl ScriptTask {
if *last_loaded_url == url {
if needs_reflow {
page.reflow_all(ReflowForDisplay, self.chan.clone(), self.compositor);
- page.url = Some((last_loaded_url.clone(), false));
}
+ page.url = Some((last_loaded_url.clone(), false));
return;
}
}
@@ -758,10 +760,11 @@ impl ScriptTask {
// if the node's element is "a," load url from href attr
let href = element.get_attr("href");
for href.iter().advance |href| {
- debug!("clicked on link to %s", *href);
+ debug!("ScriptTask: clicked on link to %s", *href);
let current_url = do page.url.map |&(ref url, _)| {
url.clone()
};
+ debug!("ScriptTask: current url is %?", current_url);
let url = make_url(href.to_owned(), current_url);
self.constellation_chan.send(LoadUrlMsg(page.id, url, from_value(page.window_size.get())));
}