You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"html": "To <dfn class=\"dfn-paneled has-dfn-panel\" data-dfn-type=\"dfn\" data-noexport=\"\" id=\"determine-pairs-of-gap-decoration-endpoints\" role=\"button\" aria-expanded=\"false\" tabindex=\"0\">determine pairs of gap decoration endpoints</dfn> within a given <var>gap</var>:",
11
+
"rationale": ".algorithm",
12
+
"steps": [
13
+
{
14
+
"html": "Let <var>pairs</var> be an empty list.\n\t\t\t\tLet <var>endpoints</var> be the list of <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#gap-intersection-point\" id=\"ref-for-gap-intersection-point①③\">gap intersection points</a> that fall along the centerline of <var>gap</var>,\n\t\t\t\tordered from start to end along <var>gap</var>’s axis.\n\t\t\t\tLet <var>break</var> be the used value of either <a class=\"property css\" data-link-type=\"property\" href=\"https://www.w3.org/TR/css-gaps-1/#propdef-column-rule-break\" id=\"ref-for-propdef-column-rule-break④\">column-rule-break</a> or <a class=\"property css\" data-link-type=\"property\" href=\"https://www.w3.org/TR/css-gaps-1/#propdef-row-rule-break\" id=\"ref-for-propdef-row-rule-break③\">row-rule-break</a>,\n\t\t\t\twhichever applies to <var>gap</var>."
15
+
},
16
+
{
17
+
"html": "If <var>endpoints</var> contains fewer than 2 items, return <var>pairs</var>."
18
+
},
19
+
{
20
+
"html": "If <var>break</var> is other than <a class=\"css\" data-link-type=\"maybe\" href=\"https://www.w3.org/TR/css-gaps-1/#valdef-column-rule-break-none\" id=\"ref-for-valdef-column-rule-break-none①\">none</a>,\n\t\t\t\tand the first two items in <var>endpoints</var> are <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#discontiguous\" id=\"ref-for-discontiguous①\">discontiguous</a>,\n\t\t\t\tremove the first item from <var>endpoints</var>, then go back to step 2."
21
+
},
22
+
{
23
+
"html": "Remove the first item from <var>endpoints</var>.\n\t\t\t\tLet <var>start</var> be equal to that item."
24
+
},
25
+
{
26
+
"html": "Remove the first item from <var>endpoints</var>.\n\t\t\t\tLet <var>end</var> be equal to that item."
27
+
},
28
+
{
29
+
"html": "If <var>endpoints</var> is non-empty, and any of the following conditions are true... \n\n ...then go back to step 5.",
30
+
"ignored": [
31
+
"break is none. break is spanning-item, and start is not discontiguous with the first item in endpoints. break is intersection, and start is not discontiguous with the first item in endpoints, and the intersection is flanked by spanning items on opposing sides."
32
+
]
33
+
},
34
+
{
35
+
"html": "<a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#compute-the-offset\" id=\"ref-for-compute-the-offset\">Compute the offset</a> for <var>start</var> within <var>gap</var>.\n\t\t\t\tOffset <var>start</var> by the result,\n\t\t\t\tin the forward direction along <var>gap</var>’s axis."
36
+
},
37
+
{
38
+
"html": "<a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#compute-the-offset\" id=\"ref-for-compute-the-offset①\">Compute the offset</a> for <var>end</var> within <var>gap</var>.\n\t\t\t\tOffset <var>end</var> by the result,\n\t\t\t\tin the reverse direction along <var>gap</var>’s axis."
39
+
},
40
+
{
41
+
"html": "Add to <var>pairs</var> a tuple consisting of <var>start</var> and <var>end</var>."
"html": "To <dfn class=\"dfn-paneled has-dfn-panel\" data-dfn-type=\"dfn\" data-noexport=\"\" id=\"compute-the-offset\" role=\"button\" aria-expanded=\"false\" tabindex=\"0\">compute the offset</dfn> for a given <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#gap-intersection-point\" id=\"ref-for-gap-intersection-point①⑨\">gap intersection point</a> <var>point</var> within a given <var>gap</var>:",
52
+
"rationale": ".algorithm",
53
+
"steps": [
54
+
{
55
+
"html": "Let <var>width</var> be the <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#crossing-gap-width\" id=\"ref-for-crossing-gap-width④\">crossing gap width</a> for <var>point</var>."
56
+
},
57
+
{
58
+
"html": "Let <var>outset</var> be the computed value of either <a class=\"property css\" data-link-type=\"property\" href=\"https://www.w3.org/TR/css-gaps-1/#propdef-column-rule-outset\" id=\"ref-for-propdef-column-rule-outset④\">column-rule-outset</a> or <a class=\"property css\" data-link-type=\"property\" href=\"https://www.w3.org/TR/css-gaps-1/#propdef-row-rule-outset\" id=\"ref-for-propdef-row-rule-outset③\">row-rule-outset</a>,\n\t\t\t\twhichever applies to <var>gap</var>.\n\t\t\t\tResolve any percentages in <var>outset</var> against <var>width</var>."
59
+
},
60
+
{
61
+
"html": "Let <var>result</var> be <var>width</var> multiplied by 50%.\n\t\t\t\tSubtract <var>outset</var> from <var>result</var>."
"html": "To <dfn class=\"dfn-paneled has-dfn-panel\" data-dfn-type=\"dfn\" data-noexport=\"\" id=\"assign-gap-decoration-values\" role=\"button\" aria-expanded=\"false\" tabindex=\"0\">assign gap decoration values</dfn> to a list of <var>gaps</var> using a list of <var>values</var>:",
72
+
"rationale": ".algorithm",
73
+
"steps": [
74
+
{
75
+
"html": "Replace any <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#integer-repeater\" id=\"ref-for-integer-repeater①\">integer repeaters</a> in <var>values</var> with their expanded-out equivalents."
76
+
},
77
+
{
78
+
"html": "If the list contains no <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#auto-repeater\" id=\"ref-for-auto-repeater②\">auto repeater</a>, then:",
79
+
"rationale": "end",
80
+
"steps": [
81
+
{
82
+
"html": "Beginning from the first item in <var>values</var> and the first item in <var>gaps</var>,\n\t\t\t\t\t\tassign each value to the corresponding gap.\n\t\t\t\t\t\tIf there are fewer values than gaps,\n\t\t\t\t\t\trepeat beginning from the first item in <var>values</var>,\n\t\t\t\t\t\tas many times as needed."
83
+
},
84
+
{
85
+
"html": "End this algorithm."
86
+
}
87
+
]
88
+
},
89
+
{
90
+
"html": "<var>values</var> contains an <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#auto-repeater\" id=\"ref-for-auto-repeater③\">auto repeater</a>.\n\t\t\t\tLet <var>leading count</var> be the number of items in <var>values</var> before the <span id=\"ref-for-auto-repeater④\">auto repeater</span>.\n\t\t\t\tLet <var>trailing count</var> be the number of items in <var>values</var> after the <span id=\"ref-for-auto-repeater⑤\">auto repeater</span>."
91
+
},
92
+
{
93
+
"html": "Partition <var>gaps</var> as follows:",
94
+
"rationale": "let",
95
+
"steps": [
96
+
{
97
+
"html": "Let <var>leading gaps</var> contain the first <var>leading count</var> items in <var>gaps</var>."
98
+
},
99
+
{
100
+
"html": "Let <var>trailing gaps</var> contain the last <var>trailing count</var> items in <var>gaps</var>,\n\t\t\t\t\t\texcluding any items in <var>leading gaps</var>."
101
+
},
102
+
{
103
+
"html": "Let <var>auto gaps</var> contain any items in <var>gaps</var> that are not in either <var>leading gaps</var> or <var>trailing gaps</var>."
104
+
}
105
+
]
106
+
},
107
+
{
108
+
"html": "If <var>leading gaps</var> is non-empty, <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#assign-gap-decoration-values\" id=\"ref-for-assign-gap-decoration-values\">assign gap decoration values</a> to <var>leading gaps</var> using the first <var>leading count</var> items in <var>values</var>."
109
+
},
110
+
{
111
+
"html": "If <var>trailing gaps</var> is non-empty, <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#assign-gap-decoration-values-in-reverse\" id=\"ref-for-assign-gap-decoration-values-in-reverse\">assign gap decoration values in reverse</a> to <var>trailing gaps</var> using the last <var>trailing count</var> items in <var>values</var>."
112
+
},
113
+
{
114
+
"html": "If <var>auto gaps</var> is non-empty, <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#assign-gap-decoration-values\" id=\"ref-for-assign-gap-decoration-values①\">assign gap decoration values</a> to <var>auto gaps</var> using the list of values in the second argument of the <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/css-gaps-1/#auto-repeater\" id=\"ref-for-auto-repeater⑥\">auto repeater</a>."
Copy file name to clipboardExpand all lines: tr/algorithms/sri-2.json
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"spec": {
3
3
"title": "Subresource Integrity",
4
-
"url": "https://www.w3.org/TR/SRI/"
4
+
"url": "https://www.w3.org/TR/sri-2/"
5
5
},
6
6
"algorithms": [
7
7
{
@@ -12,7 +12,7 @@
12
12
"html": "<p>Let <var>result</var> be the result of applying <var>algorithm</var> to <var>bytes</var>.</p>"
13
13
},
14
14
{
15
-
"html": "<p>Return the result of <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/SRI/#base64-encoding\" id=\"ref-for-base64-encoding①\">base64 encoding</a> <var>result</var>.</p>"
15
+
"html": "<p>Return the result of <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/sri-2/#base64-encoding\" id=\"ref-for-base64-encoding①\">base64 encoding</a> <var>result</var>.</p>"
16
16
}
17
17
]
18
18
},
@@ -46,7 +46,7 @@
46
46
"html": "<p>If <var>algorithm-and-value</var>[1] <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list-contain\" id=\"ref-for-list-contain①\">exists</a>, set <var>base64-value</var> to <var>algorithm-and-value</var>[1].</p>"
47
47
},
48
48
{
49
-
"html": "<p>If <var>algorithm</var> is not a <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/SRI/#valid-sri-hash-algorithm-token\" id=\"ref-for-valid-sri-hash-algorithm-token\">valid SRI hash algorithm token</a>, then <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#iteration-continue\" id=\"ref-for-iteration-continue\">continue</a>.</p>"
49
+
"html": "<p>If <var>algorithm</var> is not a <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/sri-2/#valid-sri-hash-algorithm-token\" id=\"ref-for-valid-sri-hash-algorithm-token\">valid SRI hash algorithm token</a>, then <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#iteration-continue\" id=\"ref-for-iteration-continue\">continue</a>.</p>"
50
50
},
51
51
{
52
52
"html": "<p>Let <var>metadata</var> be the ordered map «[\"alg\" → <var>algorithm</var>,\n\"val\" → <var>base64-value</var>]».</p>"
@@ -73,7 +73,7 @@
73
73
"rationale": "assert",
74
74
"steps": [
75
75
{
76
-
"html": "<p class=\"assertion\">Assert: <var>item</var>[\"<code>alg</code>\"] is a <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/SRI/#valid-sri-hash-algorithm-token\" id=\"ref-for-valid-sri-hash-algorithm-token①\">valid SRI hash algorithm token</a>.</p>"
76
+
"html": "<p class=\"assertion\">Assert: <var>item</var>[\"<code>alg</code>\"] is a <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/sri-2/#valid-sri-hash-algorithm-token\" id=\"ref-for-valid-sri-hash-algorithm-token①\">valid SRI hash algorithm token</a>.</p>"
77
77
},
78
78
{
79
79
"html": "If <var>result</var> is the empty set, then:",
@@ -91,10 +91,10 @@
91
91
]
92
92
},
93
93
{
94
-
"html": "<p>Let <var>currentAlgorithm</var> be <var>strongest</var>[\"<code>alg</code>\"], and <var>currentAlgorithmIndex</var> be the index of <var>currentAlgorithm</var> in the <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/SRI/#valid-sri-hash-algorithm-token-set\" id=\"ref-for-valid-sri-hash-algorithm-token-set②\">valid SRI hash algorithm token set</a>.</p>"
94
+
"html": "<p>Let <var>currentAlgorithm</var> be <var>strongest</var>[\"<code>alg</code>\"], and <var>currentAlgorithmIndex</var> be the index of <var>currentAlgorithm</var> in the <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/sri-2/#valid-sri-hash-algorithm-token-set\" id=\"ref-for-valid-sri-hash-algorithm-token-set②\">valid SRI hash algorithm token set</a>.</p>"
95
95
},
96
96
{
97
-
"html": "<p>Let <var>newAlgorithm</var> be the <var>item</var>[\"<code>alg</code>\"], and <var>newAlgorithmIndex</var> be the index of <var>newAlgorithm</var> in the <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/SRI/#valid-sri-hash-algorithm-token-set\" id=\"ref-for-valid-sri-hash-algorithm-token-set③\">valid SRI hash algorithm token set</a>.</p>"
97
+
"html": "<p>Let <var>newAlgorithm</var> be the <var>item</var>[\"<code>alg</code>\"], and <var>newAlgorithmIndex</var> be the index of <var>newAlgorithm</var> in the <a data-link-type=\"dfn\" href=\"https://www.w3.org/TR/sri-2/#valid-sri-hash-algorithm-token-set\" id=\"ref-for-valid-sri-hash-algorithm-token-set③\">valid SRI hash algorithm token set</a>.</p>"
98
98
},
99
99
{
100
100
"html": "<p>If <var>newAlgorithmIndex</var> is less than <var>currentAlgorithmIndex</var>, <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#iteration-continue\" id=\"ref-for-iteration-continue②\">continue</a>.</p>"
@@ -126,13 +126,13 @@
126
126
"rationale": "let",
127
127
"steps": [
128
128
{
129
-
"html": "<p>Let <var>parsedMetadata</var> be the result of <a href=\"https://www.w3.org/TR/SRI/#parse-metadata\">parsing <var>metadataList</var></a>.</p>"
129
+
"html": "<p>Let <var>parsedMetadata</var> be the result of <a href=\"https://www.w3.org/TR/sri-2/#parse-metadata\">parsing <var>metadataList</var></a>.</p>"
"html": "<p>Let <var>metadata</var> be the result of <a href=\"https://www.w3.org/TR/SRI/#get-the-strongest-metadata\"> getting the strongest metadata from <var>parsedMetadata</var></a>.</p>"
135
+
"html": "<p>Let <var>metadata</var> be the result of <a href=\"https://www.w3.org/TR/sri-2/#get-the-strongest-metadata\"> getting the strongest metadata from <var>parsedMetadata</var></a>.</p>"
136
136
},
137
137
{
138
138
"html": "For each <var>item</var> in <var>metadata</var>:",
@@ -145,7 +145,7 @@
145
145
"html": "<p>Let <var>expectedValue</var> be the <var>item</var>[\"val\"].</p>"
146
146
},
147
147
{
148
-
"html": "<p>Let <var>actualValue</var> be the result of <a href=\"https://www.w3.org/TR/SRI/#apply-algorithm-to-response\">applying <var>algorithm</var> to <var>bytes</var> </a>.</p>"
148
+
"html": "<p>Let <var>actualValue</var> be the result of <a href=\"https://www.w3.org/TR/sri-2/#apply-algorithm-to-response\">applying <var>algorithm</var> to <var>bytes</var> </a>.</p>"
149
149
},
150
150
{
151
151
"html": "<p>If <var>actualValue</var> is a case-sensitive match for <var>expectedValue</var>, return <code>true</code>.</p>"
0 commit comments