Skip to content

Commit 6b6ec06

Browse files
committed
Bypass blob URL partitioning for top-level self fetches
Implements the fetch spec sid of bypassing partitioning when a top-level blob URL document attempts to fetch itself. For more info see: w3c/FileAPI#210
1 parent 0e72db8 commit 6b6ec06

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

fetch.bs

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5363,14 +5363,41 @@ returning a response directly, or allowing the request to proceed by returning n
53635363
<li><p>Let <var>isTopLevelNavigation</var> be true if <var>request</var>'s
53645364
<a for=request>destination</a> is "<code>document</code>"; otherwise, false.
53655365

5366-
<li><p>If <var>isTopLevelNavigation</var> is false and <var>requestEnvironment</var> is null,
5367-
then return a <a>network error</a>.
5366+
<li><p>Let <var>isTopLevelSelfFetch</var> be false.
5367+
5368+
<li><p>If <var>request</var>'s <a for=request>client</a> is non-null:
5369+
<ol>
5370+
<li><p>Let <var>global</var> be <var>request</var>'s <a for=request>client</a>'s
5371+
<a for="environment settings object">global object</a>.
5372+
5373+
<li>
5374+
<p>If all of the following conditions are true:
5375+
5376+
<ul class=brief>
5377+
<li><p><var>global</var> is a {{Window}} object;
5378+
5379+
<li><p><var>global</var>'s <a for=Window>navigable</a> is not null;
53685380

5369-
<li><p>Let <var>navigationOrEnvironment</var> be the string "<code>navigation</code>" if
5370-
<var>isTopLevelNavigation</var> is true; otherwise, <var>requestEnvironment</var>.
5381+
<li><p><var>global</var>'s <a for=Window>navigable</a>'s <a for=navigable>parent</a>
5382+
is null; and
5383+
5384+
<li><p><var>requestEnvironment</var>'s <a for="environment">creation URL</a>
5385+
<a for=url>equals</a> <var>request</var>'s <a for=request>current URL</a>,
5386+
</ul>
5387+
5388+
<p>then set <var>isTopLevelSelfFetch</var> to false.
5389+
5390+
<li><p>Let <var>stringOrEnvironment</var> be <var>requestEnvironment</var>.
5391+
5392+
<li><p>If <var>isTopLevelNavigation</var> is true, then set <var>stringOrEnvironment</var>
5393+
to the string "<code>navigation</code>".
5394+
5395+
<li><p>Otherwise, if <var>isTopLevelSelfFetch</var> is true, then set
5396+
<var>stringOrEnvironment</var> to the string "<code>top-level-self-fetch</code>".
5397+
</ol>
53715398

53725399
<li><p>Let <var>blob</var> be the result of <a>obtaining a blob object</a> given
5373-
<var>blobURLEntry</var> and <var>navigationOrEnvironment</var>.
5400+
<var>blobURLEntry</var> and <var>stringOrEnvironment</var>.
53745401

53755402
<li><p>If <var>blob</var> is not a {{Blob}} object, then return a <a>network error</a>.
53765403

0 commit comments

Comments
 (0)