mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Bring referrer policy delivery to <a> and <link> via rel attribute
This commit is contained in:
parent
53938c439f
commit
55a2270e16
1751 changed files with 36312 additions and 1088 deletions
|
@ -51,7 +51,7 @@ use js::jsval::UndefinedValue;
|
|||
use js::rust::CompileOptionsWrapper;
|
||||
use js::rust::Runtime;
|
||||
use libc;
|
||||
use msg::constellation_msg::{FrameType, LoadData, PipelineId, WindowSizeType};
|
||||
use msg::constellation_msg::{FrameType, LoadData, PipelineId, ReferrerPolicy, WindowSizeType};
|
||||
use net_traits::ResourceThreads;
|
||||
use net_traits::bluetooth_thread::BluetoothMethodMsg;
|
||||
use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheThread};
|
||||
|
@ -1410,11 +1410,13 @@ impl Window {
|
|||
}
|
||||
|
||||
/// Commence a new URL load which will either replace this window or scroll to a fragment.
|
||||
pub fn load_url(&self, url: Url, replace: bool) {
|
||||
pub fn load_url(&self, url: Url, replace: bool, referrer_policy: Option<ReferrerPolicy>) {
|
||||
let doc = self.Document();
|
||||
let referrer_policy = referrer_policy.or(doc.get_referrer_policy());
|
||||
|
||||
self.main_thread_script_chan().send(
|
||||
MainThreadScriptMsg::Navigate(self.id,
|
||||
LoadData::new(url, doc.get_referrer_policy(), Some(doc.url().clone())),
|
||||
LoadData::new(url, referrer_policy, Some(doc.url().clone())),
|
||||
replace)).unwrap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue