aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorNazım Can Altınova <canaltinova@gmail.com>2016-07-12 23:29:22 +0300
committerNazım Can Altınova <canaltinova@gmail.com>2016-07-14 21:35:39 +0300
commitd6c1f7b5e3909d9b11544dae4b4c7d0793fef5f7 (patch)
treebc74b622691848fc5754a97eb6d1ae4819d9aff9 /components/script/script_thread.rs
parent9e010a8aec7f99fd15bf6334f84c39a3229d115f (diff)
downloadservo-d6c1f7b5e3909d9b11544dae4b4c7d0793fef5f7.tar.gz
servo-d6c1f7b5e3909d9b11544dae4b4c7d0793fef5f7.zip
Implement Document.referrer
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index e116ace1be4..c99a9985c78 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -1704,6 +1704,11 @@ impl ScriptThread {
_ => IsHTMLDocument::HTMLDocument,
};
+ let referrer = match metadata.referrer {
+ Some(ref referrer) => Some(referrer.clone().into_string()),
+ None => None,
+ };
+
let document = Document::new(window.r(),
Some(&browsing_context),
Some(final_url.clone()),
@@ -1711,7 +1716,8 @@ impl ScriptThread {
content_type,
last_modified,
DocumentSource::FromParser,
- loader);
+ loader,
+ referrer);
if using_new_context {
browsing_context.init(&document);
} else {