diff --git a/prefetch.bs b/prefetch.bs index 98d94b7..faa560f 100644 --- a/prefetch.bs +++ b/prefetch.bs @@ -14,6 +14,9 @@ Complain About: accidental-2119 yes, missing-example-ids yes Indent: 2 Boilerplate: omit conformance +
+spec:fetch; type:dfn; text:credentials +
spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/ type: dfn diff --git a/prerendering.bs b/prerendering.bs index 93f463c..56f9919 100644 --- a/prerendering.bs +++ b/prerendering.bs @@ -16,7 +16,8 @@ Indent: 2 Boilerplate: omit conformance
-spec: infra; type: dfn; text: user agent +spec:fetch; type:dfn; text:credentials +spec:infra; type:dfn; text:user agent
spec: ecma262; urlPrefix: https://tc39.es/ecma262/ diff --git a/speculation-rules.bs b/speculation-rules.bs index 47dbb06..6bcf76c 100644 --- a/speculation-rules.bs +++ b/speculation-rules.bs @@ -16,6 +16,7 @@ Boilerplate: omit conformance
spec:csp3; type:grammar; text:base64-value +spec:fetch; type:dfn; text:credentials spec:html; type:element; text:a spec:html; type:element-attr; for:a; text:href spec:html; type:element-attr; for:a; text:referrerpolicy @@ -163,7 +164,7 @@ A document rule negation is a struct with the following [=struct/item * clause, a [=document rule predicate=] A document rule URL pattern predicate is a struct with the following [=struct/items=]: -* patterns, a [=list=] of {{URLPattern}}s +* patterns, a [=list=] of [=URL patterns=] A document rule CSS selector predicate is a struct with the following [=struct/items=]: * selectors, a [=list=] of [=selectors=] @@ -475,20 +476,7 @@ add the following step 1. If |rawPatterns| is not a [=list=], then set |rawPatterns| to « |rawPatterns| ». 1. Let |patterns| be an empty [=list=]. 1. [=list/For each=] |rawPattern| of |rawPatterns|: - 1. Let |serializedBaseURL| be the [=URL serializer|serialization=] of |baseURL|. - 1. Let |pattern| be null. - 1. If |rawPattern| is a [=string=], then: - 1. Set |pattern| to the result of constructing a {{URLPattern}} using the {{URLPattern/URLPattern(input, baseURL)}} constructor steps given |rawPattern| and |serializedBaseURL|. If those steps throw, catch the exception and return null. - 1. Otherwise, if |rawPattern| is a [=map=], then: - 1. Let |init| be «[ "`baseURL`" → |serializedBaseURL| ]», representing a dictionary of type {{URLPatternInit}}. - 1. [=map/For each=] |key| → |value| of |rawPattern|: - 1. If |key| is not the [=identifier=] of a [=dictionary member=] of {{URLPatternInit}} or one of its [=inherited dictionaries=], |value| is not a [=string=], or the member's type is not declared to be {{USVString}}, then return null. - -This will need to be updated if {{URLPattern}} gains members of other types.- 1. Set |init|[|key|] to |value|. - 1. Set |pattern| to the result of constructing a {{URLPattern}} using the {{URLPattern/URLPattern(input, baseURL)}} constructor steps given |init|. If those steps throw, catch the exception and return null. - 1. Otherwise, return null. - 1. [=Assert=]: |pattern| is a {{URLPattern}}. + 1. Let |pattern| be the result of [=building a URL pattern from an Infra value=] |rawPattern| given |baseURL|. If this step throws, catch the exception and return null. 1. [=list/Append=] |pattern| to |patterns|. 1. Return a [=document rule URL pattern predicate=] whose [=document rule URL pattern predicate/patterns=] is |patterns|. 1. If |predicateType| is "`selector_matches`": @@ -553,7 +541,7 @@ A prerender candidate is a [=struct=] with the following [=struct/ite 1. If |descendant| is not [=being rendered=] or is part of [=skipped contents=], [=iteration/continue=]. -Such links, though present in the document, aren't available for the user to interact with and are unlikely to be good candidates. In addition, they may not have their style or layout computed, which might make CSS selector matching less efficient in user agents which skip some or all of that work for these elements.+Such links, though present in the document, aren't available for the user to interact with and are unlikely to be good candidates. In addition, they might not have their style or layout computed, which might make CSS selector matching less efficient in user agents which skip some or all of that work for these elements.1. Let |url| be |descendant|'s [=HTMLHyperlinkElementUtils/url=]. 1. If |url| is null, or its [=url/scheme=] is not an [=HTTP(S) scheme=], [=iteration/continue=]. 1. If |predicate| [=document rule predicate/matches=] |descendant|, then [=list/append=] |descendant| to |links|. @@ -659,7 +647,7 @@ A prerender candidate is a [=struct=] with the following [=struct/ite 1. If |predicate| is a [=document rule URL pattern predicate=], then: 1. Let |href| be the result of running |el|'s {{HTMLHyperlinkElementUtils/href}} getter steps. 1. [=list/For each=] |pattern| of |predicate|'s [=document rule URL pattern predicate/patterns=]: - 1. [=URLPattern/Match=] given |pattern| and |href|. If the result is not null, return true. + 1. Perform a [=URL pattern/match=] given |pattern| and |href|. If the result is not null, return true. 1. Return false. 1. If |predicate| is a [=document rule CSS selector predicate=], then: 1. [=list/For each=] |selector| of |predicate|'s [=document rule CSS selector predicate/selectors=]: