mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Auto merge of #23090 - miller-time:nav-fetch-referrer, r=gterzian
Add referrer to navigation fetch request <!-- Please describe your changes on the following line: --> Implement step 13 of [following hyperlinks](https://html.spec.whatwg.org/#following-hyperlinks-2) and step 14.3 of [window open](https://html.spec.whatwg.org/#window-open-steps), as well as other referrer- and fetch-related updates. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22890 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23090) <!-- Reviewable:end -->
This commit is contained in:
commit
b73956cc37
22 changed files with 136 additions and 88 deletions
|
@ -39,6 +39,7 @@ use msg::constellation_msg::{BrowsingContextId, HistoryStateId, PipelineId};
|
|||
use msg::constellation_msg::{PipelineNamespaceId, TopLevelBrowsingContextId, TraversalDirection};
|
||||
use net_traits::image::base::Image;
|
||||
use net_traits::image_cache::ImageCache;
|
||||
use net_traits::request::Referrer;
|
||||
use net_traits::storage_thread::StorageType;
|
||||
use net_traits::{FetchResponseMsg, ReferrerPolicy, ResourceThreads};
|
||||
use pixels::PixelFormat;
|
||||
|
@ -140,10 +141,10 @@ pub struct LoadData {
|
|||
pub data: Option<Vec<u8>>,
|
||||
/// The result of evaluating a javascript scheme url.
|
||||
pub js_eval_result: Option<JsEvalResult>,
|
||||
/// The referrer.
|
||||
pub referrer: Option<Referrer>,
|
||||
/// The referrer policy.
|
||||
pub referrer_policy: Option<ReferrerPolicy>,
|
||||
/// The referrer URL.
|
||||
pub referrer_url: Option<ServoUrl>,
|
||||
}
|
||||
|
||||
/// The result of evaluating a javascript scheme url.
|
||||
|
@ -161,8 +162,8 @@ impl LoadData {
|
|||
pub fn new(
|
||||
url: ServoUrl,
|
||||
creator_pipeline_id: Option<PipelineId>,
|
||||
referrer: Option<Referrer>,
|
||||
referrer_policy: Option<ReferrerPolicy>,
|
||||
referrer_url: Option<ServoUrl>,
|
||||
) -> LoadData {
|
||||
LoadData {
|
||||
url: url,
|
||||
|
@ -171,8 +172,8 @@ impl LoadData {
|
|||
headers: HeaderMap::new(),
|
||||
data: None,
|
||||
js_eval_result: None,
|
||||
referrer: referrer,
|
||||
referrer_policy: referrer_policy,
|
||||
referrer_url: referrer_url,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue