Skip to content

Commit

Permalink
scope algorithm: Delete same-origin-as-document check. (#696)
Browse files Browse the repository at this point in the history
This was redundant, because a) the start_url is already checked to be
same-origin-as-document, and b) the start_url is checked to be within
scope of scope (which implies they are same-origin). Thus the scope is
guaranteed to be same-origin as the document without this explicit
check.

This removes the document URL parameter to the scope algorithm.

No normative changes.

Work towards fixing #668.
  • Loading branch information
mgiuca authored Jun 15, 2018
1 parent ee7385c commit 595ed56
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1446,8 +1446,8 @@ <h3>
</li>
<li>Set <var>manifest</var>["<a>scope</a>"] to the result of running
<a>processing the <code>scope</code> member</a> given
<var>manifest</var>["<a>scope</a>"], <var>manifest URL</var>,
<var>document URL</var>, and <var>manifest</var>["<a>start_url</a>"].
<var>manifest</var>["<a>scope</a>"], <var>manifest URL</var>, and
<var>manifest</var>["<a>start_url</a>"].
</li>
<li>Set <var>manifest</var>["<a>theme_color</a>"] to the result of
running <a>processing the <code>theme_color</code> member</a> given
Expand Down Expand Up @@ -1753,8 +1753,8 @@ <h3>
The steps for <dfn>processing the <code>scope</code> member</dfn> is
given by the following algorithm. The algorithm takes a
<a>USVString</a> <var>value</var>, a <a>URL</a> <var>manifest
URL</var>, a <a>URL</a> <var>document URL</var>, and a URL <var>start
URL</var>. This algorithm returns a <a>URL</a>.
URL</var>, and a URL <var>start URL</var>. This algorithm returns a
<a>URL</a>.
</p>
<ol>
<li>Let <var>default</var> be the result of <a>parsing</a> ".", using
Expand All @@ -1776,21 +1776,6 @@ <h3>
</li>
</ul>
</li>
<li>If <var>scope URL</var> is not <a href=
"https://www.whatwg.org/specs/web-apps/current-work/#same-origin">same
origin</a> as <var>document URL</var>:
<ol>
<li>
<a>Issue a developer warning</a> that the <code>scope</code>
needs to be <a href=
"https://www.whatwg.org/specs/web-apps/current-work/#same-origin">
same-origin</a> as <code>Document</code> of the <a>application
context</a>.
</li>
<li>Return <var>default</var>.
</li>
</ol>
</li>
<li>If <var>start URL</var> is not <a>within scope</a> of scope URL:
<ol>
<li>
Expand Down

0 comments on commit 595ed56

Please sign in to comment.