diff --git a/prefetch.bs b/prefetch.bs
index 4d6f5a4..7db75d3 100644
--- a/prefetch.bs
+++ b/prefetch.bs
@@ -230,11 +230,10 @@ The user agent may [=prefetch record/cancel and discard=] records from the [=Doc
- To
find a matching prefetch record given a {{Document}} |document|, [=URL=] |url|, and [=sandboxing flag set=] |sandboxFlags|, perform the following steps.
+ To
find a matching prefetch record given a [=source snapshot params=] |sourceSnapshotParams|, [=URL=] |url|, and [=sandboxing flag set=] |sandboxFlags|, perform the following steps.
- 1. [=Assert=]: |document| is [=Document/fully active=].
- 1. Let |currentTime| be the [=current high resolution time=] for the [=relevant global object=] of |document|.
- 1. [=list/For each=] |record| of |document|'s [=Document/prefetch records=]:
+ 1. Let |currentTime| be the [=current high resolution time=] for |sourceSnapshotParams|'s [=source snapshot params/fetch client=]'s [=environment settings object/global object=].
+ 1. [=list/For each=] |record| of |sourceSnapshotParams|'s [=source snapshot params/prefetch records=]:
1. If |record|'s [=prefetch record/URL=] is not equal to |url|, then [=iteration/continue=].
1. If |record|'s [=prefetch record/state=] is not "`completed`", then [=iteration/continue=].
1. If |record|'s [=prefetch record/sandboxing flag set=] is empty and |sandboxFlags| is not empty, then [=iteration/continue=].
@@ -242,7 +241,7 @@ The user agent may [=prefetch record/cancel and discard=] records from the [=Doc
Strictly speaking, it would still be possible for this to be valid if sandbox flags have been added to the container since prefetch but those flags would not cause an error due to cross origin opener policy. This is expected to be rare and so isn't handled.
- 1. [=list/Remove=] |record| from |document|'s [=Document/prefetch records=].
+ 1. [=list/Remove=] |record| from |sourceSnapshotParams|'s [=source snapshot params/prefetch records=].
1. If |record|'s [=prefetch record/expiry time=] is less than |currentTime|, return null.
1. If |record|'s [=prefetch record/redirect chain=] [=redirect chain/has updated credentials=], return null.
1. Return |record|.
@@ -411,6 +410,14 @@ Update all creation sites to supply an empty string, except for any in this docu
+Add an additional item to [=source snapshot params=] as follows:
+:
prefetch records
+:: a a [=list=] of [=prefetch records=].
+
+When to [=snapshot source snapshot params=], set [=source snapshot params/prefetch records=] to
sourceDocument's [=Document/prefetch records=].
+
+
+
In
attempt to populate the history entry's document, replace the step which invokes
create navigation params by fetching with the following:
@@ -422,7 +429,7 @@ Update all creation sites to supply an empty string, except for any in this docu
1. Let |request| be the result of [=creating a navigation request=] given
entry,
sourceSnapshotParams's [=source snapshot params/fetch client=],
navigable's [=navigable/container=], and
sourceSnapshotParams's [=source snapshot params/has transient activation=].
1. Set |request|'s [=request/replaces client id=] to
navigable's [=navigable/active document=]'s [=relevant settings object=]'s [=environment/id=].
- 1. Let |prefetchRecord| be the result of [=finding a matching prefetch record=] given
navigable's [=navigable/active document=],
entry's [=session history entry/URL=], and
targetSnapshotParams's [=target snapshot params/sandboxing flags=].
+ 1. Let |prefetchRecord| be the result of [=finding a matching prefetch record=] given
sourceSnapshotParams,
entry's [=session history entry/URL=], and
targetSnapshotParams's [=target snapshot params/sandboxing flags=].
1. If
documentResource is null and |prefetchRecord| is not null:
1. Set
navigationParams to the result of [=creating navigation params from a prefetch record=] given
navigable,
entry's [=session history entry/document state=],
navigationId,
navTimingType,
request, |prefetchRecord|,
targetSnapshotParams, and
sourceSnapshotParams.
1. [=Copy prefetch cookies=] given |prefetchRecord|'s [=prefetch record/isolated partition key=] and
navigationParams's [=navigation params/reserved environment=].