aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-11-13 17:45:29 -0700
committerbors-servo <metajack+bors@gmail.com>2014-11-13 17:45:29 -0700
commit10cd7728ff0daa7d2e5e13d002d008b5049f389b (patch)
tree11199806a3dfa73c26089e6d12c558c644fe0aa9 /components/script/script_task.rs
parent99fc4ab634738136daa993443042a4cbf68c510c (diff)
parentcdddf6465cdcf325ea01a7bd616af3e21d0d58fb (diff)
downloadservo-10cd7728ff0daa7d2e5e13d002d008b5049f389b.tar.gz
servo-10cd7728ff0daa7d2e5e13d002d008b5049f389b.zip
auto merge of #3973 : Manishearth/servo/301-fix, r=jdm
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index 087e3fdf043..c407795bd63 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -751,7 +751,7 @@ 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(&self, pipeline_id: PipelineId, load_data: LoadData) {
- let url = load_data.url.clone();
+ let mut url = load_data.url.clone();
debug!("ScriptTask: loading {} on page {}", url, pipeline_id);
let page = self.page.borrow_mut();
@@ -818,6 +818,7 @@ impl ScriptTask {
}
parse_html(&*page, *document, parser_input, self.resource_task.clone(), Some(load_data));
+ url = page.get_url().clone();
document.set_ready_state(DocumentReadyStateValues::Interactive);
@@ -853,10 +854,10 @@ impl ScriptTask {
let wintarget: JSRef<EventTarget> = EventTargetCast::from_ref(*window);
let _ = wintarget.dispatch_event_with_target(Some(doctarget), *event);
- *page.fragment_name.borrow_mut() = url.fragment.clone();
+ *page.fragment_name.borrow_mut() = url.fragment;
let ConstellationChan(ref chan) = self.constellation_chan;
- chan.send(LoadCompleteMsg(page.id, url));
+ chan.send(LoadCompleteMsg);
}
fn scroll_fragment_point(&self, pipeline_id: PipelineId, node: JSRef<Element>) {