Skip to content

Commit 595ed56

Browse files
authored
scope algorithm: Delete same-origin-as-document check. (#696)
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.
1 parent ee7385c commit 595ed56

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

index.html

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,8 +1446,8 @@ <h3>
14461446
</li>
14471447
<li>Set <var>manifest</var>["<a>scope</a>"] to the result of running
14481448
<a>processing the <code>scope</code> member</a> given
1449-
<var>manifest</var>["<a>scope</a>"], <var>manifest URL</var>,
1450-
<var>document URL</var>, and <var>manifest</var>["<a>start_url</a>"].
1449+
<var>manifest</var>["<a>scope</a>"], <var>manifest URL</var>, and
1450+
<var>manifest</var>["<a>start_url</a>"].
14511451
</li>
14521452
<li>Set <var>manifest</var>["<a>theme_color</a>"] to the result of
14531453
running <a>processing the <code>theme_color</code> member</a> given
@@ -1753,8 +1753,8 @@ <h3>
17531753
The steps for <dfn>processing the <code>scope</code> member</dfn> is
17541754
given by the following algorithm. The algorithm takes a
17551755
<a>USVString</a> <var>value</var>, a <a>URL</a> <var>manifest
1756-
URL</var>, a <a>URL</a> <var>document URL</var>, and a URL <var>start
1757-
URL</var>. This algorithm returns a <a>URL</a>.
1756+
URL</var>, and a URL <var>start URL</var>. This algorithm returns a
1757+
<a>URL</a>.
17581758
</p>
17591759
<ol>
17601760
<li>Let <var>default</var> be the result of <a>parsing</a> ".", using
@@ -1776,21 +1776,6 @@ <h3>
17761776
</li>
17771777
</ul>
17781778
</li>
1779-
<li>If <var>scope URL</var> is not <a href=
1780-
"https://www.whatwg.org/specs/web-apps/current-work/#same-origin">same
1781-
origin</a> as <var>document URL</var>:
1782-
<ol>
1783-
<li>
1784-
<a>Issue a developer warning</a> that the <code>scope</code>
1785-
needs to be <a href=
1786-
"https://www.whatwg.org/specs/web-apps/current-work/#same-origin">
1787-
same-origin</a> as <code>Document</code> of the <a>application
1788-
context</a>.
1789-
</li>
1790-
<li>Return <var>default</var>.
1791-
</li>
1792-
</ol>
1793-
</li>
17941779
<li>If <var>start URL</var> is not <a>within scope</a> of scope URL:
17951780
<ol>
17961781
<li>

0 commit comments

Comments
 (0)