Skip to content

Commit

Permalink
Pass eagerness from rules to candidates in the document rules cases
Browse files Browse the repository at this point in the history
Fixes #311
  • Loading branch information
kjmcnee authored Apr 22, 2024
1 parent 29cfa18 commit c98dad9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions speculation-rules.bs
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ A <dfn>prerender candidate</dfn> is a [=struct=] with the following [=struct/ite
1. &#x231B; [=list/For each=] |link| of |links|:
1. &#x231B; Let |url| be |link|'s [=HTMLHyperlinkElementUtils/url=].
1. &#x231B; Let |referrerPolicy| be the result of [=computing a speculative action referrer policy=] given |rule| and |link|.
1. &#x231B; [=list/Append=] a [=prefetch candidate=] with [=prefetch candidate/URL=] |url|, [=prefetch candidate/anonymization policy=] |anonymizationPolicy|, [=prefetch candidate/referrer policy=] |referrerPolicy|, and [=prefetch candidate/No-Vary-Search hint=] |rule|'s [=speculation rule/No-Vary-Search hint=] to |prefetchCandidates|.
1. &#x231B; [=list/Append=] a [=prefetch candidate=] with [=prefetch candidate/URL=] |url|, [=prefetch candidate/anonymization policy=] |anonymizationPolicy|, [=prefetch candidate/referrer policy=] |referrerPolicy|, [=prefetch candidate/eagerness=] |rule|'s [=speculation rule/eagerness=], and [=prefetch candidate/No-Vary-Search hint=] |rule|'s [=speculation rule/No-Vary-Search hint=] to |prefetchCandidates|.
1. &#x231B; [=list/For each=] |rule| of |ruleSet|'s [=speculation rule set/prerender rules=]:
1. &#x231B; [=list/For each=] |url| of |rule|'s [=speculation rule/URLs=]:
1. &#x231B; Let |referrerPolicy| be the result of [=computing a speculative action referrer policy=] given |rule| and null.
Expand All @@ -591,7 +591,7 @@ A <dfn>prerender candidate</dfn> is a [=struct=] with the following [=struct/ite
1. &#x231B; Let |target| be |rule|'s [=speculation rule/target navigable name hint=].
1. &#x231B; If |target| is null, set it to the result of [=getting an element's target=] given |link|.
1. &#x231B; Let |referrerPolicy| be the result of [=computing a speculative action referrer policy=] given |rule| and |link|.
1. &#x231B; Let |prerenderCandidate| be a new [=prerender candidate=] whose [=prerender candidate/URL=] is |url|, [=prerender candidate/target navigable name hint=] is |target|, and [=prerender candidate/referrer policy=] is |referrerPolicy|.
1. &#x231B; Let |prerenderCandidate| be a new [=prerender candidate=] whose [=prerender candidate/URL=] is |url|, [=prerender candidate/target navigable name hint=] is |target|, [=prerender candidate/referrer policy=] is |referrerPolicy|, and [=prerender candidate/eagerness=] is |rule|'s [=speculation rule/eagerness=].
1. &#x231B; [=list/Append=] |prerenderCandidate| to |prerenderCandidates|.
1. &#x231B; [=list/For each=] |prefetchRecord| of |document|'s [=Document/prefetch records=]:
1. &#x231B; If |prefetchRecord|'s [=prefetch record/label=] is not "`speculation-rules`", then [=iteration/continue=].
Expand Down

0 comments on commit c98dad9

Please sign in to comment.