set referrer in window.load_url

- this conforms to follow-hyperlinks spec step 13
- this conforms to window-open spec step 14.3
- replace uses of `referrer_url` with `referrer`
- in Request class, change "no-referrer" to ""
- set websocket fetch referrer to "no-referrer"
This commit is contained in:
Russell Cousineau 2019-03-24 23:04:17 -07:00
parent f9c58ccd40
commit 2440e0f98a
21 changed files with 94 additions and 58 deletions

View file

@ -55,6 +55,7 @@ use html5ever::{LocalName, Prefix};
use hyper::Method;
use mime::{self, Mime};
use net_traits::http_percent_encode;
use net_traits::request::Referrer;
use script_traits::LoadData;
use servo_rand::random;
use std::borrow::ToOwned;
@ -400,8 +401,8 @@ impl HTMLFormElement {
let mut load_data = LoadData::new(
action_components,
None,
Some(Referrer::ReferrerUrl(target_document.url())),
target_document.get_referrer_policy(),
Some(target_document.url()),
);
// Step 22