Skip to content

Commit

Permalink
REFERRER: 'API referrer source' can be a URL.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewest committed Jul 25, 2014
1 parent 08b67df commit 68317e6
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 22 deletions.
34 changes: 23 additions & 11 deletions specs/referrer-policy/index.html
Expand Up @@ -768,22 +768,34 @@ <h3 class="heading settled heading" data-level=6.2 id=determine-requests-referre

<ol>
<li>
Let <var>document</var> be the <a data-link-type=dfn href=#api-referrer-source title="API referrer source">API referrer source</a>
Let <var>source</var> be the <a data-link-type=dfn href=#api-referrer-source title="API referrer source">API referrer source</a>
specified by the <a data-link-type=dfn href=#entry-settings-object title="entry settings object">entry settings object</a>.
</li>
<li>
If <var>source</var> is a URL, let <var>referrerSource</var>
be <var>source</var>, otherwise let <var>document</var> be
<var>source</var>.
</li>
</ol>
</li>
<li>
If <var>document</var>’s <a data-link-type=dfn href=#origin title=origin>origin</a> is not a scheme/host/port
tuple (because, for example, it has been sandboxed into a unique
origin), let <var>referrerSource</var> be <code>null</code>.
Otherwise, let <var>referrerSource</var> be <var>document</var>’s
URL.
</li>
<li>
While <var>document</var> corresponds to <a data-link-type=dfn href=http://www.w3.org/html/wg/drafts/html/CR/embedded-content-0.html#an-iframe-srcdoc-document title="an iframe srcdoc Document">an iframe srcdoc Document</a>,
let <var>document</var> be that Document’s <a data-link-type=dfn href=http://www.w3.org/html/wg/drafts/html/CR/browsers.html#browsing-context title="browsing context">browsing context</a>’s
<a data-link-type=dfn href=http://www.w3.org/html/wg/drafts/html/CR/browsers.html#browsing-context-container title="browsing context container">browsing context container</a>’s <code><a data-link-type=idl href=http://www.w3.org/html/wg/drafts/html/CR/infrastructure.html#dom-document title=Document>Document</a></code>.
If <var>document</var> is set, execute the following steps:

<ol>
<li>
If <var>document</var>’s <a data-link-type=dfn href=#origin title=origin>origin</a> is not a scheme/host/port
tuple (because, for example, it has been sandboxed into a unique
origin), return <code>none</code> and abort these steps.
</li>
<li>
While <var>document</var> corresponds to <a data-link-type=dfn href=http://www.w3.org/html/wg/drafts/html/CR/embedded-content-0.html#an-iframe-srcdoc-document title="an iframe srcdoc Document">an iframe srcdoc Document</a>,
let <var>document</var> be that Document’s <a data-link-type=dfn href=http://www.w3.org/html/wg/drafts/html/CR/browsers.html#browsing-context title="browsing context">browsing context</a>’s
<a data-link-type=dfn href=http://www.w3.org/html/wg/drafts/html/CR/browsers.html#browsing-context-container title="browsing context container">browsing context container</a>’s <code><a data-link-type=idl href=http://www.w3.org/html/wg/drafts/html/CR/infrastructure.html#dom-document title=Document>Document</a></code>.
</li>
<li>
Let <var>referrerSource</var> be <var>document</var>’s URL.
</li>
</ol>
</li>
</ol>
</li>
Expand Down
34 changes: 23 additions & 11 deletions specs/referrer-policy/index.src.html
Expand Up @@ -617,22 +617,34 @@ <h3 id="determine-requests-referrer">

<ol>
<li>
Let <var>document</var> be the <a>API referrer source</a>
Let <var>source</var> be the <a>API referrer source</a>
specified by the <a>entry settings object</a>.
</li>
<li>
If <var>source</var> is a URL, let <var>referrerSource</var>
be <var>source</var>, otherwise let <var>document</var> be
<var>source</var>.
</li>
</ol>
</li>
<li>
If <var>document</var>'s <a>origin</a> is not a scheme/host/port
tuple (because, for example, it has been sandboxed into a unique
origin), let <var>referrerSource</var> be <code>null</code>.
Otherwise, let <var>referrerSource</var> be <var>document</var>'s
URL.
</li>
<li>
While <var>document</var> corresponds to <a>an iframe srcdoc Document</a>,
let <var>document</var> be that Document's <a>browsing context</a>'s
<a>browsing context container</a>'s {{Document}}.
If <var>document</var> is set, execute the following steps:

<ol>
<li>
If <var>document</var>'s <a>origin</a> is not a scheme/host/port
tuple (because, for example, it has been sandboxed into a unique
origin), return <code>none</code> and abort these steps.
</li>
<li>
While <var>document</var> corresponds to <a>an iframe srcdoc Document</a>,
let <var>document</var> be that Document's <a>browsing context</a>'s
<a>browsing context container</a>'s {{Document}}.
</li>
<li>
Let <var>referrerSource</var> be <var>document</var>'s URL.
</li>
</ol>
</li>
</ol>
</li>
Expand Down

0 comments on commit 68317e6

Please sign in to comment.