mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Implement Document.referrer
This commit is contained in:
parent
9e010a8aec
commit
d6c1f7b5e3
17 changed files with 55 additions and 32 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue