Skip to content
Permalink
Browse files

Use link referrerpolicy attribute when obtaining the resource

When initiating a fetch to obtain the resource for a link element, we
should use the element's referrerpolicy attribute to set the referrer
policy on the request.

Also fixes the "referrer policy" links introduced in
b077861 to go to the right place.
  • Loading branch information...
estark37 authored and domenic committed Aug 10, 2016
1 parent b077861 commit b209fa011d8d1c315cbca973aba0ae40d335b67c
Showing with 12 additions and 4 deletions.
  1. +12 −4 source
16 source
@@ -2854,6 +2854,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn data-noexport="" data-x-href="https://fetch.spec.whatwg.org/#unsafe-request-flag">unsafe-request flag</dfn>
<li><dfn data-noexport="" data-x="concept-request-cache-mode" data-x-href="https://fetch.spec.whatwg.org/#concept-request-cache-mode">cache mode</dfn>
<li><dfn data-noexport="" data-x="concept-request-redirect-mode" data-x-href="https://fetch.spec.whatwg.org/#concept-request-redirect-mode">redirect mode</dfn>
<li><dfn data-noexport="" data-x="concept-request-referrer-policy" data-x-href="https://fetch.spec.whatwg.org/#concept-request-referrer-policy">referrer policy</dfn>
<li><dfn data-noexport="" data-x="concept-request-nonce-metadata" data-x-href="https://fetch.spec.whatwg.org/#concept-request-nonce-metadata">cryptographic nonce metadata</dfn>
<li><dfn data-noexport="" data-x="concept-request-parser-metadata" data-x-href="https://fetch.spec.whatwg.org/#concept-request-parser-metadata">parser metadata</dfn>
</ul>
@@ -12586,6 +12587,11 @@ interface <dfn>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
<code>link</code> element's <span>node document</span>'s <code>Window</code> object's
<span>environment settings object</span>.

<li><p>Set <var>request</var>'s
<span data-x="concept-request-referrer-policy">referrer policy</span> to the current state of the
<code>link</code> element's <code data-x="attr-link-referrerpolicy">referrerpolicy</code>
attribute.</p></li>

<!--FETCH--><li><p><span data-x="concept-fetch">Fetch</span> <var>request</var>.</p></li>

</ol>
@@ -25524,8 +25530,9 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {

<p>&#x231B; Set <var>request</var>'s <span>same-origin data-URL flag</span>.</p>

<p>&#x231B; Set <var>request</var>'s <span>referrer policy</span> to the current state of the
element's <code data-x="attr-img-referrerpolicy">referrerpolicy</code> attribute.</p>
<p>&#x231B; Set <var>request</var>'s
<span data-x="concept-request-referrer-policy">referrer policy</span> to the current state of
the element's <code data-x="attr-img-referrerpolicy">referrerpolicy</code> attribute.</p>

<!--FETCH--><p>&#x231B; <span data-x="concept-fetch">Fetch</span> <var>request</var>. Let this
instance of the <span data-x="concept-fetch">fetching</span> algorithm be associated with
@@ -26419,8 +26426,9 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
data-x="">imageset</code>", and set <var>request</var>'s <span>synchronous
flag</span>.</p></li>

<li><p>Set <var>request</var>'s <span>referrer policy</span> to the current state of the
element's <code data-x="attr-img-referrerpolicy">referrerpolicy</code> attribute.</p></li>
<li><p>Set <var>request</var>'s
<span data-x="concept-request-referrer-policy">referrer policy</span> to the current state of
the element's <code data-x="attr-img-referrerpolicy">referrerpolicy</code> attribute.</p></li>

<!--FETCH--><li><p>Let <var>response</var> be the result of <span
data-x="concept-fetch">fetching</span> <var>request</var>.</p></li>

0 comments on commit b209fa0

Please sign in to comment.
You can’t perform that action at this time.