From 6241b1ad6312ec62b150f95eaff0385ec63d1277 Mon Sep 17 00:00:00 2001 From: reffy-bot <> Date: Wed, 11 Sep 2024 01:48:39 +0000 Subject: [PATCH] Update of TR report from new reffy run Using reffy commit 17.2.5. --- tr/algorithms/css-easing-2.json | 236 ++ tr/algorithms/css-values-5.json | 151 ++ tr/algorithms/fedcm-1.json | 1451 ++++++++++++ tr/algorithms/html-ruby-extensions.json | 20 + tr/algorithms/trusted-types.json | 25 +- tr/algorithms/webgpu.json | 469 ++-- tr/css/css-easing.json | 98 +- tr/css/css-values-5.json | 484 ++++ tr/dfns/css-easing-2.json | 804 +++++++ tr/dfns/css-values-5.json | 1615 +++++++++++++ tr/dfns/fedcm-1.json | 2569 ++++++++++++++++++++ tr/dfns/html-ruby-extensions.json | 263 +++ tr/dfns/webgpu.json | 21 + tr/elements/html-ruby-extensions.json | 28 + tr/headings/css-easing-2.json | 242 ++ tr/headings/css-values-5.json | 412 ++++ tr/headings/fedcm-1.json | 503 ++++ tr/headings/html-ruby-extensions.json | 231 ++ tr/idl/fedcm.idl | 121 + tr/idl/webgpu.idl | 2 +- tr/ids/css-easing-2.json | 387 ++++ tr/ids/css-values-5.json | 1203 ++++++++++ tr/ids/fedcm-1.json | 2837 +++++++++++++++++++++++ tr/ids/html-ruby-extensions.json | 386 +++ tr/ids/webgpu.json | 409 ++-- tr/index.json | 291 ++- tr/links/css-easing-2.json | 105 + tr/links/css-values-5.json | 439 ++++ tr/links/fedcm-1.json | 415 ++++ tr/links/html-ruby-extensions.json | 158 ++ tr/links/webgpu.json | 2 +- tr/refs/css-easing-2.json | 39 + tr/refs/css-values-5.json | 180 ++ tr/refs/fedcm-1.json | 128 + tr/refs/html-ruby-extensions.json | 52 + 35 files changed, 16329 insertions(+), 447 deletions(-) create mode 100644 tr/algorithms/css-easing-2.json create mode 100644 tr/algorithms/css-values-5.json create mode 100644 tr/algorithms/fedcm-1.json create mode 100644 tr/algorithms/html-ruby-extensions.json create mode 100644 tr/css/css-values-5.json create mode 100644 tr/dfns/css-easing-2.json create mode 100644 tr/dfns/css-values-5.json create mode 100644 tr/dfns/fedcm-1.json create mode 100644 tr/dfns/html-ruby-extensions.json create mode 100644 tr/elements/html-ruby-extensions.json create mode 100644 tr/headings/css-easing-2.json create mode 100644 tr/headings/css-values-5.json create mode 100644 tr/headings/fedcm-1.json create mode 100644 tr/headings/html-ruby-extensions.json create mode 100644 tr/idl/fedcm.idl create mode 100644 tr/ids/css-easing-2.json create mode 100644 tr/ids/css-values-5.json create mode 100644 tr/ids/fedcm-1.json create mode 100644 tr/ids/html-ruby-extensions.json create mode 100644 tr/links/css-easing-2.json create mode 100644 tr/links/css-values-5.json create mode 100644 tr/links/fedcm-1.json create mode 100644 tr/links/html-ruby-extensions.json create mode 100644 tr/refs/css-easing-2.json create mode 100644 tr/refs/css-values-5.json create mode 100644 tr/refs/fedcm-1.json create mode 100644 tr/refs/html-ruby-extensions.json diff --git a/tr/algorithms/css-easing-2.json b/tr/algorithms/css-easing-2.json new file mode 100644 index 000000000000..605730770b03 --- /dev/null +++ b/tr/algorithms/css-easing-2.json @@ -0,0 +1,236 @@ +{ + "spec": { + "title": "CSS Easing Functions Level 2", + "url": "https://www.w3.org/TR/css-easing-2/" + }, + "algorithms": [ + { + "name": "to create a linear easing function", + "href": "https://www.w3.org/TR/css-easing-2/#create-a-linear-easing-function", + "html": "To create a linear easing function given a list of <linear-stop>s stopList,\nperform the following.\nIt returns a linear easing function or failure.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let function be a new linear easing function.

" + }, + { + "html": "

Let largestInput be negative infinity.

" + }, + { + "html": "

If there are less than two items in stopList, then return failure.

" + }, + { + "html": "For each stop in stopList:", + "rationale": "let", + "steps": [ + { + "html": "

Let point be a new linear easing point with its output set to stop’s <number> as a number.

" + }, + { + "html": "

Append point to function’s points.

" + }, + { + "html": "If stop has a <linear-stop-length>, then:", + "rationale": "set", + "steps": [ + { + "html": "

Set point’s input to whichever is greater: stop’s <linear-stop-length>’s first <percentage> as a number,\n or largestInput.

" + }, + { + "html": "

Set largestInput to point’s input.

" + }, + { + "html": "If stop’s <linear-stop-length> has a second <percentage>, then:", + "rationale": "let", + "steps": [ + { + "html": "

Let extraPoint be a new linear easing point with its output set to stop’s <number> as a number.

" + }, + { + "html": "

Append extraPoint to function’s points.

" + }, + { + "html": "

Set extraPoint’s input to whichever is greater: stop’s <linear-stop-length>’s second <percentage> as a number,\n or largestInput.

" + }, + { + "html": "

Set largestInput to extraPoint’s input.

" + } + ] + } + ] + }, + { + "html": "Otherwise, if stop is the first item in stopList, then:", + "rationale": "set", + "steps": [ + { + "html": "

Set point’s input to 0.

" + }, + { + "html": "

Set largestInput to 0.

" + } + ] + }, + { + "html": "

Otherwise, if stop is the last item in stopList,\n then set point’s input to whichever is greater:\n 1 or largestInput.

" + } + ] + }, + { + "html": "

For runs of items in function’s points that have a null input,\n assign a number to the input by linearly interpolating between the closest previous and next points that have a non-null input.

" + }, + { + "html": "

Return function.

" + } + ] + }, + { + "name": "linear easing function", + "href": "https://www.w3.org/TR/css-easing-2/#linear-easing-function-serialized-computed-value", + "html": "To get a linear easing function's (linearEasingFunction) serialized computed value,\nperform the following.\nIt returns a string.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let output be \"linear(\".

" + }, + { + "html": "For each point in linearEasingFunction’s points:", + "rationale": "if", + "steps": [ + { + "html": "

If point is not the first item of linearEasingFunction’s points,\n append \", \" to output.

" + }, + { + "html": "

Append the computed value of point’s output,\n as a <number>,\n to output.

" + }, + { + "html": "

Append \" \" to output.

" + }, + { + "html": "

Append the computed value of point’s input,\n as a <percentage>,\n to output.

" + } + ] + }, + { + "html": "

Append \")\" to output.

" + }, + { + "html": "

Return output.

" + } + ] + }, + { + "name": "to calculate linear easing output progress", + "href": "https://www.w3.org/TR/css-easing-2/#calculate-linear-easing-output-progress", + "html": "To calculate linear easing output progress for a given linear easing function linearEasingFunction,\nand an input progress value inputProgress,\nperform the following.\nIt returns an output progress value.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let points be linearEasingFunction’s points.

" + }, + { + "html": "

Let pointAIndex be index of the last item in points with an input less than or equal to inputProgress,\n or 0 if there is no match.

" + }, + { + "html": "

If pointAIndex is equal to points size minus 1,\n decrement pointAIndex by 1.

" + }, + { + "html": "

Let pointA be points[pointAIndex].

" + }, + { + "html": "

Let pointB be points[pointAIndex + 1].

" + }, + { + "html": "

If pointA’s input is equal to pointB’s input,\n return pointB’s output.

" + }, + { + "html": "

Let progressFromPointA be inputProgress minus pointA’s input.

" + }, + { + "html": "

Let pointInputRange be pointB’s input minus pointA’s input.

" + }, + { + "html": "

Let progressBetweenPoints be progressFromPointA divided by pointInputRange.

" + }, + { + "html": "

Let pointOutputRange be pointB’s output minus pointA’s output.

" + }, + { + "html": "

Let outputFromLastPoint be progressBetweenPoints multiplied by pointOutputRange.

" + }, + { + "html": "

Return pointA’s output plus outputFromLastPoint.

" + } + ] + }, + { + "html": "For input progress values less than zero,", + "rationale": "if", + "steps": [ + { + "html": "

If the x value of P1 is greater than zero, use\n a straight line that passes through P1 and P0 as the tangent.

" + }, + { + "html": "

Otherwise, if the x value of P2 is greater than\n zero, use a straight line that passes through P2 and P0 as the tangent.

" + }, + { + "html": "

Otherwise, let the output progress value be zero for all input progress values in the range [-∞, 0).

" + } + ] + }, + { + "html": "For input progress values greater than one,", + "rationale": "if", + "steps": [ + { + "html": "

If the x value of P2 is less than one, use\n a straight line that passes through P2 and P3 as the tangent.

" + }, + { + "html": "

Otherwise, if the x value of P1 is less than\n one, use a straight line that passes through P1 and P3 as the tangent.

" + }, + { + "html": "

Otherwise, let the output progress value be one for all input progress values in the range (1, ∞].

" + } + ] + }, + { + "html": "The output progress value is calculated from the input progress value and before flag as follows:", + "rationale": "if", + "steps": [ + { + "html": "

Calculate the current step as floor(input progress value × steps).

" + }, + { + "html": "

If the step position property is one of:

\n \n

increment current step by one.

" + }, + { + "html": "

If both of the following conditions are true:

\n \n

decrement current step by one.

" + }, + { + "html": "

If input progress value ≥ 0 and current step < 0,\n let current step be zero.

" + }, + { + "html": "

Calculate jumps based on the step position as follows:

\n
\n
jump-start or jump-end\n
\n

steps

\n
jump-none\n
\n

steps - 1

\n
jump-both\n
\n

steps + 1

\n
" + }, + { + "html": "

If input progress value ≤ 1 and current step > jumps, let current step be jumps.

" + }, + { + "html": "

The output progress value is current step / jumps.

" + } + ] + }, + { + "html": "Step easing functions, whether they are specified using the steps() function or either of the step-start or step-end keywords, are serialized as follows:", + "rationale": "if", + "steps": [ + { + "html": "

If the step position is jump-end or end, serialize\n as steps(<integer>).

" + }, + { + "html": "

Otherwise, serialize as steps(<integer>, <step-position>).

" + } + ] + } + ] +} \ No newline at end of file diff --git a/tr/algorithms/css-values-5.json b/tr/algorithms/css-values-5.json new file mode 100644 index 000000000000..8d1edc4d9309 --- /dev/null +++ b/tr/algorithms/css-values-5.json @@ -0,0 +1,151 @@ +{ + "spec": { + "title": "CSS Values and Units Module Level 5", + "url": "https://www.w3.org/TR/css-values-5/" + }, + "algorithms": [ + { + "name": "/", + "href": "https://www.w3.org/TR/css-values-5/#typedef-request-url-modifier-crossorigin-modifier", + "html": "The URL request modifier steps for this modifier given request req are:", + "rationale": "set", + "steps": [ + { + "html": "

Set request's mode to \"cors\".

" + }, + { + "html": "

If the given value is use-credentials,\nset request's credentials mode to \"include\".

" + } + ] + }, + { + "name": "substitute an attr()", + "href": "https://www.w3.org/TR/css-values-5/#substitute-an-attr", + "html": "To substitute an attr():", + "rationale": "if", + "steps": [ + { + "html": "

If the attr() function has a substitution value,\nreplace the attr() function by the substitution value.

" + }, + { + "html": "

Otherwise, if the attr() function has a fallback value as its last argument,\nreplace the attr() function by the fallback value.\nIf there are any var() or attr() references in the fallback, substitute them as well.

" + }, + { + "html": "

Otherwise, the property containing the attr() function\nis invalid at computed-value time.

" + } + ] + }, + { + "html": "For random(),\nthe random-caching key is a tuple of:", + "rationale": "if", + "steps": [ + { + "html": "

The used value of the minimum calculation.

" + }, + { + "html": "

The used value of the maximum calculation.

" + }, + { + "html": "

The used value of the step calculation, if present,\nor null otherwise.

" + }, + { + "html": "

The <dashed-ident> part of the <random-caching-options>, if present,\nor null otherwise.

" + }, + { + "html": "

If per-element is specified in the <random-caching-options>,\na unique value per element or pseudo-element the function appears in.

" + } + ] + }, + { + "html": "For random-item(),\nthe random-caching key is a tuple of:", + "rationale": "if", + "steps": [ + { + "html": "

The number of arguments to the function.

" + }, + { + "html": "

The <dashed-ident> part of the <random-caching-options>, if present,\nor null otherwise.

" + }, + { + "html": "

If per-element is specified in the <random-caching-options>,\na unique value per element or pseudo-element the function appears in.

" + } + ] + }, + { + "name": "calc-size()/canonicalize for interpolation", + "href": "https://www.w3.org/TR/css-values-5/#calc-size-canonicalize-for-interpolation", + "html": "To canonicalize for interpolation a calc-size() function: \n
\n
If the calc-size basis is a calc-size() function itself\n
\n

The calc-size basis of the outer function\nis replaced with that of the inner function,\nand the inner function’s calc-size calculation is substituted into the outer function’s calc-size calculation.

\n
Otherwise, if the calc-size basis is a <calc-sum> whose type matches <length> (no percentage present)\n
\n

Replace the basis with any,\nand the original basis is substituted into the calc-size calculation.

\n
Otherwise, if the calc-size basis is any other <calc-sum> (contains a percentage)\n
\n

Replace the basis with 100% and the original basis is de-percentified,\nthen substituted into the calc-size calculation.

\n
\n

(The above is performed recursively, if necessary.)

\n

If any substitute into a calc-size calculation returns failure,\n\tthe entire operation immediately returns failure.

", + "rationale": ".switch", + "steps": [ + { + "operation": "switch", + "steps": [ + { + "case": "If the calc-size basis is a calc-size() function itself", + "html": "

The calc-size basis of the outer function\nis replaced with that of the inner function,\nand the inner function’s calc-size calculation is substituted into the outer function’s calc-size calculation.

" + }, + { + "case": "Otherwise, if the calc-size basis is a whose type matches (no percentage present)", + "html": "

Replace the basis with any,\nand the original basis is substituted into the calc-size calculation.

" + }, + { + "case": "Otherwise, if the calc-size basis is any other (contains a percentage)", + "html": "

Replace the basis with 100% and the original basis is de-percentified,\nthen substituted into the calc-size calculation.

" + } + ] + } + ] + }, + { + "name": "de-percentify a calc-size calculation", + "href": "https://www.w3.org/TR/css-values-5/#de-percentify-a-calc-size-calculation", + "html": "To de-percentify a calc-size calculation calc:", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Replace every instance of a <percentage-token> in calc with (size * N),\nwhere N is the percentage’s value divided by 100.\nReturn calc.

" + } + ] + }, + { + "name": "substitute into a calc-size calculation", + "href": "https://www.w3.org/TR/css-values-5/#substitute-into-a-calc-size-calculation", + "html": "To substitute into a calc-size calculation calc a value insertion value:", + "rationale": ".algorithm", + "steps": [ + { + "html": "

If calc doesn’t have the size keyword in it,\ndo nothing.

" + }, + { + "html": "

Otherwise, replace every instance of the size keyword\nin calc with insertion value,\nwrapped in parentheses.

" + }, + { + "html": "

If this substitution would produce a value\nlarger than an UA-defined limit,\nreturn failure.

" + } + ] + }, + { + "html": "Two calc-size() functions can be interpolated if\n(after being canonicalized for interpolation):", + "rationale": ".switch", + "steps": [ + { + "operation": "switch", + "steps": [ + { + "case": "Either function returned failure from being canonicalized for interpolation", + "html": "

The values cannot be interpolated.

" + }, + { + "case": "Both calc-size basises are identical", + "html": "

The result’s calc-size basis is the that basis value.

" + }, + { + "case": "Either calc-size basis is any", + "html": "

The result’s calc-size basis is the non-any basis.

" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tr/algorithms/fedcm-1.json b/tr/algorithms/fedcm-1.json new file mode 100644 index 000000000000..c97d2cf96c3c --- /dev/null +++ b/tr/algorithms/fedcm-1.json @@ -0,0 +1,1451 @@ +{ + "spec": { + "title": "Federated Credential Management API", + "url": "https://www.w3.org/TR/fedcm-1/" + }, + "algorithms": [ + { + "name": "get the login status", + "href": "https://www.w3.org/TR/fedcm-1/#get-the-login-status", + "html": "To get the login status for an origin origin:", + "rationale": ".algorithm", + "steps": [ + { + "html": "

If Login Status map[origin] exists, return it.

" + }, + { + "html": "

Otherwise, return unknown.

" + } + ] + }, + { + "name": "set the login status", + "href": "https://www.w3.org/TR/fedcm-1/#set-the-login-status", + "html": "To set the login status for an origin origin to\nvalue value:", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Assert that value is one of logged-in or logged-out.

" + }, + { + "html": "

Set Login Status map[origin] to value.

" + } + ] + }, + { + "name": "same-site with its ancestors", + "href": "https://www.w3.org/TR/fedcm-1/#same-site-with-its-ancestors", + "html": "An environment settings object (settings) is same-site with its\n ancestors if the following algorithm returns true:", + "rationale": ".algorithm", + "steps": [ + { + "html": "

If settings’s relevant global object has no associated Document,\nreturn false.

" + }, + { + "html": "

Let document be settingsrelevant global object's associated Document.

" + }, + { + "html": "

If document has no browsing context, return false.

" + }, + { + "html": "

Let origin be settingsorigin.

" + }, + { + "html": "

Let navigable be document’s node navigable.

" + }, + { + "html": "While navigable has a non-null parent:", + "rationale": "set", + "steps": [ + { + "html": "

Set navigable to navigable’s parent.

" + }, + { + "html": "

If navigable’s active document's origin is not same site with origin, return false.

" + } + ] + }, + { + "html": "

Return true.

" + } + ] + }, + { + "name": "process the login status header", + "html": "", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let origin be the response’s URL's origin.

" + }, + { + "html": "

Let client be the request's client.

" + }, + { + "html": "If the request’s destination is not \"document\":", + "rationale": "if", + "steps": [ + { + "html": "

If client is null, return.

" + }, + { + "html": "

If origin is not same site with the request's origin, return.

" + }, + { + "html": "

If client is not same-site with its ancestors, return.

" + } + ] + }, + { + "html": "

Assert that value is a tuple.

" + }, + { + "html": "

Let token be the first entry of value.

" + }, + { + "html": "

If token is \"logged-in\", set the login status for origin to logged-in.

" + }, + { + "html": "

If token is \"logged-out\", set the login status for origin to logged-out.

" + } + ] + }, + { + "name": "setStatus", + "html": "When setStatus() is called with argument status:", + "rationale": ".algorithm", + "steps": [ + { + "html": "

If the current settings object is not same-site with its ancestors,\nthrow a SecurityError DOMException.

" + }, + { + "html": "

Let origin be the current settings object's origin.

" + }, + { + "html": "

Let value be logged-in if status is \"logged-in\" or logged-out if status is \"logged-out\".

" + }, + { + "html": "

Set the login status for origin to value.

" + } + ] + }, + { + "name": "compute the connected account key", + "href": "https://www.w3.org/TR/fedcm-1/#compute-the-connected-account-key", + "html": "To compute the connected account key given an IdentityProviderConfig provider, an IdentityProviderAccount account, and a globalObject, run the following steps. It returns a\ntriple of the form (rp, idp, account).", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let configUrl be the result of running parse url with provider’s configURL and globalObject.

" + }, + { + "html": "

Let idpOrigin be the origin corresponding to configUrl.

" + }, + { + "html": "

Let rpOrigin be globalObject’s associated Document's origin.

" + }, + { + "html": "

Let accountId be account’s id.

" + }, + { + "html": "

Return (rpOrigin, idpOrigin, accountId).

" + } + ] + }, + { + "name": "eligible for auto reauthentication", + "href": "https://www.w3.org/TR/fedcm-1/#eligible-for-auto-reauthentication", + "html": "When asked whether an IdentityProviderAccount account is eligible for auto reauthentication given an IdentityProviderConfig provider and a globalObject, run the following steps. This returns a boolean.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

If account contains approved_clients and account’s approved_clients does not contain provider’s clientId, return false.

" + }, + { + "html": "

Let triple be the result of running compute the connected account key given provider, account, and globalObject.

" + }, + { + "html": "

Return whether connected accounts set contains triple.

" + } + ] + }, + { + "name": "compute the connection status", + "href": "https://www.w3.org/TR/fedcm-1/#compute-the-connection-status", + "html": "When asked to compute the connection status given an IdentityProviderAccount account, an IdentityProviderConfig provider and a globalObject, run the following steps.\nThis returns connected or disconnected.", + "rationale": ".algorithm", + "steps": [ + { + "html": "If account contains approved_clients:", + "rationale": "if", + "steps": [ + { + "html": "

If account’s approved_clients containsprovider’s clientId, return connected.

" + }, + { + "html": "

Return disconnected.

" + } + ] + }, + { + "html": "

Let triple be the result of running compute the connected account key given provider, account, and globalObject.

" + }, + { + "html": "

If connected accounts set contains triple, return connected.

" + }, + { + "html": "

Return disconnected.

" + } + ] + }, + { + "name": "create a connection between the RP and the IdP account", + "href": "https://www.w3.org/TR/fedcm-1/#create-a-connection-between-the-rp-and-the-idp-account", + "html": "To create a connection between the RP and the IdP account given an IdentityProviderConfig provider, an IdentityProviderAccount account, and a globalObject (the RP's), run the following steps:", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let configUrl be the result of running parse url with provider’s configURL and globalObject.

" + }, + { + "html": "

Let idpOrigin be the origin corresponding to configUrl.

" + }, + { + "html": "

Let rpOrigin be globalObject’s associated Document's origin.

" + }, + { + "html": "

Let accountId be account’s id.

" + }, + { + "html": "

Let triple be (rpOrigin, idpOrigin, accountId).

" + }, + { + "html": "

Append triple to connected accounts set.

" + } + ] + }, + { + "name": "remove a connection", + "href": "https://www.w3.org/TR/fedcm-1/#remove-a-connection", + "html": "To remove a connection: given accountId, rpOrigin, and idpOrigin, run the\nfollowing steps. It returns whether the accountId connection was successfully removed.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let triple be (rpOrigin, idpOrigin, accountId).

" + }, + { + "html": "If connected accounts set contains triple:", + "rationale": "remove", + "steps": [ + { + "html": "

Remove triple from the connected accounts set.

" + }, + { + "html": "

Return true.

" + } + ] + }, + { + "html": "

Return false.

" + } + ] + }, + { + "name": "remove all connections", + "href": "https://www.w3.org/TR/fedcm-1/#remove-all-connections", + "html": "To remove all connections: given rpOrigin and idpOrigin, run the following steps:", + "rationale": ".algorithm", + "steps": [ + { + "html": "For every (rp, idp, accountId) triple in the connected accounts set:", + "rationale": "if", + "steps": [ + { + "html": "

If rp equals rpOrigin and idp equals idpOrigin, remove triple from the connected accounts set.

" + } + ] + } + ] + }, + { + "name": "identity-credential-disconnect", + "html": "When the static disconnect method is invoked, given an IdentityCredentialDisconnectOptions options, perform the following steps:", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let globalObject be the current global object.

" + }, + { + "html": "

Let document be globalObject’s associated Document.

" + }, + { + "html": "

If document is not allowed to use the identity-credentials-get policy-controlled feature, throw a \"NotAllowedError\" DOMException.

" + }, + { + "html": "

Let promise be a new Promise.

" + }, + { + "html": "

In parallel, attempt to disconnect given options, promise, and globalObject.

" + }, + { + "html": "

Return promise.

" + } + ] + }, + { + "name": "attempt to disconnect", + "href": "https://www.w3.org/TR/fedcm-1/#attempt-to-disconnect", + "html": "When asked to attempt to disconnect given an IdentityCredentialDisconnectOptions options, a Promise promise, and a globalObject, perform the following steps:", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Assert: these steps are running in parallel.

" + }, + { + "html": "

Let configUrl be the result of running parse url with options’s configURL and globalObject.

" + }, + { + "html": "

If configUrl is failure, reject promise with an \"InvalidStateError\" DOMException.

" + }, + { + "html": "

Run a Content Security Policy Level 3 check with a connect-src directive on the URL\npassed as configUrl. If it fails, reject promise with a \"NetworkError\" DOMException.

" + }, + { + "html": "

If there is another pending disconnect call for this globalObject (e.g., it has not yet thrown an exception or its associated Promise has not yet been\nresolved), reject promise with a \"NetworkError\" DOMException.

" + }, + { + "html": "

If configUrl is not a potentially trustworthy origin, reject promise with a\n\"NetworkError\" DOMException.

" + }, + { + "html": "

If the user has disabled the FedCM API on the globalObject, reject promise with a\n\"NetworkError\" DOMException.

" + }, + { + "html": "

If there does not exist an account account such that connected accounts set contains the result of compute the connected account key given account, options, and globalObject, then reject promise with a \"NetworkError\" DOMException. This check can be performed by iterating over the connected accounts set or by keeping a separate data structure to make this lookup fast.

" + }, + { + "html": "

Let config be the result of running fetch the config file with provider and globalObject.

" + }, + { + "html": "

If config is failure, reject promise with a \"NetworkError\" DOMException.

" + }, + { + "html": "

Let disconnectUrl be the result of computing the manifest URL given provider, config.disconnect_endpoint, and globalObject.

" + }, + { + "html": "

If disconnectUrl is failure, reject promise with a \"NetworkError\" DOMException.

" + }, + { + "html": "

Send a disconnect request with disconnectUrl, options, and globalObject, and let result be the result.

" + }, + { + "html": "

Let idpOrigin be the origin corresponding to configUrl.

" + }, + { + "html": "

Let rpOrigin be globalObject’s associated Document's origin.

" + }, + { + "html": "If result is failure:", + "rationale": "remove", + "steps": [ + { + "html": "

Remove all connections given rpOrigin and idpOrigin.

" + }, + { + "html": "

Reject promise with a \"NetworkError\" DOMException.

" + }, + { + "html": "

Return.

" + } + ] + }, + { + "html": "

Let accountId be result (note that it is not failure).

" + }, + { + "html": "

Remove a connection using accountId, rpOrigin, and idpOrigin, and let wasAccountRemoved be the result.

" + }, + { + "html": "

If wasAccountRemoved is false, remove all connections given rpOrigin and idpOrigin.

" + }, + { + "html": "

Resolve promise.

" + } + ] + }, + { + "name": "send a disconnect request", + "href": "https://www.w3.org/TR/fedcm-1/#send-a-disconnect-request", + "html": "When asked to send a disconnect request, given a URL disconnectUrl, and IdentityCredentialDisconnectOptions options, and a globalObject,\nperform the following steps. This returns an USVString or failure.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let requestBody be the result of running urlencoded serializer with a list containing:

", + "ignored": [ + "(\"client_id\", options’s clientId) (\"account_hint\", options’s accountHint)" + ] + }, + { + "html": "

Let request be a new request as follows:

\n
\n
url\n
\n

disconnectUrl

\n
method\n
\n

\"POST\"

\n
body\n
\n

the UTF-8 encode of requestBody

\n
redirect mode\n
\n

\"error\"

\n
client\n
\n

null

\n
window\n
\n

\"no-window\"

\n
service-workers mode\n
\n

\"none\"

\n
destination\n
\n

\"webidentity\"

\n
origin\n
\n

globalObject’s associated document's origin

\n
header list\n
\n

a list containing a single header with name set to Accept and value set to application/x-www-form-urlencoded

\n
credentials mode\n
\n

\"include\"

\n
mode\n
\n

\"cors\"

\n
" + }, + { + "html": "

Let accountId be null.

" + }, + { + "html": "Fetch request with request and globalObject, and with processResponseConsumeBody set to the following steps given a response response and responseBody:", + "rationale": "let", + "steps": [ + { + "html": "

Let json be the result of extract the JSON fetch response from response and responseBody.

" + }, + { + "html": "

Convert json to a DisconnectedAccount, account.

" + }, + { + "html": "

If one of the previous two steps threw an exception, set accountId to failure\nand return.

" + }, + { + "html": "

Set accountId to account’s account_id.

" + } + ] + }, + { + "html": "

Wait for accountId to be set.

" + }, + { + "html": "

Return accountId.

" + } + ] + }, + { + "name": "[[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors)", + "href": "https://www.w3.org/TR/fedcm-1/#dom-identitycredential-discoverfromexternalsource-slot", + "html": "When the IdentityCredential's [[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors) algorithm is invoked, the user agent MUST execute the following steps. This returns an IdentityCredential (or throws an error to the caller).", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Assert: These steps are running in parallel.

" + }, + { + "html": "

If the size of options[\"identity\"][\"providers\"]\nis not equal to 1, queue a global task on the DOM manipulation task source given globalObject to throw a new \"NetworkError\" DOMException

" + }, + { + "html": "

The user agent can decide when to continue with the next steps.

" + }, + { + "html": "

Let provider be options[\"identity\"][\"providers\"][0].

" + }, + { + "html": "

Let credential be the result of running create an IdentityCredential with provider, options, and globalObject.

" + }, + { + "html": "If credential is a pair:", + "rationale": "let", + "steps": [ + { + "html": "

Let throwImmediately be the value of the second element of the pair.

" + }, + { + "html": "

The user agent SHOULD wait a random amount of time\nbefore the next step if all of the following conditions hold:

\n
    \n
  • \n

    throwImmediately is false

    \n
  • \n

    The promise rejection delay was not disabled by user agent automation

    \n
  • \n

    The user agent has not implemented another way to prevent\nexposing to the RP whether the user has an account logged\nin to the RP

    \n
" + }, + { + "html": "

Queue a global task on the DOM manipulation task source to throw a new \"NetworkError\" DOMException.

" + } + ] + }, + { + "html": "

Otherwise, return credential.

" + } + ] + }, + { + "name": "create an IdentityCredential", + "href": "https://www.w3.org/TR/fedcm-1/#create-an-identitycredential", + "html": "To create an IdentityCredential given an IdentityProviderRequestOptions provider, a CredentialRequestOptions options, and a globalObject, run the following steps. This returns an IdentityCredential or a pair (failure, bool), where the bool indicates whether to skip delaying\nthe exception thrown.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Assert: These steps are running in parallel.

" + }, + { + "html": "

Let loginStatus be the result of get the login status with\nthe origin of provider’s configURL.

" + }, + { + "html": "

If loginStatus is unknown, a user agent MAY set it to logged-out.

" + }, + { + "html": "If the user triggers this affordance:", + "rationale": "let", + "steps": [ + { + "html": "

Let config be the result of running fetch the config file with provider and globalObject.

" + }, + { + "html": "

If config is failure, return (failure, true).

" + }, + { + "html": "

Show an IDP login dialog with config and provider.

" + }, + { + "html": "

If that algorithm returns failure, return (failure, true).

" + } + ] + }, + { + "html": "

Let requiresUserMediation be provider’s configURL's origin's requires user mediation.

" + }, + { + "html": "

Let mediation be options’s mediation.

" + }, + { + "html": "

If requiresUserMediation is true and mediation is\n\"silent\", return (failure, true).

" + }, + { + "html": "

Let config be the result of running fetch the config file with provider and globalObject.

" + }, + { + "html": "

If config is failure, return (failure, false).

" + }, + { + "html": "

Fetch accounts step: Let accountsList be the result of fetch the accounts with config, provider, and globalObject.

" + }, + { + "html": "If accountsList is failure, or the size of accountsList is 0:", + "rationale": "set", + "steps": [ + { + "html": "

Set the login status for the origin of the configURL to logged-out.\nA user agent may decide to skip this step if no credentials were\nsent to server.

" + }, + { + "html": "Mismatch dialog step: If loginStatus is logged-in, show a\ndialog to the user. The contents of this dialog are defined by the user\nagent. This dialog SHOULD provide an affordance for the user to trigger\nthe show an IDP login dialog algorithm with config and provider;\nthis dialog is the confirm IDP login dialog.", + "rationale": "wait", + "steps": [ + { + "html": "If the show an IDP login dialog algorithm was triggered:", + "rationale": "let", + "steps": [ + { + "html": "

Let result be the result of that algorithm.

" + }, + { + "html": "

If result is failure, return (failure, true). The user\nagent MAY show a dialog to the user before or after\nreturning failure indicating this failure.

" + }, + { + "html": "

Otherwise, go back to the fetch accounts step.

" + } + ] + } + ] + } + ] + }, + { + "html": "

Assert: accountsList is not failure and the size of accountsList is not 0.

" + }, + { + "html": "

Set the login status for the origin of the configURL to logged-in.

" + }, + { + "html": "If provider’s loginHint is not empty:", + "rationale": "for", + "steps": [ + { + "html": "

For every account in accountList, remove account from accountList if account’s login_hints does not contain provider’s loginHint.

" + }, + { + "html": "

If accountList is now empty, go to the mismatch dialog step.

" + } + ] + }, + { + "html": "If provider’s domainHint is not empty:", + "rationale": "for", + "steps": [ + { + "html": "For every account in accountList:", + "rationale": "if", + "steps": [ + { + "html": "If domainHint is \"any\":", + "rationale": "if", + "steps": [ + { + "html": "

If account’s domain_hints is empty, remove account from accountList.

" + } + ] + }, + { + "html": "

Otherwise, remove account from accountList if account’s domain_hints does not contain provider’s domainHint.

" + } + ] + }, + { + "html": "

If accountList is now empty, go to the mismatch dialog step.

" + } + ] + }, + { + "html": "For each acc in accountsList:", + "rationale": "if", + "steps": [ + { + "html": "

If acc[\"picture\"] is present, fetch the account picture with acc and globalObject.

" + } + ] + }, + { + "html": "

Let registeredAccount, numRegisteredAccounts be null and 0, respectively.

" + }, + { + "html": "

Let account be null.

" + }, + { + "html": "For each acc in accountsList:", + "rationale": "if", + "steps": [ + { + "html": "

If acc is eligible for auto reauthentication given provider, and globalObject,\nset registeredAccount to acc and increase numRegisteredAccounts by 1.

" + } + ] + }, + { + "html": "

Let permission, disclosureTextShown, and isAutoSelected be set to false.

" + }, + { + "html": "If mediation is not \"required\", requiresUserMediation is false, and numRegisteredAccounts is equal to 1:", + "rationale": "set", + "steps": [ + { + "html": "

Set account to registeredAccount and permission to true. When doing this, the user\nagent MAY show some UI to the user indicating that they are being auto-reauthenticated.

" + }, + { + "html": "

Set isAutoSelected to true.

" + } + ] + }, + { + "html": "

Otherwise, if mediation is \"silent\", return (failure, true).

" + }, + { + "html": "Otherwise, if accountsList’s size is 1:", + "rationale": "set", + "steps": [ + { + "html": "

Set account to accountsList[0].

" + }, + { + "html": "

If compute the connection status of account, provider and globalObject returns connected, show a dialog to request user permission to sign\nin via account, and set the result in permission. The user agent MAY use options’s context to customize the dialog.

" + }, + { + "html": "

Otherwise, let permission be the result of running request permission to sign-up algorithm with account, config, provider, and globalObject. Also set disclosureTextShown to true.

" + } + ] + }, + { + "html": "Otherwise:", + "rationale": "set", + "steps": [ + { + "html": "

Set account to the result of running the select an account from the accountsList.

" + }, + { + "html": "

If account is failure, return (failure, true).

" + }, + { + "html": "

If compute the connection status of account, provider and globalObject is connected, set permission to true.

" + }, + { + "html": "Otherwise:", + "rationale": "let", + "steps": [ + { + "html": "

Let permission be the result of running the request permission to sign-up algorithm with account, config, provider, and globalObject.

" + }, + { + "html": "

Set disclosureTextShown to true.

" + } + ] + } + ] + }, + { + "html": "

Wait until the user agent's dialogs requesting for user choice or permission to be\nclosed, if any are created in the previous steps.

" + }, + { + "html": "

Assert: account is not null.

" + }, + { + "html": "

If permission is false, then return (failure, true).

" + }, + { + "html": "

Let credential be the result of running the fetch an identity assertion algorithm with account’s id, disclosureTextShown, isAutoSelected, provider, config, and globalObject.

" + }, + { + "html": "

Return credential.

" + } + ] + }, + { + "name": "fetch the config file", + "href": "https://www.w3.org/TR/fedcm-1/#fetch-the-config-file", + "html": "To fetch the config file given an IdentityProviderRequestOptions provider and globalObject, run the following steps. This returns an IdentityProviderAPIConfig or failure.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let configUrl be the result of running parse url with provider’s configURL and globalObject.

" + }, + { + "html": "

If configUrl is failure, return failure.

" + }, + { + "html": "

Run a Content Security Policy Level 3 check with a connect-src directive on the URL\npassed as configUrl. If it fails, return failure.

" + }, + { + "html": "

If configUrl is not a potentially trustworthy URL, return failure.

" + }, + { + "html": "

Let rootUrl be a new URL.

" + }, + { + "html": "

Set rootUrl’s scheme to configUrl’s scheme.

" + }, + { + "html": "

Set rootUrl’s host to configUrl’s host's registrable domain.

" + }, + { + "html": "

Set rootUrl’s path to the list «\".well-known\", \"web-identity\"».

" + }, + { + "html": "

Let config, configInWellKnown both be null.

" + }, + { + "html": "

Let rpOrigin be globalObject’s associated Document's origin.

" + }, + { + "html": "

If rpOrigin is not an opaque origin, and rootUrl’s host is equal\nto rpOrigin’s registrable domain, and rootUrl’s scheme is\nequal to rpOrigin’s scheme, set configInWellKnown to true.

" + }, + { + "html": "Otherwise:", + "rationale": "let", + "steps": [ + { + "html": "

Let wellKnownRequest be a new request as follows:

\n
\n
URL\n
\n

rootUrl

\n
client\n
\n

null

\n
window\n
\n

\"no-window\"

\n
service-workers mode\n
\n

\"none\"

\n
destination\n
\n

\"webidentity\"

\n
origin\n
\n

a unique opaque origin

\n
header list\n
\n

a list containing a single header with name set to Accept and value set to application/json

\n
referrer policy\n
\n

\"no-referrer\"

\n
credentials mode\n
\n

\"omit\"

\n
mode\n
\n

\"no-cors\"

\n
" + }, + { + "html": "Fetch request with wellKnownRequest and globalObject, and with processResponseConsumeBody set to the following steps given a response response and responseBody:", + "rationale": "let", + "steps": [ + { + "html": "

Let json be the result of extract the JSON fetch response from response and responseBody.

" + }, + { + "html": "

Convert json to an IdentityProviderWellKnown, discovery.

" + }, + { + "html": "

If one of the previous two steps threw an exception, or if the size of discovery[\"provider_urls\"] is\ngreater than 1, set configInWellKnown to false.

" + }, + { + "html": "

Otherwise, set to configInWellKnown to true if discovery[\"provider_urls\"][0] is equal to provider’s configURL, and to false otherwise.

" + } + ] + } + ] + }, + { + "html": "

Let configRequest be a new request as follows:

\n
\n
url\n
\n

configUrl

\n
redirect mode\n
\n

\"error\"

\n
client\n
\n

null

\n
window\n
\n

\"no-window\"

\n
service-workers mode\n
\n

\"none\"

\n
destination\n
\n

\"webidentity\"

\n
origin\n
\n

a unique opaque origin

\n
header list\n
\n

a list containing a single header with name set to Accept and value set to application/json

\n
referrer policy\n
\n

\"no-referrer\"

\n
credentials mode\n
\n

\"omit\"

\n
mode\n
\n

\"no-cors\"

\n
" + }, + { + "html": "Fetch request with configRequest and globalObject, and with processResponseConsumeBody set to the following steps given a response response and responseBody:", + "rationale": "let", + "steps": [ + { + "html": "

Let json be the result of extract the JSON fetch response from response and responseBody.

" + }, + { + "html": "

Convert json to an IdentityProviderAPIConfig stored\nin config.

" + }, + { + "html": "

If one of the previous two steps threw an exception, set config to failure.

" + }, + { + "html": "

Set config.login_url to the result of computing\nthe manifest URL with provider, config and globalObject.

" + }, + { + "html": "

If config.login_url is null, return failure.

" + } + ] + }, + { + "html": "

Wait for both config and configInWellKnown to be set.

" + }, + { + "html": "

If configInWellKnown is true, return config. Otherwise, return failure.

" + } + ] + }, + { + "name": "fetch the accounts", + "href": "https://www.w3.org/TR/fedcm-1/#fetch-the-accounts", + "html": "To fetch the accounts given an IdentityProviderAPIConfig config, an IdentityProviderRequestOptions provider, and globalObject, run the following steps. This\nreturns an IdentityProviderAccountList.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let accountsUrl be the result of computing the manifest URL given provider, config[\"accounts_endpoint\"], and globalObject.

" + }, + { + "html": "

If accountsUrl is failure, return an empty list.

" + }, + { + "html": "

Let request be a new request as follows:

\n
\n
url\n
\n

accountsUrl

\n
redirect mode\n
\n

\"error\"

\n
client\n
\n

null

\n
window\n
\n

\"no-window\"

\n
service-workers mode\n
\n

\"none\"

\n
destination\n
\n

\"webidentity\"

\n
origin\n
\n

a unique opaque origin

\n
header list\n
\n

a list containing a single header with name set to Accept and value set to application/json

\n
referrer policy\n
\n

\"no-referrer\"

\n
credentials mode\n
\n

\"include\"

\n
mode\n
\n

\"no-cors\"

\n
" + }, + { + "html": "

Let accountsList be null.

" + }, + { + "html": "Fetch request with request and globalObject, and with processResponseConsumeBody set to the following steps given a response response and responseBody:", + "rationale": "let", + "steps": [ + { + "html": "

Let json be the result of extract the JSON fetch response from response and responseBody.

" + }, + { + "html": "

Convert json to an IdentityProviderAccountList, and\nstore the result in accountsList.

" + }, + { + "html": "

If one of the previous two steps threw an exception, set accountsList to failure.

" + } + ] + }, + { + "html": "

Wait for accountsList to be set.

" + }, + { + "html": "

Return accountsList.

" + } + ] + }, + { + "name": "fetch the account picture", + "href": "https://www.w3.org/TR/fedcm-1/#fetch-the-account-picture", + "html": "To fetch the account picture given an IdentityProviderAccount account and a globalObject, run the following steps:", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let pictureUrl be the result of running parse url with account[\"picture\"] and globalObject.

" + }, + { + "html": "

If pictureUrl is failure, abort these steps. The user agent may use a placeholder image.

" + }, + { + "html": "

Let pictureRequest be a new request as follows:

\n
\n
url\n
\n

pictureUrl

\n
client\n
\n

null

\n
window\n
\n

\"no-window\"

\n
service-workers mode\n
\n

\"none\"

\n
destination\n
\n

\"image\"

\n
origin\n
\n

a unique opaque origin

\n
referrer policy\n
\n

\"no-referrer\"

\n
credentials mode\n
\n

\"omit\"

\n
mode\n
\n

\"no-cors\"

\n
" + }, + { + "html": "Fetch request with pictureRequest and globalObject, and with processResponseConsumeBody set to the following steps given a response and a responseBody:", + "rationale": "if", + "steps": [ + { + "html": "

If responseBody is null or failure, the user agent may choose an arbitrary placeholder image\nand associate it with the account.

" + }, + { + "html": "

Otherwise, decode responseBody into an image, and associate it with account if successful. This\nallows the user agent to use the decoded image in a dialog displaying account.

" + } + ] + } + ] + }, + { + "name": "fetch an identity assertion", + "href": "https://www.w3.org/TR/fedcm-1/#fetch-an-identity-assertion", + "html": "To fetch an identity assertion given a USVString accountId, a boolean disclosureTextShown, a boolean isAutoSelected, an IdentityProviderRequestOptions provider, an IdentityProviderAPIConfig config,\n and globalObject, run the following steps. This returns an IdentityCredential or failure.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let tokenUrl be the result of computing the manifest URL given provider, config[\"id_assertion_endpoint\"], and globalObject.

" + }, + { + "html": "

If tokenUrl is failure, return failure.

" + }, + { + "html": "

Let requestBody be the result of running urlencoded serializer with a list containing:

", + "ignored": [ + "(\"client_id\", provider’s clientId) (\"nonce\", provider’s nonce) (\"account_id\", accountId) (\"disclosure_text_shown\", disclosureTextShown) (\"is_auto_selected\", isAutoSelected)" + ] + }, + { + "html": "

Let request be a new request as follows:

\n
\n
url\n
\n

tokenUrl

\n
method\n
\n

\"POST\"

\n
body\n
\n

the UTF-8 encode of requestBody

\n
redirect mode\n
\n

\"error\"

\n
client\n
\n

null

\n
window\n
\n

\"no-window\"

\n
service-workers mode\n
\n

\"none\"

\n
destination\n
\n

\"webidentity\"

\n
origin\n
\n

globalObject’s associated document's origin

\n
header list\n
\n

a list containing a single header with name set to Accept and value set to application/x-www-form-urlencoded

\n
credentials mode\n
\n

\"include\"

\n
mode\n
\n

\"cors\"

\n
" + }, + { + "html": "

Let credential be null.

" + }, + { + "html": "Fetch request with request and globalObject, and with processResponseConsumeBody set to the following steps given a response response and responseBody:", + "rationale": "let", + "steps": [ + { + "html": "

Let json be the result of extract the JSON fetch response from response and responseBody.

" + }, + { + "html": "

Convert json to an IdentityProviderToken, token.

" + }, + { + "html": "

If one of the previous two steps threw an exception, set credential to failure\nand return.

" + }, + { + "html": "

Let credential be a new IdentityCredential given globalObject’s realm.

" + }, + { + "html": "

Set credential’s token to token.

" + }, + { + "html": "

Set credential’s isAutoSelected to isAutoSelected.

" + } + ] + }, + { + "html": "

Wait for credential to be set.

" + }, + { + "html": "

Return credential.

" + } + ] + }, + { + "name": "select an account", + "href": "https://www.w3.org/TR/fedcm-1/#select-an-account", + "html": "To select an account given an accountsList, run the following steps. This returns an IdentityProviderAccount or failure.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Assert accountsList’s size is greater than 1.

" + }, + { + "html": "

Display an account chooser displaying the options from accountsList.

" + }, + { + "html": "

Let account be the IdentityProviderAccount of the account that the user\nmanually selects from the accounts chooser, or failure if no account is selected.

" + }, + { + "html": "

Return account.

" + } + ] + }, + { + "name": "request permission to sign-up", + "href": "https://www.w3.org/TR/fedcm-1/#request-permission-to-sign-up", + "html": "To request permission to sign-up the user with a given an IdentityProviderAccount account,\nan IdentityProviderAPIConfig config, an IdentityProviderRequestOptions provider, and a globalObject, run the following steps. This returns a boolean.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Assert: These steps are running in parallel.

" + }, + { + "html": "

Let metadata be the result of running fetch the client metadata with config, provider, and globalObject.

" + }, + { + "html": "Prompt the user to gather explicit intent to create an account. The user agent MAY use the IdentityProviderBranding to inform the style choices of its UI. Additionally:", + "rationale": "if", + "steps": [ + { + "html": "

If metadata is not failure, metadata[\"privacy_policy_url\"]\nis defined and the provider’s clientId is not in the list of account[\"approved_clients\"], then the user agent MUST display\nthe metadata[\"privacy_policy_url\"] link.

" + }, + { + "html": "

If metadata is not failure, metadata[\"terms_of_service_url\"]\nis defined, and the provider’s clientId is not in the list of account[\"approved_clients\"], then the user agent MUST display\nthe metadata[\"terms_of_service_url\"] link.

" + }, + { + "html": "

The user agent MAY use the context to customize the\ndialog shown.

" + } + ] + }, + { + "html": "

If the user does not grant permission, return false.

" + }, + { + "html": "

Create a connection between the RP and the IdP account with provider, account, and globalObject.

" + }, + { + "html": "

Return true.

" + } + ] + }, + { + "name": "fetch the client metadata", + "href": "https://www.w3.org/TR/fedcm-1/#fetch-the-client-metadata", + "html": "To fetch the client metadata given an IdentityProviderAPIConfig config and\nan IdentityProviderRequestOptions provider, run the following steps. This returns an IdentityProviderClientMetadata or failure.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let clientMetadataUrl be the result of computing the manifest URL given provider, config[\"client_metadata_endpoint\"], and globalObject.

" + }, + { + "html": "

If clientMetadataUrl is failure, return failure.

" + }, + { + "html": "

Let request be a new request as follows:

\n
\n
url\n
\n

clientMetadataUrl

\n
redirect mode\n
\n

\"error\"

\n
client\n
\n

null

\n
window\n
\n

\"no-window\"

\n
service-workers mode\n
\n

\"none\"

\n
destination\n
\n

\"webidentity\"

\n
origin\n
\n

globalObject’s associated document's origin

\n
header list\n
\n

a list containing a single header with name set to Accept and value set to application/json

\n
credentials mode\n
\n

\"omit\"

\n
mode\n
\n

\"no-cors\"

\n
" + }, + { + "html": "

Let metadata be null.

" + }, + { + "html": "Fetch request with request and globalObject, and with processResponseConsumeBody set to the following steps given a response response and responseBody:", + "rationale": "let", + "steps": [ + { + "html": "

Let json be the result of extract the JSON fetch response from response and responseBody.

" + }, + { + "html": "

Convert json to an IdentityProviderClientMetadata,\nand store the result in metadata.

" + }, + { + "html": "

If one of the previous two steps threw an exception, set metadata to failure.

" + } + ] + }, + { + "html": "

Wait until metadata is set.

" + }, + { + "html": "

Return metadata.

" + } + ] + }, + { + "name": "parse url", + "href": "https://www.w3.org/TR/fedcm-1/#parse-url", + "html": "To parse url given a USVString stringUrl, a globalObject, and an optional baseUrl (default null), run the following steps. This returns a URL or failure.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let configUrl be null.

" + }, + { + "html": "

Queue a global task on the DOM manipulation task source given globalObject to set configUrl to the result of running url parser with stringUrl and baseUrl.

" + }, + { + "html": "

Wait for configUrl to be set.

" + }, + { + "html": "

Return configUrl.

" + } + ] + }, + { + "name": "fetch request", + "href": "https://www.w3.org/TR/fedcm-1/#fetch-request", + "html": "To fetch request given a request request, globalObject, and an algorithm processResponseConsumeBody, run the following steps:", + "rationale": ".algorithm", + "steps": [ + { + "html": "Queue a global task on the network task source given globalObject to:", + "rationale": "fetch", + "steps": [ + { + "html": "

Fetch request with processResponseConsumeBody set to processResponseConsumeBody.

" + } + ] + } + ] + }, + { + "name": "computing the manifest URL", + "href": "https://www.w3.org/TR/fedcm-1/#computing-the-manifest-url", + "html": "When computing the manifest URL given an IdentityProviderRequestOptions provider, a string manifestString, and globalObject, perform the following steps. This returns a URL or failure.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let configUrl be the result of running parse url with provider’s configURL and globalObject.

" + }, + { + "html": "

Let manifestUrl be the result of running parse url given manifestString (the relative\nURL), globalObject, and configUrl (the base URL).

" + }, + { + "html": "

Wait until manifestUrl is set.

" + }, + { + "html": "

If manifestUrl is failure, return failure.

" + }, + { + "html": "

If manifestUrl is not same origin with configUrl, return failure.

" + }, + { + "html": "

If manifestUrl is not a potentially trustworthy URL, return failure.

" + }, + { + "html": "

Return manifestUrl.

" + } + ] + }, + { + "name": "extract the JSON fetch response", + "href": "https://www.w3.org/TR/fedcm-1/#extract-the-json-fetch-response", + "html": "To extract the JSON fetch response given a response response and a responseBody, run the following steps. This returns an ordered map.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Assert: These steps are running on the networking task source.

" + }, + { + "html": "

If response is a network error or its status is not an ok status,\nthrow a new \"NetworkError\" DOMException.

" + }, + { + "html": "

Let mimeType be the result of extracting a MIME TYPE from response’s header list.

" + }, + { + "html": "

If mimeType is failure or is not a JSON MIME Type, throw a new \"NetworkError\" DOMException.

" + }, + { + "html": "

Let json be the result of parse JSON bytes to a JavaScript value passing responseBody.

" + }, + { + "html": "

If json is a parsing exception, throw a new \"NetworkError\" DOMException.

" + }, + { + "html": "

Return json.

" + } + ] + }, + { + "name": "show an IDP login dialog", + "href": "https://www.w3.org/TR/fedcm-1/#show-an-idp-login-dialog", + "html": "To show an IDP login dialog given an IdentityProviderAPIConfig config, an IdentityProviderConfig provider, and a globalObject, run the following steps. This returns\nsuccess or failure.", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Assert: these steps are running in parallel.

" + }, + { + "html": "

Let loginUrl be null.

" + }, + { + "html": "

Queue a global task on the DOM manipulation task source given globalObject to set loginUrl to the result of running url parser with config.login_url.

" + }, + { + "html": "

Wait until loginUrl is not null.

" + }, + { + "html": "

Assert: loginUrl is not failure (the user agent has previously checked that config.login_url is a valid URL).

" + }, + { + "html": "

Let queryList be a new list.

" + }, + { + "html": "

If provider’s loginHint is not empty, append (\"login_hint\", loginHint) to queryList.

" + }, + { + "html": "

If provider’s domainHint is not empty, append (\"domain_hint\", domainHint) to queryList.

" + }, + { + "html": "If queryList is not empty:", + "rationale": "let", + "steps": [ + { + "html": "

Let queryParameters be the result of the urlencoded serializer with queryList.

" + }, + { + "html": "

If loginUrl’s query is not null or empty, prepend \"&\" to queryParameters.

" + }, + { + "html": "

Append queryParameters to loginUrl’s query.

" + } + ] + }, + { + "html": "

Create a fresh top-level traversable with loginUrl.

" + }, + { + "html": "

The user agent MAY set up browsing context features or otherwise\naffect the presentation of this traversable in an implementation-defined\nway.

" + }, + { + "html": "IdentityProvider.close is called in the\ncontext of this new traversable:", + "rationale": "close", + "steps": [ + { + "html": "

Close the traversable.

" + }, + { + "html": "

Let loginStatus be the result of get the login status with the origin of the login_url.

" + }, + { + "html": "

If loginStatus is logged-in, return success.

" + }, + { + "html": "

Otherwise, return failure.

" + } + ] + } + ] + }, + { + "name": "getUserInfo", + "html": "When invoking the getUserInfo() method given an IdentityProviderConfig provider, perform the following steps:", + "rationale": ".algorithm", + "steps": [ + { + "html": "

Let globalObject be the current global object.

" + }, + { + "html": "

Let document be globalObject’s associated Document.

" + }, + { + "html": "

If document is not allowed to use the identity-credentials-get policy-controlled feature, throw a \"NotAllowedError\" DOMException.

" + }, + { + "html": "

If there does not exist an account account such that connected accounts set contains the result of compute the connected account key given account, provider, and globalObject, then reject promise with a \"NetworkError\" DOMException. This check can be performed by iterating over the connected accounts set or by keeping a separate data structure to make this lookup fast.

" + }, + { + "html": "

Let configUrl be the result of running parse url with provider’s configURL and globalObject.

" + }, + { + "html": "

If configUrl is failure, throw an \"InvalidStateError\" DOMException.

" + }, + { + "html": "

If document’s origin is not same origin as configUrl’s origin,\nthrow an \"InvalidStateError\" DOMException.

" + }, + { + "html": "

Run a Content Security Policy Level 3 check with a connect-src directive on the URL\npassed as configUrl. If it fails, throw a new \"NetworkError\" DOMException.

" + }, + { + "html": "

If globalObject’s navigable is a top-level traversable, throw a new\n\"NetworkError\" DOMException.

" + }, + { + "html": "

If the user has disabled the FedCM API on the globalObject’s navigable's top-level traversable, throw a new \"NetworkError\" DOMException.

" + }, + { + "html": "

Let promise be a new Promise.

" + }, + { + "html": "Perform the following steps in parallel:", + "rationale": "let", + "steps": [ + { + "html": "

Let config be the result of running fetch the config file with provider and globalObject.

" + }, + { + "html": "

If config is failure, reject promise with a new \"NetworkError\" DOMException.

" + }, + { + "html": "

Let accountsList be the result of fetch the accounts with config, provider,\nand globalObject.

" + }, + { + "html": "

Let hasAccountEligibleForAutoReauthentication be false.

" + }, + { + "html": "For each account in accountsList:", + "rationale": "if", + "steps": [ + { + "html": "

If account[\"approved_clients\"] is not empty and it does not contain provider’s clientId, continue.

" + }, + { + "html": "

If account is eligible for auto reauthentication given provider and globalObject, set hasAccountEligibleForAutoReauthentication to true.

" + } + ] + }, + { + "html": "

If hasAccountEligibleForAutoReauthentication is false, reject promise with a new\n\"NetworkError\" DOMException.

" + }, + { + "html": "

Let userInfoList be a new list.

" + }, + { + "html": "For each account in accountsList:", + "rationale": "append", + "steps": [ + { + "html": "

Append an IdentityUserInfo to userInfoList with the following values:

\n
\n
email\n
\n

account[\"email\"]

\n
name\n
\n

account[\"name\"]

\n
givenName\n
\n

account[\"given_name\"]

\n
picture\n
\n

account[\"picture\"]

\n
" + } + ] + }, + { + "html": "

Resolve a new Promise with userInfoList.

" + } + ] + } + ] + }, + { + "html": "When validating capabilities, the extension-specific substeps to validate \"fedcm:accounts\" with value are the following:", + "rationale": "if", + "steps": [ + { + "html": "

If value is not a boolean return a WebDriver Error with error code invalid argument.

" + }, + { + "html": "

Otherwise, let deserialized be set to value.

" + } + ] + }, + { + "html": "When matching capabilities, the extension-specific steps to match \"fedcm:accounts\" with value are the following:", + "rationale": "if", + "steps": [ + { + "html": "

If value is true and the endpoint node does not support any of the Federated Credential Management commands,\nthe match is unsuccessful.

" + }, + { + "html": "

Otherwise, the match is successful.

" + } + ] + }, + { + "html": "The remote end steps are:", + "rationale": "if", + "steps": [ + { + "html": "

If no FedCM dialog is currently open, return a WebDriver error with error code no such alert.

" + }, + { + "html": "

Close the dialog and continue the create an IdentityCredential algorithm\nas if the user had canceled the dialog without choosing an account.

" + }, + { + "html": "

Return success with data null.

" + } + ] + }, + { + "html": "The remote end steps are:", + "rationale": "if", + "steps": [ + { + "html": "

If parameters is not a JSON Object, return a WebDriver error with error code invalid argument.

" + }, + { + "html": "

If no FedCM dialog is currently open, return a WebDriver error with error code no such alert.

" + }, + { + "html": "

Let accountIndex be the result of getting a property named \"accountIndex\" from parameters.

" + }, + { + "html": "

If accountIndex is undefined or is less than 0 or greater than or\nequal to the number of accounts that the user can choose from in the\ncurrent flow, return a WebDriver error with error code invalid argument.

" + }, + { + "html": "

Close the dialog and continue the create an IdentityCredential algorithm\nas if the user had selected the account indicated by accountIndex and granted permission to sign-up, if applicable.

" + }, + { + "html": "

Return success with data null.

" + } + ] + }, + { + "html": "The remote end steps are:", + "rationale": "if", + "steps": [ + { + "html": "

If parameters is not a JSON Object, return a WebDriver error with error code invalid argument.

" + }, + { + "html": "

Let dialogButton be the result of getting a property named \"dialogButton\" from parameters.

" + }, + { + "html": "

If dialogButton is not a string that is \"ConfirmIdpLoginContinue\", return\na WebDriver error with error code invalid argument.

" + }, + { + "html": "

If no FedCM dialog is currently open or the dialog is not a confirm IDP\nlogin dialog, return a WebDriver error with error code no\nsuch alert.

" + }, + { + "html": "

Act as if the user had clicked the \"continue\" button in the confirm IDP\nlogin dialog and initiate the login flow.

" + }, + { + "html": "

Return success with data null.

" + } + ] + }, + { + "html": "The remote end steps are:", + "rationale": "if", + "steps": [ + { + "html": "

If no FedCM dialog is currently open, return a WebDriver error with error code no such alert.

" + }, + { + "html": "

Let accounts be the list of accounts that the user can or could choose\nfrom in the current flow.

" + }, + { + "html": "

Let list be an empty list.

" + }, + { + "html": "For each account in accounts:", + "rationale": "let", + "steps": [ + { + "html": "

Let accountState be the result of running the compute the connection status algorithm given account and the IdentityProviderRequestOptions of the IDP account belongs to

" + }, + { + "html": "

Append a dictionary to list with the following properties:

", + "ignored": [ + "accountId set to the account’s id email set to the account’s email name set to the account’s name givenName set to the account’s given_name, if present pictureUrl set to the account’s picture, if present idpConfigUrl set to the configURL of the IDP this account belongs to loginState to \"SignUp\" if accountState is disconnected and \"SignIn\" otherwise termsOfServiceUrl to the terms_of_service_url if one was provided and the loginState is \"SignUp\", otherwise undefined privacyPolicyUrl to the privacy_policy_url if one was provided and the loginState is \"SignUp\", otherwise undefined" + ] + } + ] + }, + { + "html": "

Return success with data list.

" + } + ] + }, + { + "html": "The remote end steps are:", + "rationale": "if", + "steps": [ + { + "html": "

If no FedCM dialog is currently open, return a WebDriver error with error code no such alert.

" + }, + { + "html": "

Let data be a dictionary with an object with properties as follows:

", + "ignored": [ + "title set to the title of the open dialog subtitle set to the subtitle of the open dialog, if there is one" + ] + }, + { + "html": "

Return success with data data.

" + } + ] + }, + { + "html": "The remote end steps are:", + "rationale": "if", + "steps": [ + { + "html": "

If no FedCM dialog is currently open, return a WebDriver error with error code no such alert.

" + }, + { + "html": "

Let type be a string that is \"AutoReauthn\" if the user is being auto-reauthenticated,\nor \"AccountChooser\" if the dialog is an account chooser, or \"ConfirmIdpLogin\" if the\ndialog is a confirm IDP login dialog.

" + }, + { + "html": "

Return success with data type.

" + } + ] + }, + { + "html": "The remote end steps are:", + "rationale": "if", + "steps": [ + { + "html": "

If parameters is not a JSON Object, return a WebDriver error with error code invalid argument.

" + }, + { + "html": "

Let enabled be the result of getting a property named \"enabled\" from parameters.

" + }, + { + "html": "

If enabled is undefined or is not a boolean, return a WebDriver error with error code invalid argument.

" + }, + { + "html": "

If enabled is false, disables the promise rejection delay; otherwise,\nre-enables it.

" + }, + { + "html": "

Return success with data null.

" + } + ] + }, + { + "html": "The remote end steps are:", + "rationale": "if", + "steps": [ + { + "html": "

If the user agent uses a cooldown delay, which disables the API for an\namount of time after the user dismissed the dialog, then this command\nresets that cooldown such that the next FedCM call can succeed again.

" + }, + { + "html": "

Return success with data null.

" + } + ] + } + ] +} \ No newline at end of file diff --git a/tr/algorithms/html-ruby-extensions.json b/tr/algorithms/html-ruby-extensions.json new file mode 100644 index 000000000000..378976177e7e --- /dev/null +++ b/tr/algorithms/html-ruby-extensions.json @@ -0,0 +1,20 @@ +{ + "spec": { + "title": "HTML Ruby Markup Extensions", + "url": "https://www.w3.org/TR/html-ruby-extensions/" + }, + "algorithms": [ + { + "html": "There are, however, differences in how the various ruby related elements can be used,\n\tthe two essential ones being:", + "rationale": "while", + "steps": [ + { + "html": "In addition to the ability to interleave rt elements between anonymous ruby bases,\n\t\t\tthe previously obsoleted rb element is restored,\n\t\t\tenabling the so-called tabular markup pattern\n\t\t\twhere several consecutive bases are followed\n\t\t\ttheir respective annotations: \n
<ruby>\n  <rb><rb><rb>…\n  <rt><rt><rt>…\n</ruby>\n
\n

Without rb and tabular markup,\n\t\t\tin order to have the individual base/annotation pairing\n\t\t\tnecessary to correct handle\n\t\t\tthe various possible presentations of ruby on compound words,\n\t\t\tinterleaving the rt elements between segments of base text would be required.\n\t\t\tHowever, such this markup would not enable correct ruby inlining.

\n

Moreover, interleaved markup is also a source of issues\n\t\t\twith operations like\n\t\t\tcopy&paste,\n\t\t\tsearching through the document,\n\t\t\tor speech synthesis,\n\t\t\tdue to the base text being interrupted by the annotations.

" + }, + { + "html": "This document defines a different model for handling multiple levels of annotations: \n
    \n
  • \n The ability to associate multiple consecutive rt elements with the preceding base text segment\n\t\t\t\t\twithout using explicit annotation containers\n\t\t\t\t\tis dropped.\n\t\t\t\t\tThis pattern does not have interoperable implementations with the semantics intended by the HTML Standard,\n\t\t\t\t\tand is in tension with tabular markup. \n

    Instead, the previously obsoleted rtc element is restored,\n\t\t\t\t\tproviding the ability to indicate multiple annotation ranges over the same base(s),\n\t\t\t\t\tusing either interleaved or tabular markup patterns.

    \n
  • \n While the ability to nest ruby is retained,\n\t\t\t\t\tspecialized semantics for nested ruby are dropped.\n\t\t\t\t\tThat markup pattern is strictly less expressive\n\t\t\t\t\tthan using rtc for additional levels of annotations,\n\t\t\t\t\tsince it does not allow pairing individual annotations in the outer ruby\n\t\t\t\t\twith individual bases in the inner ruby.\n\t\t\t\t\tThe example about “上手” can therefore be realized using rtc but could not be with nested ruby. \n

    Nested ruby as defined in the HTML Standard also does not have interoperable implementations\n\t\t\t\t\tbeyond the ordinary semantics of nesting,\n\t\t\t\t\tand is at odds with the layout model of CSS Ruby Annotation Layout Module Level 1.

    \n
" + } + ] + } + ] +} \ No newline at end of file diff --git a/tr/algorithms/trusted-types.json b/tr/algorithms/trusted-types.json index 03ac9ee83adb..495b94d98f76 100644 --- a/tr/algorithms/trusted-types.json +++ b/tr/algorithms/trusted-types.json @@ -465,6 +465,27 @@ { "html": "

Let result be \"Allowed\".

" }, + { + "html": "

Let sample be source.

" + }, + { + "html": "If sink is \"Function\", then:", + "rationale": "if", + "steps": [ + { + "html": "

If sample starts with \"function anonymous\", strip that from sample.

" + }, + { + "html": "

Otherwise if sample starts with \"async function anonymous\", strip that from sample.

" + }, + { + "html": "

Otherwise if sample starts with \"function* anonymous\", strip that from sample.

" + }, + { + "html": "

Otherwise if sample starts with \"async function* anonymous\", strip that from sample.

" + } + ] + }, { "html": "For each policy in global’s CSP list:", "rationale": "if", @@ -485,10 +506,10 @@ "html": "

Set violation’s resource to \"trusted-types-sink\".

" }, { - "html": "

Let trimmedSource be the substring of source, containing its first 40 characters.

" + "html": "

Let trimmedSample be the substring of sample, containing its first 40 characters.

" }, { - "html": "

Set violation’s sample to be the result of concatenating the list « sink, trimmedSource « using \"|\" as a separator.

" + "html": "

Set violation’s sample to be the result of concatenating the list « sink, trimmedSample « using \"|\" as a separator.

" }, { "html": "

Execute Report a violation on violation.

" diff --git a/tr/algorithms/webgpu.json b/tr/algorithms/webgpu.json index 89a050b2add2..33d243755cad 100644 --- a/tr/algorithms/webgpu.json +++ b/tr/algorithms/webgpu.json @@ -75,7 +75,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "

If usageScope[subresource] does not exist, set it to [].

" + "html": "

If usageScope[subresource] does not exist, set it to [].

" }, { "html": "

Append usage to usageScope[subresource].

" @@ -232,7 +232,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "

Assert idlValue is a finite value, since it is not unrestricted double or unrestricted float.

" + "html": "

Assert idlValue is a finite value, since it is not unrestricted double or unrestricted float.

" }, { "html": "

Let v be the ECMAScript Number resulting from ! converting idlValue to an ECMAScript value.

" @@ -286,7 +286,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "If the components of format (assert they all have the same type) are:", + "html": "If the components of format (assert they all have the same type) are:", "rationale": ".switch", "steps": [ { @@ -486,7 +486,7 @@ "html": "

Lose the device(device, \"unknown\").

" }, { - "html": "

Assert adapter.[[state]] is \"expired\".

" + "html": "

Assert adapter.[[state]] is \"expired\".

" } ], "additional": [ @@ -554,7 +554,7 @@ "html": "

Set this.[[device]].[[destroy started]] to true.

" }, { - "html": "

Once:

\n
    \n
  • \n

    All currently-enqueued operations on any queue on this device have completed, and

    \n
  • \n

    Any device timeline steps that were listening for completion of\nqueue operations have completed\n(asserting that no new listeners were added after [[destroy started]] was set):

    \n
\n

Then issue the subsequent steps on the current timeline.

" + "html": "

Once:

\n
    \n
  • \n

    All currently-enqueued operations on any queue on this device have completed, and

    \n
  • \n

    Any device timeline steps that were listening for completion of\nqueue operations have completed\n(asserting that no new listeners were added after [[destroy started]] was set):

    \n
\n

Then issue the subsequent steps on the current timeline.

" } ] }, @@ -630,7 +630,7 @@ "rationale": "if", "steps": [ { - "html": "

If any of the following requirements are unmet, generate a validation error, invalidate b, and stop.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, generate a validation error, invalidate b and return.

\n
\n \n
" } ] }, @@ -843,7 +843,7 @@ "rationale": "assert", "steps": [ { - "html": "

Assert p is rejected.

" + "html": "

Assert p is rejected.

" }, { "html": "

Return.

" @@ -851,10 +851,10 @@ ] }, { - "html": "

Assert p is pending.

" + "html": "

Assert p is pending.

" }, { - "html": "

Assert internalStateAtCompletion is \"unavailable\".

" + "html": "

Assert internalStateAtCompletion is \"unavailable\".

" }, { "html": "If this allocation fails:", @@ -890,7 +890,7 @@ "rationale": "assert", "steps": [ { - "html": "

Assert p is already rejected.

" + "html": "

Assert p is already rejected.

" }, { "html": "

Return.

" @@ -898,7 +898,7 @@ ] }, { - "html": "

Assert p is still pending.

" + "html": "

Assert p is still pending.

" }, { "html": "

Set this.[[pending_map]] to null.

" @@ -941,7 +941,7 @@ ] }, { - "html": "

If any of the following conditions are unsatisfied, throw an OperationError and stop.

\n
\n
    \n
  • \n

    this.[[mapping]] is not null.

    \n
  • \n

    offset is a multiple of 8.

    \n
  • \n

    rangeSize is a multiple of 4.

    \n
  • \n

    offsetthis.[[mapping]].range[0].

    \n
  • \n

    offset + rangeSizethis.[[mapping]].range[1].

    \n
  • \n

    [offset, offset + rangeSize) does not overlap another range in this.[[mapping]].views.

    \n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, throw an OperationError and return.

\n
\n
    \n
  • \n

    this.[[mapping]] is not null.

    \n
  • \n

    offset is a multiple of 8.

    \n
  • \n

    rangeSize is a multiple of 4.

    \n
  • \n

    offsetthis.[[mapping]].range[0].

    \n
  • \n

    offset + rangeSizethis.[[mapping]].range[1].

    \n
  • \n

    [offset, offset + rangeSize) does not overlap another range in this.[[mapping]].views.

    \n
\n \n
" }, { "html": "

Let data be this.[[mapping]].data.

" @@ -1024,7 +1024,7 @@ "html": "

If any of the following conditions are unsatisfied, return.

\n
\n \n
" }, { - "html": "

Assert this.[[internal state]] is \"unavailable\".

" + "html": "

Assert this.[[internal state]] is \"unavailable\".

" }, { "html": "If bufferUpdate is not null:", @@ -1169,7 +1169,7 @@ }, { "case": "\"3d\"", - "html": "

Let m = max(max(size.width, size.height), size.depthOrArrayLayer).

" + "html": "

Let m = max(max(size.width, size.height), size.depthOrArrayLayers).

" } ] } @@ -1237,7 +1237,7 @@ "rationale": "if", "steps": [ { - "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate t, and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate t and return.

\n
\n \n
" }, { "html": "

Set t.[[viewFormats]] to descriptor.viewFormats.

" @@ -1392,7 +1392,7 @@ "html": "

Let resolved be a copy of descriptor.

" }, { - "html": "If resolved.format is not provided:", + "html": "If resolved.format is not provided:", "rationale": "let", "steps": [ { @@ -1404,10 +1404,10 @@ ] }, { - "html": "

If resolved.mipLevelCount is not provided:\nset resolved.mipLevelCount to texture.mipLevelCountresolved.baseMipLevel.

" + "html": "

If resolved.mipLevelCount is not provided:\nset resolved.mipLevelCount to texture.mipLevelCountresolved.baseMipLevel.

" }, { - "html": "If resolved.dimension is not provided and texture.dimension is:", + "html": "If resolved.dimension is not provided and texture.dimension is:", "rationale": ".switch", "steps": [ { @@ -1430,7 +1430,7 @@ ] }, { - "html": "If resolved.arrayLayerCount is not provided and resolved.dimension is:", + "html": "If resolved.arrayLayerCount is not provided and resolved.dimension is:", "rationale": ".switch", "steps": [ { @@ -1567,7 +1567,7 @@ "rationale": "if", "steps": [ { - "html": "

If source is not origin-clean,\nthrow a SecurityError and stop.

" + "html": "

If source is not origin-clean,\nthrow a SecurityError and return.

" }, { "html": "

Let usability be ? check the usability of the image argument(source).

" @@ -1644,7 +1644,7 @@ "rationale": "if", "steps": [ { - "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate s, and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate s and return.

\n
\n \n
" }, { "html": "

Set s.[[descriptor]] to descriptor.

" @@ -1736,7 +1736,7 @@ "rationale": "if", "steps": [ { - "html": "

If entry.storageTexture is provided:

", + "html": "

If entry.storageTexture is provided:

", "ignored": [ "? Validate texture format required features for entry.storageTexture.format with this.[[device]]." ] @@ -1761,13 +1761,13 @@ "rationale": "if", "steps": [ { - "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate layout, and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate layout and return.

\n
\n \n
" }, { "html": "

Set layout.[[descriptor]] to descriptor.

" }, { - "html": "

Set layout.[[dynamicOffsetCount]] to the number of\nentries in descriptor where buffer is provided and buffer.hasDynamicOffset is true.

" + "html": "

Set layout.[[dynamicOffsetCount]] to the number of\nentries in descriptor where buffer is provided and buffer.hasDynamicOffset is true.

" }, { "html": "

Set layout.[[exclusivePipeline]] to null.

" @@ -1803,16 +1803,16 @@ "html": "

Let bindGroupLayoutEntry be bindGroup.[[layout]].[[entryMap]][bindGroupEntry.binding].

" }, { - "html": "

If bindGroupLayoutEntry.buffer is not provided, continue.

" + "html": "

If bindGroupLayoutEntry.buffer is not provided, continue.

" }, { "html": "

Let bound be a copy of bindGroupEntry.resource.

" }, { - "html": "

Assert bound is a GPUBufferBinding.

" + "html": "

Assert bound is a GPUBufferBinding.

" }, { - "html": "If bindGroupLayoutEntry.buffer.hasDynamicOffset:", + "html": "If bindGroupLayoutEntry.buffer.hasDynamicOffset:", "rationale": "increment", "steps": [ { @@ -1860,7 +1860,7 @@ "html": "

Let limits be this.[[device]].[[limits]].

" }, { - "html": "If the defined binding member for layoutBinding is", + "html": "If the defined binding member for layoutBinding is:", "rationale": ".switch", "steps": [ { @@ -1896,11 +1896,11 @@ }, { "case": "storageTexture", - "html": "" + "html": "" }, { "case": "buffer", - "html": "If layoutBinding.buffer.type is", + "html": "If layoutBinding.buffer.type is", "rationale": ".switch", "steps": [ { @@ -1946,7 +1946,7 @@ "html": "

Each subresource seen by resource is added to [[usedResources]] as internalUsage.

" }, { - "html": "

Let bindingDescriptor.[[prevalidatedSize]] be false if the defined binding member for layoutBinding is buffer and layoutBinding.buffer.minBindingSize is 0, and true otherwise.

" + "html": "

Let bindingDescriptor.[[prevalidatedSize]] be false if the defined binding member for layoutBinding is buffer and layoutBinding.buffer.minBindingSize is 0, and true otherwise.

" } ] } @@ -1959,7 +1959,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "If binding.size is not provided:", + "html": "If binding.size is not provided:", "rationale": "return", "steps": [ { @@ -2002,7 +2002,7 @@ "html": "

Let allEntries be the result of concatenating bgl.[[descriptor]].entries for all bgl in descriptor.bindGroupLayouts.

" }, { - "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate pl, and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate pl and return.

\n
\n \n
" }, { "html": "

Set the pl.[[bindGroupLayouts]] to descriptor.bindGroupLayouts.

" @@ -2236,7 +2236,7 @@ "rationale": "if", "steps": [ { - "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate layout, and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate layout and return.

\n
\n \n
" }, { "html": "

Initialize layout so it is a copy of this.[[layout]].[[bindGroupLayouts]][index].

" @@ -2272,7 +2272,7 @@ "html": "

Let shaderStage be the GPUShaderStageFlags for the shader stage\nat which stageDesc is used in pipeline.

" }, { - "html": "

Let entryPoint be get the entry point(shaderStage, stageDesc). Assert entryPoint is not null.

" + "html": "

Let entryPoint be get the entry point(shaderStage, stageDesc). Assert entryPoint is not null.

" }, { "html": "For each resource resource statically used by entryPoint:", @@ -2344,12 +2344,12 @@ "rationale": "set", "steps": [ { - "html": "

Set bufferLayout.type to \"storage\".

" + "html": "

Set bufferLayout.type to \"storage\".

" } ] }, { - "html": "

Set entry.buffer to bufferLayout.

" + "html": "

Set entry.buffer to bufferLayout.

" } ] }, @@ -2441,7 +2441,7 @@ ] }, { - "html": "

Set entry.storageTexture to storageTextureLayout.

" + "html": "

Set entry.storageTexture to storageTextureLayout.

" } ] }, @@ -2462,11 +2462,11 @@ ] }, { - "html": "If resource is for a buffer binding and entry has greater buffer.minBindingSize than previousEntry:", + "html": "If resource is for a buffer binding and entry has greater buffer.minBindingSize than previousEntry:", "rationale": "set", "steps": [ { - "html": "

Set previousEntry.buffer.minBindingSize to entry.buffer.minBindingSize.

" + "html": "

Set previousEntry.buffer.minBindingSize to entry.buffer.minBindingSize.

" } ] }, @@ -2551,7 +2551,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "If descriptor.entryPoint is provided:", + "html": "If descriptor.entryPoint is provided:", "rationale": "if", "steps": [ { @@ -2612,7 +2612,7 @@ ] }, { - "html": "

For each pipeline-overridable constant identifier string key which is statically used by entryPoint:

\n " + "html": "

For each pipeline-overridable constant identifier string key which is statically used by entryPoint:

\n " }, { "html": "

Pipeline-creation program errors must not\nresult from the rules of the [WGSL] specification.

" @@ -2630,7 +2630,7 @@ "steps": [ { "case": "buffer", - "html": "If entry.buffer.type is:", + "html": "If entry.buffer.type is:", "rationale": ".switch", "steps": [ { @@ -2678,7 +2678,7 @@ }, { "case": "storageTexture", - "html": "If entry.storageTexture.viewDimension is:", + "html": "If entry.storageTexture.viewDimension is:", "rationale": ".switch", "steps": [ { @@ -2761,7 +2761,7 @@ "html": "

Let layout be a new default pipeline layout for pipeline if descriptor.layout is \"auto\",\nand descriptor.layout otherwise.

" }, { - "html": "

All of the requirements in the following steps must be met.\nIf any are unmet, generate a validation error, invalidate pipeline, and stop.

\n
\n \n
", + "html": "

All of the requirements in the following steps must be met.\nIf any are unmet, generate a validation error, invalidate pipeline and return.

\n
\n \n
", "rationale": "let", "steps": [ { @@ -2771,7 +2771,7 @@ "html": "

validating GPUProgrammableStage(COMPUTE, descriptor.compute, layout, this) must succeed.

" }, { - "html": "

Let entryPoint be get the entry point(COMPUTE, descriptor.compute).

\n

Assert entryPoint is not null.

" + "html": "

Let entryPoint be get the entry point(COMPUTE, descriptor.compute).

\n

Assert entryPoint is not null.

" }, { "html": "

Let workgroupStorageUsed be the sum of roundUp(16, SizeOf(T)) over each\ntype T of all variables with address space \"workgroup\" statically used by entryPoint.

\n

workgroupStorageUsed must be ≤ device.limits.maxComputeWorkgroupStorageSize.

" @@ -2785,7 +2785,7 @@ ] }, { - "html": "

If any pipeline-creation uncategorized errors result from the implementation of pipeline creation, generate an internal error, invalidate pipeline, and stop.

" + "html": "

If any pipeline-creation uncategorized errors result from the implementation of pipeline creation, generate an internal error, invalidate pipeline and return.

" }, { "html": "

Set pipeline.[[layout]] to layout.

" @@ -2880,7 +2880,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "If descriptor.fragment is provided:", + "html": "If descriptor.fragment is provided:", "rationale": "for", "steps": [ { @@ -2892,7 +2892,7 @@ ] }, { - "html": "

If descriptor.depthStencil is provided:

", + "html": "

If descriptor.depthStencil is provided:

", "ignored": [ "? Validate texture format required features of descriptor.depthStencil.format with this.[[device]]." ] @@ -2918,10 +2918,25 @@ "html": "

Let layout be a new default pipeline layout for pipeline if descriptor.layout is \"auto\",\nand descriptor.layout otherwise.

" }, { - "html": "

If any of the following conditions are unsatisfied: generate a validation error, invalidate pipeline, and stop.

\n
\n \n
" + "html": "

All of the requirements in the following steps must be met.\nIf any are unmet, invalidate pipeline and return.

\n
\n \n
", + "rationale": "let", + "steps": [ + { + "html": "

layout must be valid to use with this.

" + }, + { + "html": "

validating GPURenderPipelineDescriptor(descriptor, layout, this) must succeed.

" + }, + { + "html": "

Let vertexBufferCount be the index of the last non-null entry in descriptor.vertex.buffers,\nplus 1; or 0 if there are none.

" + }, + { + "html": "

layout.[[bindGroupLayouts]].size + vertexBufferCount must be ≤ this.[[device]].[[limits]].maxBindGroupsPlusVertexBuffers.

" + } + ] }, { - "html": "

If any pipeline-creation uncategorized errors result from the implementation of pipeline creation, generate an internal error, invalidate pipeline, and stop.

" + "html": "

If any pipeline-creation uncategorized errors result from the implementation of pipeline creation, generate an internal error, invalidate pipeline and return.

" }, { "html": "

Set pipeline.[[descriptor]] to descriptor.

" @@ -2940,7 +2955,7 @@ "rationale": "if", "steps": [ { - "html": "If depthStencil.depthWriteEnabled is provided:", + "html": "If depthStencil.depthWriteEnabled is provided:", "rationale": "set", "steps": [ { @@ -3076,7 +3091,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "

Return true if all of the following conditions are satisfied:

\n
\n \n
", + "html": "

Return true if all of the following conditions are satisfied:

\n
\n \n
", "ignored": [ "descriptor.fragment must be provided. descriptor.fragment.targets[0] must exist and be non-null. descriptor.fragment.targets[0].format must be a GPUTextureFormat which is blendable and has an alpha channel." ] @@ -3123,7 +3138,7 @@ "html": "

Return false if any of the following requirements are unmet:

\n
    \n
  • \n

    There must be no more than maxVertexShaderOutputVariables user-defined outputs for descriptor.vertex.

    \n
  • \n

    The location of each user-defined output of descriptor.vertex must be\n≤ maxVertexShaderOutputLocation.

    \n
" }, { - "html": "If descriptor.fragment is provided:", + "html": "If descriptor.fragment is provided:", "rationale": "let", "steps": [ { @@ -3142,7 +3157,7 @@ "html": "

Return false if any of the following requirements are unmet:

\n
    \n
  • \n

    For each user-defined input of descriptor.fragment there\nmust be a user-defined output of descriptor.vertex that location, type, and interpolation of the input.

    \n \n
  • \n

    There must be no more than maxFragmentShaderInputVariables user-defined inputs for descriptor.fragment.

    \n
" }, { - "html": "

Assert that the location of each user-defined input of descriptor.fragment is less\nthan device.limits.maxInterStageShaderVariables.\n(This follows from the above rules.)

" + "html": "

Assert that the location of each user-defined input of descriptor.fragment is less\nthan device.limits.maxInterStageShaderVariables.\n(This follows from the above rules.)

" } ] }, @@ -3158,7 +3173,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "

Return true if all of the following conditions are satisfied:

\n
\n \n
" + "html": "

Return true if all of the following conditions are satisfied:

\n
\n \n
" } ] }, @@ -3299,7 +3314,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "

Return true if, and only if, all of the following conditions are satisfied:

\n
\n \n
" + "html": "

Return true if, and only if, all of the following conditions are satisfied:

\n
\n \n
" } ] }, @@ -3341,7 +3356,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "

Return true, if and only if, all of the following conditions are satisfied:

\n
\n \n
" + "html": "

Return true, if and only if, all of the following conditions are satisfied:

\n
\n \n
" } ] }, @@ -3378,7 +3393,7 @@ "rationale": "assert", "steps": [ { - "html": "

Assert index is 0

" + "html": "

Assert index is 0

" }, { "html": "

Let depthSliceOrLayer be texture

" @@ -3527,7 +3542,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "

Let:

\n " + "html": "

Let:

\n " }, { "html": "

Fail if the following input validation requirements are not met:

\n
\n \n
" @@ -3604,7 +3619,7 @@ }, { "case": "\"ended\"", - "html": "

Generate a validation error, and return false.

" + "html": "

Generate a validation error, and return false.

" } ] } @@ -3656,7 +3671,7 @@ "rationale": "if", "steps": [ { - "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate e, and stop.

\n
\n
    \n
  • \n

    this must not be lost.

    \n
\n
" + "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate e and return.

\n
\n
    \n
  • \n

    this must not be lost.

    \n
\n
" } ] }, @@ -3671,7 +3686,7 @@ "rationale": "if", "steps": [ { - "html": "

If colorAttachment.clearValue is not null.

", + "html": "

If colorAttachment.clearValue is provided:

", "ignored": [ "? validate GPUColor shape(colorAttachment.clearValue)." ] @@ -3709,7 +3724,7 @@ "rationale": "add", "steps": [ { - "html": "

Add [colorAttachment.view, colorAttachment.depthSlice] to attachmentRegions.

" + "html": "

Add [colorAttachment.view, colorAttachment.depthSlice ?? null] to attachmentRegions.

" }, { "html": "If colorAttachment.resolveTarget is not null:", @@ -3729,7 +3744,7 @@ "html": "

Add each texture subresource in attachmentRegions to pass.[[usage scope]] with usage attachment.

" }, { - "html": "

Let depthStencilAttachment be descriptor.depthStencilAttachment,\nor null if not provided.

" + "html": "

Let depthStencilAttachment be descriptor.depthStencilAttachment.

" }, { "html": "If depthStencilAttachment is not null:", @@ -3756,20 +3771,20 @@ "html": "

Set pass.[[layout]] to derive render targets layout from pass(descriptor).

" }, { - "html": "If descriptor.timestampWrites is provided:", + "html": "If descriptor.timestampWrites is provided:", "rationale": "let", "steps": [ { "html": "

Let timestampWrites be descriptor.timestampWrites.

" }, { - "html": "

If timestampWrites.beginningOfPassWriteIndex is provided, append a GPU command to this.[[commands]] with the following steps:

\n
\n \n
", + "html": "

If timestampWrites.beginningOfPassWriteIndex is provided, append a GPU command to this.[[commands]] with the following steps:

\n
\n \n
", "ignored": [ "Before the pass commands begin executing, write the current queue timestamp into index timestampWrites.beginningOfPassWriteIndex of timestampWrites.querySet." ] }, { - "html": "

If timestampWrites.endOfPassWriteIndex is provided, set pass.[[endTimestampWrite]] to a GPU command with the following steps:

\n
\n \n
", + "html": "

If timestampWrites.endOfPassWriteIndex is provided, set pass.[[endTimestampWrite]] to a GPU command with the following steps:

\n
\n \n
", "ignored": [ "After the pass commands finish executing, write the current queue timestamp into index timestampWrites.endOfPassWriteIndex of timestampWrites.querySet." ] @@ -3865,7 +3880,7 @@ "steps": [ { "case": "Not provided", - "html": "

Assert that depthStencilAttachment.depthReadOnly is true and ensure the contents of the depth subresource of depthStencilView are loaded into the framebuffer memory associated with depthStencilView.

" + "html": "

Assert that depthStencilAttachment.depthReadOnly is true and ensure the contents of the depth subresource of depthStencilView are loaded into the framebuffer memory associated with depthStencilView.

" }, { "case": "\"load\"", @@ -3888,7 +3903,7 @@ "steps": [ { "case": "Not provided", - "html": "

Assert that depthStencilAttachment.stencilReadOnly is true and ensure the contents of the stencil subresource of depthStencilView are loaded into the framebuffer memory associated with depthStencilView.

" + "html": "

Assert that depthStencilAttachment.stencilReadOnly is true and ensure the contents of the stencil subresource of depthStencilView are loaded into the framebuffer memory associated with depthStencilView.

" }, { "case": "\"load\"", @@ -3936,23 +3951,23 @@ "html": "

Set this.[[state]] to \"locked\".

" }, { - "html": "

If any of the following requirements are unmet, invalidate pass and return.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, invalidate pass and return.

\n
\n \n
" }, { - "html": "If descriptor.timestampWrites is provided:", + "html": "If descriptor.timestampWrites is provided:", "rationale": "let", "steps": [ { "html": "

Let timestampWrites be descriptor.timestampWrites.

" }, { - "html": "

If timestampWrites.beginningOfPassWriteIndex is provided, append a GPU command to this.[[commands]] with the following steps:

\n
\n \n
", + "html": "

If timestampWrites.beginningOfPassWriteIndex is provided, append a GPU command to this.[[commands]] with the following steps:

\n
\n \n
", "ignored": [ "Before the pass commands begin executing, write the current queue timestamp into index timestampWrites.beginningOfPassWriteIndex of timestampWrites.querySet." ] }, { - "html": "

If timestampWrites.endOfPassWriteIndex is provided, set pass.[[endTimestampWrite]] to a GPU command with the following steps:

\n
\n \n
", + "html": "

If timestampWrites.endOfPassWriteIndex is provided, set pass.[[endTimestampWrite]] to a GPU command with the following steps:

\n
\n \n
", "ignored": [ "After the pass commands finish executing, write the current queue timestamp into index timestampWrites.endOfPassWriteIndex of timestampWrites.querySet." ] @@ -3979,10 +3994,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following conditions are unsatisfied invalidate this and stop.

\n
\n
    \n
  • \n

    source is valid to use with this.

    \n
  • \n

    destination is valid to use with this.

    \n
  • \n

    source.usage contains COPY_SRC.

    \n
  • \n

    destination.usage contains COPY_DST.

    \n
  • \n

    size is a multiple of 4.

    \n
  • \n

    sourceOffset is a multiple of 4.

    \n
  • \n

    destinationOffset is a multiple of 4.

    \n
  • \n

    source.size ≥ (sourceOffset + size).

    \n
  • \n

    destination.size ≥ (destinationOffset + size).

    \n
  • \n

    source and destination are not the same GPUBuffer.

    \n
\n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n
    \n
  • \n

    source is valid to use with this.

    \n
  • \n

    destination is valid to use with this.

    \n
  • \n

    source.usage contains COPY_SRC.

    \n
  • \n

    destination.usage contains COPY_DST.

    \n
  • \n

    size is a multiple of 4.

    \n
  • \n

    sourceOffset is a multiple of 4.

    \n
  • \n

    destinationOffset is a multiple of 4.

    \n
  • \n

    source.size ≥ (sourceOffset + size).

    \n
  • \n

    destination.size ≥ (destinationOffset + size).

    \n
  • \n

    source and destination are not the same GPUBuffer.

    \n
\n
" }, { "html": "

Enqueue a command on this which issues the subsequent steps on the Queue timeline when executed.

" @@ -4018,13 +4033,13 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { "html": "

If size is missing, set size to max(0, buffer.size - offset).

" }, { - "html": "

If any of the following conditions are unsatisfied invalidate this and stop.

\n
\n
    \n
  • \n

    buffer is valid to use with this.

    \n
  • \n

    buffer.usage contains COPY_DST.

    \n
  • \n

    size is a multiple of 4.

    \n
  • \n

    offset is a multiple of 4.

    \n
  • \n

    buffer.size ≥ (offset + size).

    \n
\n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n
    \n
  • \n

    buffer is valid to use with this.

    \n
  • \n

    buffer.usage contains COPY_DST.

    \n
  • \n

    size is a multiple of 4.

    \n
  • \n

    offset is a multiple of 4.

    \n
  • \n

    buffer.size ≥ (offset + size).

    \n
\n
" }, { "html": "

Enqueue a command on this which issues the subsequent steps on the Queue timeline when executed.

" @@ -4066,7 +4081,7 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { "html": "

Let aligned be true.

" @@ -4075,7 +4090,7 @@ "html": "

Let dataLength be source.buffer.size.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Enqueue a command on this which issues the subsequent steps on the Queue timeline when executed.

" @@ -4095,7 +4110,7 @@ "html": "

Let blockHeight be the texel block height of destination.texture.

" }, { - "html": "

Let dstOrigin be destination.origin;

" + "html": "

Let dstOrigin be destination.origin.

" }, { "html": "

Let dstBlockOriginX be (dstOrigin.x ÷ blockWidth).

" @@ -4110,7 +4125,7 @@ "html": "

Let blockRows be (copySize.height ÷ blockHeight).

" }, { - "html": "

Assert that dstBlockOriginX, dstBlockOriginY, blockColumns, and blockRows are integers.

" + "html": "

Assert that dstBlockOriginX, dstBlockOriginY, blockColumns, and blockRows are integers.

" }, { "html": "For each z in the range [0, copySize.depthOrArrayLayers − 1]:", @@ -4165,7 +4180,7 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { "html": "

Let aligned be true.

" @@ -4174,7 +4189,7 @@ "html": "

Let dataLength be destination.buffer.size.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Enqueue a command on this which issues the subsequent steps on the Queue timeline when executed.

" @@ -4194,7 +4209,7 @@ "html": "

Let blockHeight be the texel block height of source.texture.

" }, { - "html": "

Let srcOrigin be source.origin;

" + "html": "

Let srcOrigin be source.origin.

" }, { "html": "

Let srcBlockOriginX be (srcOrigin.x ÷ blockWidth).

" @@ -4209,7 +4224,7 @@ "html": "

Let blockRows be (copySize.height ÷ blockHeight).

" }, { - "html": "

Assert that srcBlockOriginX, srcBlockOriginY, blockColumns, and blockRows are integers.

" + "html": "

Assert that srcBlockOriginX, srcBlockOriginY, blockColumns, and blockRows are integers.

" }, { "html": "For each z in the range [0, copySize.depthOrArrayLayers − 1]:", @@ -4267,10 +4282,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Enqueue a command on this which issues the subsequent steps on the Queue timeline when executed.

" @@ -4290,7 +4305,7 @@ "html": "

Let blockHeight be the texel block height of source.texture.

" }, { - "html": "

Let srcOrigin be source.origin;

" + "html": "

Let srcOrigin be source.origin.

" }, { "html": "

Let srcBlockOriginX be (srcOrigin.x ÷ blockWidth).

" @@ -4299,7 +4314,7 @@ "html": "

Let srcBlockOriginY be (srcOrigin.y ÷ blockHeight).

" }, { - "html": "

Let dstOrigin be destination.origin;

" + "html": "

Let dstOrigin be destination.origin.

" }, { "html": "

Let dstBlockOriginX be (dstOrigin.x ÷ blockWidth).

" @@ -4314,7 +4329,7 @@ "html": "

Let blockRows be (copySize.height ÷ blockHeight).

" }, { - "html": "

Assert that srcBlockOriginX, srcBlockOriginY, dstBlockOriginX, dstBlockOriginY, blockColumns, and blockRows are integers.

" + "html": "

Assert that srcBlockOriginX, srcBlockOriginY, dstBlockOriginX, dstBlockOriginY, blockColumns, and blockRows are integers.

" }, { "html": "For each z in the range [0, copySize.depthOrArrayLayers − 1]:", @@ -4363,10 +4378,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n
    \n
  • \n

    querySet is valid to use with this.

    \n
  • \n

    destination is valid to use with this.

    \n
  • \n

    destination.usage contains QUERY_RESOLVE.

    \n
  • \n

    firstQuery < the number of queries in querySet.

    \n
  • \n

    (firstQuery + queryCount) ≤ the number of queries in querySet.

    \n
  • \n

    destinationOffset is a multiple of 256.

    \n
  • \n

    destinationOffset + 8 × queryCountdestination.size.

    \n
\n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n
    \n
  • \n

    querySet is valid to use with this.

    \n
  • \n

    destination is valid to use with this.

    \n
  • \n

    destination.usage contains QUERY_RESOLVE.

    \n
  • \n

    firstQuery < the number of queries in querySet.

    \n
  • \n

    (firstQuery + queryCount) ≤ the number of queries in querySet.

    \n
  • \n

    destinationOffset is a multiple of 256.

    \n
  • \n

    destinationOffset + 8 × queryCountdestination.size.

    \n
\n
" }, { "html": "

Enqueue a command on this which issues the subsequent steps on the Queue timeline when executed.

" @@ -4436,7 +4451,7 @@ "rationale": "generate", "steps": [ { - "html": "

Generate a validation error.

" + "html": "

Generate a validation error.

" }, { "html": "

Return an invalidated GPUCommandBuffer.

" @@ -4451,7 +4466,7 @@ { "name": "GPUBindingCommandsMixin.setBindGroup", "href": "https://www.w3.org/TR/webgpu/#dom-gpubindingcommandsmixin-setbindgroup-index-bindgroup-dynamicoffsets-index", - "html": "Called on: GPUBindingCommandsMixin this. \n

Arguments:

\n
\n
index, of type GPUIndex32, non-nullable, required\n
\n

The index to set the bind group at.

\n
bindGroup, of type GPUBindGroup, nullable, required\n
\n

Bind group to use for subsequent render or compute commands.

\n
dynamicOffsets, of type sequence<GPUBufferDynamicOffset>, non-nullable, defaulting to []\n
\n

Array containing buffer offsets in bytes for each entry in bindGroup marked as buffer.hasDynamicOffset.

\n
\n

Returns: undefined

\n \n

Content timeline steps:

", + "html": "Called on: GPUBindingCommandsMixin this. \n

Arguments:

\n
\n
index, of type GPUIndex32, non-nullable, required\n
\n

The index to set the bind group at.

\n
bindGroup, of type GPUBindGroup, nullable, required\n
\n

Bind group to use for subsequent render or compute commands.

\n
dynamicOffsets, of type sequence<GPUBufferDynamicOffset>, non-nullable, defaulting to []\n
\n

Array containing buffer offsets in bytes for each entry in bindGroup marked as buffer.hasDynamicOffset.

\n
\n

Returns: undefined

\n \n

Content timeline steps:

", "rationale": ".algorithm", "steps": [ { @@ -4462,17 +4477,17 @@ { "name": "GPUBindingCommandsMixin.setBindGroup", "href": "https://www.w3.org/TR/webgpu/#dom-gpubindingcommandsmixin-setbindgroup-index-bindgroup-dynamicoffsets-index", - "html": "Called on: GPUBindingCommandsMixin this. \n

Arguments:

\n
\n
index, of type GPUIndex32, non-nullable, required\n
\n

The index to set the bind group at.

\n
bindGroup, of type GPUBindGroup, nullable, required\n
\n

Bind group to use for subsequent render or compute commands.

\n
dynamicOffsets, of type sequence<GPUBufferDynamicOffset>, non-nullable, defaulting to []\n
\n

Array containing buffer offsets in bytes for each entry in bindGroup marked as buffer.hasDynamicOffset.

\n
\n

Returns: undefined

\n \n

Content timeline steps:

", + "html": "Called on: GPUBindingCommandsMixin this. \n

Arguments:

\n
\n
index, of type GPUIndex32, non-nullable, required\n
\n

The index to set the bind group at.

\n
bindGroup, of type GPUBindGroup, nullable, required\n
\n

Bind group to use for subsequent render or compute commands.

\n
dynamicOffsets, of type sequence<GPUBufferDynamicOffset>, non-nullable, defaulting to []\n
\n

Array containing buffer offsets in bytes for each entry in bindGroup marked as buffer.hasDynamicOffset.

\n
\n

Returns: undefined

\n \n

Content timeline steps:

", "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { "html": "

Let dynamicOffsetCount be 0 if bindGroup is null, or bindGroup.[[layout]].[[dynamicOffsetCount]] if not.

" }, { - "html": "

If any of the following requirements are unmet, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, invalidate this and return.

\n
\n \n
" }, { "html": "If bindGroup is null:", @@ -4491,7 +4506,7 @@ "rationale": "if", "steps": [ { - "html": "

If any of the following requirements are unmet, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, invalidate this and return.

\n
\n \n
" }, { "html": "

Set this.[[bind_groups]][index] to be bindGroup.

" @@ -4517,11 +4532,11 @@ { "name": "GPUBindingCommandsMixin.setBindGroup2", "href": "https://www.w3.org/TR/webgpu/#dom-gpubindingcommandsmixin-setbindgroup-index-bindgroup-dynamicoffsetsdata-dynamicoffsetsdatastart-dynamicoffsetsdatalength-index", - "html": "\n \n \n \n \n \n \n \n \n \n
Arguments for the GPUBindingCommandsMixin.setBindGroup(index, bindGroup, dynamicOffsetsData, dynamicOffsetsDataStart, dynamicOffsetsDataLength) method.
Parameter \n Type \n Nullable \n Optional \n Description \n
index \n GPUIndex32\n \n \n The index to set the bind group at. \n
bindGroup \n GPUBindGroup?\n \n \n Bind group to use for subsequent render or compute commands. \n
dynamicOffsetsData \n Uint32Array\n \n \n Array containing buffer offsets in bytes for each entry in bindGroup marked as buffer.hasDynamicOffset. \n
dynamicOffsetsDataStart \n GPUSize64\n \n \n Offset in elements into dynamicOffsetsData where the buffer offset data begins. \n
dynamicOffsetsDataLength \n GPUSize32\n \n \n Number of buffer offsets to read from dynamicOffsetsData. \n
", + "html": "\n \n \n \n \n \n \n \n \n \n
Arguments for the GPUBindingCommandsMixin.setBindGroup(index, bindGroup, dynamicOffsetsData, dynamicOffsetsDataStart, dynamicOffsetsDataLength) method.
Parameter \n Type \n Nullable \n Optional \n Description \n
index \n GPUIndex32\n \n \n The index to set the bind group at. \n
bindGroup \n GPUBindGroup?\n \n \n Bind group to use for subsequent render or compute commands. \n
dynamicOffsetsData \n Uint32Array\n \n \n Array containing buffer offsets in bytes for each entry in bindGroup marked as buffer.hasDynamicOffset. \n
dynamicOffsetsDataStart \n GPUSize64\n \n \n Offset in elements into dynamicOffsetsData where the buffer offset data begins. \n
dynamicOffsetsDataLength \n GPUSize32\n \n \n Number of buffer offsets to read from dynamicOffsetsData. \n
", "rationale": ".algorithm", "steps": [ { - "html": "

If any of the following requirements are unmet, throw a RangeError and stop.

\n
\n
    \n
  • \n

    dynamicOffsetsDataStart must be ≥ 0.

    \n
  • \n

    dynamicOffsetsDataStart + dynamicOffsetsDataLength must be ≤ dynamicOffsetsData.length.

    \n
\n
" + "html": "

If any of the following requirements are unmet, throw a RangeError and return.

\n
\n
    \n
  • \n

    dynamicOffsetsDataStart must be ≥ 0.

    \n
  • \n

    dynamicOffsetsDataStart + dynamicOffsetsDataLength must be ≤ dynamicOffsetsData.length.

    \n
\n
" }, { "html": "

Let dynamicOffsets be a list containing the range, starting at index dynamicOffsetsDataStart, of dynamicOffsetsDataLength elements of a copy of dynamicOffsetsData.

" @@ -4551,14 +4566,14 @@ "html": "

Let bindingDescriptor be the GPUBindGroupLayoutEntry at layout.[[entryMap]][entry.binding]:

" }, { - "html": "If bindingDescriptor.buffer?.hasDynamicOffset is true:", + "html": "If bindingDescriptor.buffer?.hasDynamicOffset is true:", "rationale": "let", "steps": [ { "html": "

Let bufferBinding be entry.resource.

" }, { - "html": "

Let bufferLayout be bindingDescriptor.buffer.

" + "html": "

Let bufferLayout be bindingDescriptor.buffer.

" }, { "html": "

Call steps with bufferBinding, bufferLayout, and dynamicOffsetIndex.

" @@ -4579,7 +4594,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "

If any of the following conditions are unsatisfied, return false:

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, return false:

\n
\n \n
" } ] }, @@ -4617,7 +4632,7 @@ "rationale": "let", "steps": [ { - "html": "

Let resourceWritable be (bindGroupLayoutEntry.buffer.type == \"storage\").

" + "html": "

Let resourceWritable be (bindGroupLayoutEntry.buffer.type == \"storage\").

" }, { "html": "For each pair (GPUBufferBinding pastResource, boolean pastResourceWritable) in bufferBindings:", @@ -4635,13 +4650,13 @@ }, { "html": "For each GPUBindGroupLayoutEntry bindGroupLayoutEntry in bindGroupLayoutEntries, and corresponding GPUTextureView resource in bindGroup, in which bindGroupLayoutEntry.visibility contains stage:", - "rationale": "let", + "rationale": "if", "steps": [ { - "html": "

Let resourceWritable be whether bindGroupLayoutEntry.storageTexture.access is a writable access mode.

" + "html": "

If bindGroupLayoutEntry.storageTexture is not provided, continue.

" }, { - "html": "

If bindGroupLayoutEntry.storageTexture is not provided, continue.

" + "html": "

Let resourceWritable be whether bindGroupLayoutEntry.storageTexture.access is a writable access mode.

" }, { "html": "For each pair (GPUTextureView pastResource, boolean pastResourceWritable) in textureViews,", @@ -4684,7 +4699,7 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { "html": "

Push groupLabel onto this.[[debug_group_stack]].

" @@ -4707,10 +4722,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following requirements are unmet, invalidate this, and stop.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, invalidate this and return.

\n
\n \n
" }, { "html": "

Pop an entry off of this.[[debug_group_stack]].

" @@ -4735,7 +4750,7 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" } ] }, @@ -4757,10 +4772,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Set this.[[pipeline]] to be pipeline.

" @@ -4785,7 +4800,7 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { "html": "

Let usageScope be an empty usage scope.

" @@ -4794,7 +4809,7 @@ "html": "

For each bindGroup in this.[[bind_groups]], merge bindGroup.[[usedResources]] into this.[[usage scope]]

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Let bindingState be a snapshot of this’s current state.

" @@ -4833,7 +4848,7 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { "html": "

Let usageScope be an empty usage scope.

" @@ -4845,7 +4860,7 @@ "html": "

Add indirectBuffer to usageScope with usage input.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Let bindingState be a snapshot of this’s current state.

" @@ -4871,7 +4886,7 @@ "html": "

Let workgroupCountZ be an unsigned 32-bit integer read from indirectBuffer at\n(indirectOffset + 8) bytes.

" }, { - "html": "

If workgroupCountX, workgroupCountY, or workgroupCountZ is greater than this.device.limits.maxComputeWorkgroupsPerDimension,\nstop.

" + "html": "

If workgroupCountX, workgroupCountY, or workgroupCountZ is greater than this.device.limits.maxComputeWorkgroupsPerDimension,\nreturn.

" }, { "html": "

Execute a grid of workgroups with dimensions [workgroupCountX, workgroupCountY, workgroupCountZ] with bindingState.[[pipeline]] using bindingState.[[bind_groups]].

" @@ -4897,7 +4912,7 @@ "html": "

Let parentEncoder be this.[[command_encoder]].

" }, { - "html": "

If any of the following requirements are unmet, generate a validation error and stop.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, generate a validation error and return.

\n
\n \n
" }, { "html": "

Set this.[[state]] to \"ended\".

" @@ -4906,7 +4921,7 @@ "html": "

Set parentEncoder.[[state]] to \"open\".

" }, { - "html": "

If any of the following requirements are unmet, invalidate parentEncoder and stop.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, invalidate parentEncoder and return.

\n
\n \n
" }, { "html": "

Extend parentEncoder.[[commands]] with this.[[commands]].

" @@ -4929,7 +4944,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "

this.colorAttachments.length must be ≤ device.[[limits]].maxColorAttachments.

" + "html": "

this.colorAttachments.size must be ≤ device.[[limits]].maxColorAttachments.

" }, { "html": "For each non-null colorAttachment in this.colorAttachments:", @@ -4939,7 +4954,7 @@ "html": "

colorAttachment.view must be valid to use with device.

" }, { - "html": "If colorAttachment.resolveTarget is provided:", + "html": "If colorAttachment.resolveTarget is provided:", "rationale": "resolve", "steps": [ { @@ -4953,7 +4968,7 @@ ] }, { - "html": "

If this.depthStencilAttachment is provided:

", + "html": "

If this.depthStencilAttachment is provided:

", "ignored": [ "this.depthStencilAttachment.view must be valid to use with device. this.depthStencilAttachment must meet the GPURenderPassDepthStencilAttachment Valid Usage rules." ] @@ -4971,13 +4986,13 @@ "html": "

For each view in non-null members of this.colorAttachments and this.depthStencilAttachment.view,\nif present, the [[renderExtent]] must match.

" }, { - "html": "

If this.occlusionQuerySet is not null:

", + "html": "

If this.occlusionQuerySet is provided:

", "ignored": [ "this.occlusionQuerySet must be valid to use with device. this.occlusionQuerySet.type must be occlusion." ] }, { - "html": "

If this.timestampWrites is provided:

\n " + "html": "

If this.timestampWrites is provided:

\n " } ] }, @@ -5008,23 +5023,74 @@ ] }, { - "html": "Given a GPURenderPassColorAttachment this:", - "rationale": "let", + "name": "GPURenderPassColorAttachment Valid Usage", + "href": "https://www.w3.org/TR/webgpu/#abstract-opdef-gpurenderpasscolorattachment-gpurenderpasscolorattachment-valid-usage", + "html": "GPURenderPassColorAttachment Valid Usage \n

Given a GPURenderPassColorAttachment this:

", + "rationale": ".algorithm", "steps": [ { "html": "

Let renderViewDescriptor be this.view.[[descriptor]].

" }, - { - "html": "

Let resolveViewDescriptor be this.resolveTarget.[[descriptor]].

" - }, { "html": "

Let renderTexture be this.view.[[texture]].

" }, { - "html": "

Let resolveTexture be this.resolveTarget.[[texture]].

" - }, - { - "html": "

The following validation rules apply:

\n
\n \n
" + "html": "

All of the requirements in the following steps must be met.

\n
\n \n
", + "rationale": "if", + "steps": [ + { + "html": "

renderViewDescriptor.format must be a color renderable format.

" + }, + { + "html": "

this.view must be a renderable texture view.

" + }, + { + "html": "

If renderViewDescriptor.dimension is \"3d\":

\n \n

Otherwise:

", + "ignored": [ + "this.depthSlice must be provided and must be < the depthOrArrayLayers of the logical miplevel-specific texture extent of the renderTexture subresource at mipmap level renderViewDescriptor.baseMipLevel.", + "this.depthSlice must not be provided." + ] + }, + { + "html": "

If this.loadOp is \"clear\":

", + "ignored": [ + "Converting the IDL value this.clearValue to a texel value of texture format renderViewDescriptor.format must not throw a TypeError." + ] + }, + { + "html": "If this.resolveTarget is provided:", + "rationale": "let", + "steps": [ + { + "html": "

Let resolveViewDescriptor be this.resolveTarget.[[descriptor]].

" + }, + { + "html": "

Let resolveTexture be this.resolveTarget.[[texture]].

" + }, + { + "html": "

renderTexture.sampleCount must be > 1.

" + }, + { + "html": "

resolveTexture.sampleCount must be 1.

" + }, + { + "html": "

this.resolveTarget must be a non-3d renderable texture view.

" + }, + { + "html": "

this.resolveTarget.[[renderExtent]] and this.view.[[renderExtent]] must match.

" + }, + { + "html": "

resolveViewDescriptor.format must equal renderViewDescriptor.format.

" + }, + { + "html": "

resolveTexture.format must equal renderTexture.format.

" + }, + { + "html": "

resolveViewDescriptor.format must support resolve according to § 26.1.1 Plain color formats.

" + } + ] + } + ] } ] }, @@ -5068,7 +5134,7 @@ "rationale": "assert", "steps": [ { - "html": "

Assert: format is a color renderable format.

" + "html": "

Assert: format is a color renderable format.

" }, { "html": "

Let renderTargetPixelByteCost be the render target pixel byte cost of format.

" @@ -5126,7 +5192,7 @@ ] }, { - "html": "

Let depthStencilAttachment be descriptor.depthStencilAttachment,\nor null if not provided.

" + "html": "

Let depthStencilAttachment be descriptor.depthStencilAttachment.

" }, { "html": "If depthStencilAttachment is not null:", @@ -5161,7 +5227,7 @@ "html": "

Set layout.sampleCount to descriptor.multisample.count.

" }, { - "html": "If descriptor.depthStencil is provided:", + "html": "If descriptor.depthStencil is provided:", "rationale": "set", "steps": [ { @@ -5170,7 +5236,7 @@ ] }, { - "html": "If descriptor.fragment is provided:", + "html": "If descriptor.fragment is provided:", "rationale": "for", "steps": [ { @@ -5208,7 +5274,7 @@ "html": "

Let parentEncoder be this.[[command_encoder]].

" }, { - "html": "

If any of the following requirements are unmet, generate a validation error and stop.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, generate a validation error and return.

\n
\n \n
" }, { "html": "

Set this.[[state]] to \"ended\".

" @@ -5217,7 +5283,7 @@ "html": "

Set parentEncoder.[[state]] to \"open\".

" }, { - "html": "

If any of the following requirements are unmet, invalidate parentEncoder and stop.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, invalidate parentEncoder and return.

\n
\n \n
" }, { "html": "

Extend parentEncoder.[[commands]] with this.[[commands]].

" @@ -5313,7 +5379,7 @@ "steps": [ { "case": "Not provided", - "html": "

Assert that depthStencilAttachment.depthReadOnly is true and leave the depth subresource of depthStencilView unchanged.

" + "html": "

Assert that depthStencilAttachment.depthReadOnly is true and leave the depth subresource of depthStencilView unchanged.

" }, { "case": "\"store\"", @@ -5336,7 +5402,7 @@ "steps": [ { "case": "Not provided", - "html": "

Assert that depthStencilAttachment.stencilReadOnly is true and leave the stencil subresource of depthStencilView unchanged.

" + "html": "

Assert that depthStencilAttachment.stencilReadOnly is true and leave the stencil subresource of depthStencilView unchanged.

" }, { "case": "\"store\"", @@ -5395,13 +5461,13 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { "html": "

Let pipelineTargetsLayout be derive render targets layout from pipeline(pipeline.[[descriptor]]).

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Set this.[[pipeline]] to be pipeline.

" @@ -5426,13 +5492,13 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { "html": "

If size is missing, set size to max(0, buffer.size - offset).

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n
    \n
  • \n

    buffer is valid to use with this.

    \n
  • \n

    buffer.usage contains INDEX.

    \n
  • \n

    offset is a multiple of indexFormat’s byte size.

    \n
  • \n

    offset + sizebuffer.size.

    \n
\n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n
    \n
  • \n

    buffer is valid to use with this.

    \n
  • \n

    buffer.usage contains INDEX.

    \n
  • \n

    offset is a multiple of indexFormat’s byte size.

    \n
  • \n

    offset + sizebuffer.size.

    \n
\n
" }, { "html": "

Add buffer to [[usage scope]] with usage input.

" @@ -5469,7 +5535,7 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { "html": "

Let bufferSize be 0 if buffer is null, or buffer.size if not.

" @@ -5478,7 +5544,7 @@ "html": "

If size is missing, set size to max(0, bufferSize - offset).

" }, { - "html": "

If any of the following requirements are unmet, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, invalidate this and return.

\n
\n \n
" }, { "html": "If buffer is null:", @@ -5497,7 +5563,7 @@ "rationale": "if", "steps": [ { - "html": "

If any of the following requirements are unmet, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, invalidate this and return.

\n
\n \n
" }, { "html": "

Add buffer to [[usage scope]] with usage input.

" @@ -5532,10 +5598,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

All of the requirements in the following steps must be met.\nIf any are unmet, invalidate this and stop.

\n
\n \n
", + "html": "

All of the requirements in the following steps must be met.\nIf any are unmet, invalidate this and return.

\n
\n \n
", "rationale": "let", "steps": [ { @@ -5545,7 +5611,7 @@ "html": "

Let buffers be this.[[pipeline]].[[descriptor]].vertex.buffers.

" }, { - "html": "For each GPUIndex32 slot from 0 to buffers.length (non-inclusive):", + "html": "For each GPUIndex32 slot from 0 to buffers.size (non-inclusive):", "rationale": "if", "steps": [ { @@ -5561,7 +5627,7 @@ "html": "

Let attributes be buffers[slot].attributes

" }, { - "html": "

Let lastStride be the maximum value of\n(attribute.offset + sizeof(attribute.format))\nover each attribute in attributes, or 0 if attributes is empty.

" + "html": "

Let lastStride be the maximum value of\n(attribute.offset + byteSize(attribute.format))\nover each attribute in attributes, or 0 if attributes is empty.

" }, { "html": "Let strideCount be computed based on buffers[slot].stepMode:", @@ -5621,10 +5687,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Increment this.[[drawCount]] by 1.

" @@ -5655,10 +5721,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Add indirectBuffer to [[usage scope]] with usage input.

" @@ -5715,10 +5781,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Add indirectBuffer to [[usage scope]] with usage input.

" @@ -5818,10 +5884,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n
    \n
  • \n

    x0

    \n
  • \n

    y0

    \n
  • \n

    width0

    \n
  • \n

    height0

    \n
  • \n

    x + widththis.[[attachment_size]].width

    \n
  • \n

    y + heightthis.[[attachment_size]].height

    \n
  • \n

    0.0 ≤ minDepth ≤ 1.0

    \n
  • \n

    0.0 ≤ maxDepth ≤ 1.0

    \n
  • \n

    minDepthmaxDepth

    \n
\n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n
    \n
  • \n

    x0

    \n
  • \n

    y0

    \n
  • \n

    width0

    \n
  • \n

    height0

    \n
  • \n

    x + widththis.[[attachment_size]].width

    \n
  • \n

    y + heightthis.[[attachment_size]].height

    \n
  • \n

    0.0 ≤ minDepth ≤ 1.0

    \n
  • \n

    0.0 ≤ maxDepth ≤ 1.0

    \n
  • \n

    minDepthmaxDepth

    \n
\n
" }, { "html": "

Enqueue a render command on this which issues the subsequent steps on the Queue timeline with renderState when executed.

" @@ -5860,10 +5926,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Enqueue a render command on this which issues the subsequent steps on the Queue timeline with renderState when executed.

" @@ -5902,7 +5968,7 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { "html": "

Enqueue a render command on this which issues the subsequent steps on the Queue timeline with renderState when executed.

" @@ -5938,7 +6004,7 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { "html": "

Enqueue a render command on this which issues the subsequent steps on the Queue timeline with renderState when executed.

" @@ -5974,10 +6040,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Set this.[[occlusion_query_active]] to true.

" @@ -6014,10 +6080,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "

Set this.[[occlusion_query_active]] to false.

" @@ -6058,10 +6124,10 @@ "rationale": "validate", "steps": [ { - "html": "

Validate the encoder state of this. If it returns false, stop.

" + "html": "

Validate the encoder state of this. If it returns false, return.

" }, { - "html": "

If any of the following conditions are unsatisfied, invalidate this and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, invalidate this and return.

\n
\n \n
" }, { "html": "For each bundle in bundles:", @@ -6119,7 +6185,10 @@ "html": "

? Validate texture format required features of each non-null element of descriptor.colorFormats with this.[[device]].

" }, { - "html": "

? Validate texture format required features of descriptor.depthStencilFormat with this.[[device]].

" + "html": "

If descriptor.depthStencilFormat is provided:

", + "ignored": [ + "? Validate texture format required features of descriptor.depthStencilFormat with this.[[device]]." + ] }, { "html": "

Let e be ! create a new WebGPU object(this, GPURenderBundleEncoder, descriptor).

" @@ -6139,7 +6208,7 @@ "rationale": "if", "steps": [ { - "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate e, and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied generate a validation error, invalidate e and return.

\n
\n \n
" }, { "html": "

Set e.[[layout]] to a copy of descriptor’s included GPURenderPassLayout interface.

" @@ -6192,7 +6261,7 @@ "rationale": "generate", "steps": [ { - "html": "

Generate a validation error.

" + "html": "

Generate a validation error.

" }, { "html": "

Return an invalidated GPURenderBundle.

" @@ -6226,7 +6295,7 @@ "html": "

If size is missing,\nlet contentsSize be dataSizedataOffset.\nOtherwise, let contentsSize be size.

" }, { - "html": "

If any of the following conditions are unsatisfied,\nthrow OperationError and stop.

\n
\n
    \n
  • \n

    contentsSize ≥ 0.

    \n
  • \n

    dataOffset + contentsSizedataSize.

    \n
  • \n

    contentsSize, converted to bytes, is a multiple of 4 bytes.

    \n
\n
" + "html": "

If any of the following conditions are unsatisfied,\nthrow an OperationError and return.

\n
\n
    \n
  • \n

    contentsSize ≥ 0.

    \n
  • \n

    dataOffset + contentsSizedataSize.

    \n
  • \n

    contentsSize, converted to bytes, is a multiple of 4 bytes.

    \n
\n
" }, { "html": "

Let dataContents be a copy of the bytes held by the buffer source data.

" @@ -6246,7 +6315,7 @@ "rationale": "if", "steps": [ { - "html": "

If any of the following conditions are unsatisfied, generate a validation error and stop.

\n
\n \n
" + "html": "

If any of the following conditions are unsatisfied, generate a validation error and return.

\n
\n \n
" }, { "html": "

Issue the subsequent steps on the Queue timeline of this.

" @@ -6286,7 +6355,7 @@ "html": "

Let dataLength be dataBytes.length.

" }, { - "html": "

If any of the following conditions are unsatisfied, generate a validation error and stop.

\n
\n \n \n
" + "html": "

If any of the following conditions are unsatisfied, generate a validation error and return.

\n
\n \n \n
" }, { "html": "

Issue the subsequent steps on the Queue timeline of this.

" @@ -6321,7 +6390,7 @@ "html": "

Let blockRows be (copySize.height ÷ blockHeight).

" }, { - "html": "

Assert that dstBlockOriginX, dstBlockOriginY, blockColumns, and blockRows are integers.

" + "html": "

Assert that dstBlockOriginX, dstBlockOriginY, blockColumns, and blockRows are integers.

" }, { "html": "For each z in the range [0, copySize.depthOrArrayLayers − 1]:", @@ -6371,10 +6440,10 @@ "html": "

Let sourceImage be source.source

" }, { - "html": "

If sourceImage is not origin-clean,\nthrow a SecurityError and stop.

" + "html": "

If sourceImage is not origin-clean,\nthrow a SecurityError and return.

" }, { - "html": "

If any of the following requirements are unmet, throw an OperationError and stop.

\n
\n
    \n
  • \n

    source.origin.x + copySize.width must be ≤ the width of sourceImage.

    \n
  • \n

    source.origin.y + copySize.height must be ≤ the height of sourceImage.

    \n
  • \n

    copySize.depthOrArrayLayers must be ≤ 1.

    \n
\n
" + "html": "

If any of the following requirements are unmet, throw an OperationError and return.

\n
\n
    \n
  • \n

    source.origin.x + copySize.width must be ≤ the width of sourceImage.

    \n
  • \n

    source.origin.y + copySize.height must be ≤ the height of sourceImage.

    \n
  • \n

    copySize.depthOrArrayLayers must be ≤ 1.

    \n
\n
" }, { "html": "

Let usability be ? check the usability of the image argument(source).

" @@ -6394,7 +6463,7 @@ "html": "

Let texture be destination.texture.

" }, { - "html": "

If any of the following requirements are unmet, generate a validation error and stop.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, generate a validation error and return.

\n
\n \n
" }, { "html": "

If copySize.depthOrArrayLayers is > 0, issue the subsequent\nsteps on the Queue timeline of this.

" @@ -6408,7 +6477,7 @@ "rationale": "assert", "steps": [ { - "html": "

Assert that the texel block width of destination.texture is 1,\nthe texel block height of destination.texture is 1, and that copySize.depthOrArrayLayers is 1.

" + "html": "

Assert that the texel block width of destination.texture is 1,\nthe texel block height of destination.texture is 1, and that copySize.depthOrArrayLayers is 1.

" }, { "html": "

Let srcOrigin be source.origin.

" @@ -6592,7 +6661,7 @@ "rationale": "if", "steps": [ { - "html": "

If any of the following requirements are unmet, generate a validation error, invalidate q, and stop.

\n
\n
    \n
  • \n

    this must not be lost.

    \n
  • \n

    descriptor.count must be ≤ 4096.

    \n
\n
" + "html": "

If any of the following requirements are unmet, generate a validation error, invalidate q and return.

\n
\n
    \n
  • \n

    this must not be lost.

    \n
  • \n

    descriptor.count must be ≤ 4096.

    \n
\n
" } ] }, @@ -6623,7 +6692,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "

Return true if the following requirements are met, and false if not:

\n
\n
    \n
  • \n

    \"timestamp-query\" must be enabled for device.

    \n
  • \n

    timestampWrites.querySet must be valid to use with device.

    \n
  • \n

    timestampWrites.querySet.type must be \"timestamp\".

    \n
  • \n

    Of the write index members in timestampWrites (beginningOfPassWriteIndex, endOfPassWriteIndex):

    \n
      \n
    • \n

      At least one must be provided.

      \n
    • \n

      Of those which are provided:

      \n
        \n
      • \n

        No two may be equal.

        \n
      • \n

        Each must be < timestampWrites.querySet.count.

        \n
      \n
    \n
\n
" + "html": "

Return true if the following requirements are met, and false if not:

\n
\n
    \n
  • \n

    \"timestamp-query\" must be enabled for device.

    \n
  • \n

    timestampWrites.querySet must be valid to use with device.

    \n
  • \n

    timestampWrites.querySet.type must be \"timestamp\".

    \n
  • \n

    Of the write index members in timestampWrites (beginningOfPassWriteIndex, endOfPassWriteIndex):

    \n
      \n
    • \n

      At least one must be provided.

      \n
    • \n

      Of those which are provided:

      \n
        \n
      • \n

        No two may be equal.

        \n
      • \n

        Each must be < timestampWrites.querySet.count.

        \n
      \n
    \n
\n
" } ] }, @@ -6686,7 +6755,7 @@ "rationale": "if", "steps": [ { - "html": "

If any of the following requirements are unmet, generate a validation error and stop.

\n
\n \n
" + "html": "

If any of the following requirements are unmet, generate a validation error and return.

\n
\n \n
" } ] }, @@ -6712,16 +6781,10 @@ "rationale": ".algorithm", "steps": [ { - "html": "If this.[[configuration]] is null:", - "rationale": "throw", - "steps": [ - { - "html": "

Throw an InvalidStateError and stop.

" - } - ] + "html": "

If this.[[configuration]] is null,\nthrow an InvalidStateError and return.

" }, { - "html": "

Assert this.[[textureDescriptor]] is not null.

" + "html": "

Assert this.[[textureDescriptor]] is not null.

" }, { "html": "

Let device be this.[[configuration]].device.

" @@ -7279,7 +7342,7 @@ "html": "

Let relativeVertexIndex be fetch index(i + drawCall.firstIndex, state.[[index_buffer]]).

" }, { - "html": "

If relativeVertexIndex has the special value \"out of bounds\",\nstop and return the empty list.

" + "html": "

If relativeVertexIndex has the special value \"out of bounds\",\nreturn the empty list.

" }, { "html": "

Append drawCall.baseVertex + relativeVertexIndex to the vertexIndexList.

" @@ -7341,7 +7404,7 @@ { "name": "process vertices", "href": "https://www.w3.org/TR/webgpu/#abstract-opdef-process-vertices", - "html": "process vertices(vertexIndexList, drawCall, desc, state) \n

Arguments:

\n
    \n
  • \n

    vertexIndexList: List of vertex indices to process (mutable, passed by reference).

    \n
  • \n

    drawCall: The draw call parameters. May come from function arguments or an INDIRECT buffer.

    \n
  • \n

    desc: The descriptor of type GPUVertexState.

    \n
  • \n

    state: The snapshot of the GPURenderCommandsMixin state at the time of the draw call.

    \n
\n

Each vertex vertexIndex in the vertexIndexList,\n in each instance of index rawInstanceIndex, is processed independently.\n The rawInstanceIndex is in range from 0 to drawCall.instanceCount - 1, inclusive.\n This processing happens in parallel, and any side effects, such as\n writes into GPUBufferBindingType.\"storage\" bindings,\n may happen in any order.

", + "html": "process vertices(vertexIndexList, drawCall, desc, state) \n

Arguments:

\n
    \n
  • \n

    vertexIndexList: List of vertex indices to process (mutable, passed by reference).

    \n
  • \n

    drawCall: The draw call parameters. May come from function arguments or an INDIRECT buffer.

    \n
  • \n

    desc: The descriptor of type GPUVertexState.

    \n
  • \n

    state: The snapshot of the GPURenderCommandsMixin state at the time of the draw call.

    \n
\n

Each vertex vertexIndex in the vertexIndexList,\n in each instance of index rawInstanceIndex, is processed independently.\n The rawInstanceIndex is in range from 0 to drawCall.instanceCount - 1, inclusive.\n This processing happens in parallel, and any side effects, such as\n writes into GPUBufferBindingType \"storage\" bindings,\n may happen in any order.

", "rationale": ".algorithm", "steps": [ { @@ -7387,14 +7450,14 @@ "html": "

Let attributeOffset be vertexBufferOffset + vertexElementIndex * vertexBufferLayout.arrayStride + attributeDesc.offset.

" }, { - "html": "If attributeOffset + sizeof(attributeDesc.format) > vertexBufferOffset + vertexBufferBindingSize:", + "html": "If attributeOffset + byteSize(attributeDesc.format) > vertexBufferOffset + vertexBufferBindingSize:", "rationale": "set", "steps": [ { "html": "

Set drawCallOutOfBounds to true.

" }, { - "html": "

**Optionally (implementation-defined)**, empty vertexIndexList and stop, cancelling the draw call.

" + "html": "

Optionally (implementation-defined), empty vertexIndexList and return, cancelling the draw call.

" } ] } @@ -7887,7 +7950,7 @@ "html": "

Let targetDesc be the targets entry that corresponds with attachment.

" }, { - "html": "If targetDesc.blend is provided:", + "html": "If targetDesc.blend is provided:", "rationale": "let", "steps": [ { @@ -7918,7 +7981,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "

Throw a TypeError if color is a sequence and color.length ≠ 4.

" + "html": "

Throw a TypeError if color is a sequence and color.size ≠ 4.

" } ] }, @@ -7929,7 +7992,7 @@ "rationale": ".algorithm", "steps": [ { - "html": "

Throw a TypeError if origin is a sequence and origin.length > 2.

" + "html": "

Throw a TypeError if origin is a sequence and origin.size > 2.

" } ] }, @@ -7940,14 +8003,14 @@ "rationale": ".algorithm", "steps": [ { - "html": "

Throw a TypeError if origin is a sequence and origin.length > 3.

" + "html": "

Throw a TypeError if origin is a sequence and origin.size > 3.

" } ] }, { "name": "validate GPUExtent3D shape", "href": "https://www.w3.org/TR/webgpu/#abstract-opdef-validate-gpuextent3d-shape", - "html": "validate GPUExtent3D shape(extent) \n

Arguments:

\n \n

Returns: undefined

\n

Content timeline steps:

\n \n
    \n
  • \n

    extent is a sequence, and

    \n
  • \n

    extent.length < 1 or extent.length > 3.

    \n
", + "html": "validate GPUExtent3D shape(extent) \n

Arguments:

\n \n

Returns: undefined

\n

Content timeline steps:

\n \n
    \n
  • \n

    extent is a sequence, and

    \n
  • \n

    extent.size < 1 or extent.size > 3.

    \n
", "rationale": ".algorithm", "steps": [ { diff --git a/tr/css/css-easing.json b/tr/css/css-easing.json index 8d92c7c06d50..7ac0cb3674ff 100644 --- a/tr/css/css-easing.json +++ b/tr/css/css-easing.json @@ -1,7 +1,7 @@ { "spec": { - "title": "CSS Easing Functions Level 1", - "url": "https://www.w3.org/TR/css-easing-1/" + "title": "CSS Easing Functions Level 2", + "url": "https://www.w3.org/TR/css-easing-2/" }, "properties": [], "atrules": [], @@ -9,117 +9,156 @@ "values": [ { "name": "", - "value": "linear | | ", - "href": "https://www.w3.org/TR/css-easing-1/#typedef-easing-function", - "type": "type" + "value": "linear | | | ", + "href": "https://www.w3.org/TR/css-easing-2/#typedef-easing-function", + "type": "type", + "values": [ + { + "name": "linear", + "prose": "The linear keyword produces an identity linear easing function whose output progress value is equal to the input progress value for all inputs.", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-easing-function-linear", + "type": "value", + "value": "linear" + } + ] + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-easing-2/#typedef-linear-easing-function", + "type": "type", + "value": "linear()" + }, + { + "name": "linear()", + "value": "linear()", + "href": "https://www.w3.org/TR/css-easing-2/#funcdef-linear", + "type": "function" + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-easing-2/#typedef-linear-stop-list", + "type": "type", + "value": "[ ]#" + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-easing-2/#typedef-linear-stop", + "type": "type", + "value": " && ?" + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-easing-2/#typedef-linear-stop-length", + "type": "type", + "value": "{1,2}" }, { "name": "", "value": "ease | ease-in | ease-out | ease-in-out | cubic-bezier(, , , )", - "href": "https://www.w3.org/TR/css-easing-1/#typedef-cubic-bezier-easing-function", + "href": "https://www.w3.org/TR/css-easing-2/#typedef-cubic-bezier-easing-function", "type": "type", "values": [ { "name": "ease", "prose": "Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1).", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-cubic-bezier-easing-function-ease", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-cubic-bezier-easing-function-ease", "type": "value", "value": "ease" }, { "name": "ease-in", "prose": "Equivalent to cubic-bezier(0.42, 0, 1, 1).", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-cubic-bezier-easing-function-ease-in", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-cubic-bezier-easing-function-ease-in", "type": "value", "value": "ease-in" }, { "name": "ease-out", "prose": "Equivalent to cubic-bezier(0, 0, 0.58, 1).", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-cubic-bezier-easing-function-ease-out", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-cubic-bezier-easing-function-ease-out", "type": "value", "value": "ease-out" }, { "name": "ease-in-out", "prose": "Equivalent to cubic-bezier(0.42, 0, 0.58, 1).", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-cubic-bezier-easing-function-ease-in-out", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-cubic-bezier-easing-function-ease-in-out", "type": "value", "value": "ease-in-out" }, { "name": "cubic-bezier()", "value": "cubic-bezier(, , , )", - "href": "https://www.w3.org/TR/css-easing-1/#funcdef-cubic-bezier-easing-function-cubic-bezier", + "href": "https://www.w3.org/TR/css-easing-2/#funcdef-cubic-bezier-easing-function-cubic-bezier", "type": "function" } ] }, { "name": "", - "value": "step-start | step-end | steps([, ]?)", - "href": "https://www.w3.org/TR/css-easing-1/#typedef-step-easing-function", + "value": "step-start | step-end | steps( , ?)", + "href": "https://www.w3.org/TR/css-easing-2/#typedef-step-easing-function", "type": "type", "values": [ { "name": "step-start", "prose": "Computes to steps(1, start)", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-step-easing-function-step-start", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-step-easing-function-step-start", "type": "value", "value": "step-start" }, { "name": "step-end", "prose": "Computes to steps(1, end) Example step easing function keyword values.", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-step-easing-function-step-end", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-step-easing-function-step-end", "type": "value", "value": "step-end" }, { "name": "steps()", - "value": "steps([, ]?)", - "href": "https://www.w3.org/TR/css-easing-1/#funcdef-step-easing-function-steps", + "value": "steps(, ?)", + "href": "https://www.w3.org/TR/css-easing-2/#funcdef-step-easing-function-steps", "type": "function", "values": [ { "name": "jump-start", "prose": "The first rise occurs at input progress value of 0.", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-steps-jump-start", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-steps-jump-start", "type": "value", "value": "jump-start" }, { "name": "jump-end", "prose": "The last rise occurs at input progress value of 1.", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-steps-jump-end", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-steps-jump-end", "type": "value", "value": "jump-end" }, { "name": "jump-none", "prose": "All rises occur within the range (0, 1).", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-steps-jump-none", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-steps-jump-none", "type": "value", "value": "jump-none" }, { "name": "jump-both", "prose": "The first rise occurs at input progress value of 0 and the last rise occurs at input progress value of 1.", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-steps-jump-both", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-steps-jump-both", "type": "value", "value": "jump-both" }, { "name": "start", "prose": "Behaves as jump-start.", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-steps-start", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-steps-start", "type": "value", "value": "start" }, { "name": "end", "prose": "Behaves as jump-end.", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-steps-end", + "href": "https://www.w3.org/TR/css-easing-2/#valdef-steps-end", "type": "value", "value": "end" } @@ -130,19 +169,8 @@ { "name": "", "value": "jump-start | jump-end | jump-none | jump-both | start | end", - "href": "https://www.w3.org/TR/css-easing-1/#typedef-step-position", + "href": "https://www.w3.org/TR/css-easing-2/#typedef-step-position", "type": "type" } - ], - "warnings": [ - { - "msg": "Dangling value", - "name": "linear", - "prose": "The syntax for the linear easing function is simply the linear keyword.", - "href": "https://www.w3.org/TR/css-easing-1/#valdef-easing-function-linear", - "type": "value", - "value": "linear", - "for": "easing-function" - } ] } diff --git a/tr/css/css-values-5.json b/tr/css/css-values-5.json new file mode 100644 index 000000000000..9028c8ea31ef --- /dev/null +++ b/tr/css/css-values-5.json @@ -0,0 +1,484 @@ +{ + "spec": { + "title": "CSS Values and Units Module Level 5", + "url": "https://www.w3.org/TR/css-values-5/" + }, + "properties": [ + { + "name": "interpolate-size", + "href": "https://www.w3.org/TR/css-values-5/#propdef-interpolate-size", + "value": "numeric-only | allow-keywords", + "initial": "numeric-only", + "appliesTo": "all elements", + "inherited": "yes", + "percentages": "n/a", + "computedValue": "as specified", + "canonicalOrder": "per grammar", + "animationType": "not animatable", + "values": [ + { + "name": "numeric-only", + "prose": "An cannot be interpolated.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-interpolate-size-numeric-only", + "type": "value", + "value": "numeric-only" + }, + { + "name": "allow-keywords", + "prose": "Two values can be interpolated if one of them is an and the other is a . This is done by treating the keyword as though it is calc-size(keyword, size) and applying the rules in § 9.3 Interpolating calc-size(). In other cases, an still cannot be interpolated.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-interpolate-size-allow-keywords", + "type": "value", + "value": "allow-keywords" + } + ], + "styleDeclaration": [ + "interpolate-size", + "interpolateSize" + ] + } + ], + "atrules": [], + "selectors": [], + "values": [ + { + "name": "", + "prose": "s are s that affect the ’s resource request by applying associated URL request modifier steps. See CSS Values 4 § 4.5.4 URL Processing Model.", + "href": "https://www.w3.org/TR/css-values-5/#typedef-request-url-modifier", + "type": "type", + "value": " | | ", + "values": [ + { + "name": "", + "value": "crossorigin(anonymous | use-credentials)", + "href": "https://www.w3.org/TR/css-values-5/#typedef-request-url-modifier-crossorigin-modifier", + "type": "type" + }, + { + "name": "crossorigin()", + "prose": " = crossorigin(anonymous | use-credentials)", + "href": "https://www.w3.org/TR/css-values-5/#funcdef-request-url-modifier-crossorigin", + "type": "function" + }, + { + "name": "anonymous", + "prose": " = crossorigin(anonymous | use-credentials)", + "href": "https://www.w3.org/TR/css-values-5/#valdef-request-url-modifier-anonymous", + "type": "value", + "value": "anonymous" + }, + { + "name": "use-credentials", + "prose": " = crossorigin(anonymous | use-credentials)", + "href": "https://www.w3.org/TR/css-values-5/#valdef-request-url-modifier-use-credentials", + "type": "value", + "value": "use-credentials" + }, + { + "name": "", + "value": "integrity()", + "href": "https://www.w3.org/TR/css-values-5/#typedef-request-url-modifier-integrity-modifier", + "type": "type" + }, + { + "name": "integrity()", + "prose": " = integrity()", + "href": "https://www.w3.org/TR/css-values-5/#funcdef-request-url-modifier-integrity", + "type": "function" + }, + { + "name": "", + "value": "referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url)", + "href": "https://www.w3.org/TR/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier", + "type": "type" + }, + { + "name": "referrerpolicy()", + "prose": " = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url)", + "href": "https://www.w3.org/TR/css-values-5/#funcdef-request-url-modifier-referrerpolicy", + "type": "function" + }, + { + "name": "no-referrer", + "prose": " = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url)", + "href": "https://www.w3.org/TR/css-values-5/#valdef-request-url-modifier-no-referrer", + "type": "value", + "value": "no-referrer" + }, + { + "name": "no-referrer-when-downgrade", + "prose": " = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url)", + "href": "https://www.w3.org/TR/css-values-5/#valdef-request-url-modifier-no-referrer-when-downgrade", + "type": "value", + "value": "no-referrer-when-downgrade" + }, + { + "name": "same-origin", + "prose": " = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url)", + "href": "https://www.w3.org/TR/css-values-5/#valdef-request-url-modifier-same-origin", + "type": "value", + "value": "same-origin" + }, + { + "name": "origin", + "prose": " = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url)", + "href": "https://www.w3.org/TR/css-values-5/#valdef-request-url-modifier-origin", + "type": "value", + "value": "origin" + }, + { + "name": "strict-origin", + "prose": " = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url)", + "href": "https://www.w3.org/TR/css-values-5/#valdef-request-url-modifier-strict-origin", + "type": "value", + "value": "strict-origin" + }, + { + "name": "origin-when-cross-origin", + "prose": " = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url)", + "href": "https://www.w3.org/TR/css-values-5/#valdef-request-url-modifier-origin-when-cross-origin", + "type": "value", + "value": "origin-when-cross-origin" + }, + { + "name": "strict-origin-when-cross-origin", + "prose": " = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url)", + "href": "https://www.w3.org/TR/css-values-5/#valdef-request-url-modifier-strict-origin-when-cross-origin", + "type": "value", + "value": "strict-origin-when-cross-origin" + }, + { + "name": "unsafe-url", + "prose": " = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url)", + "href": "https://www.w3.org/TR/css-values-5/#valdef-request-url-modifier-unsafe-url", + "type": "value", + "value": "unsafe-url" + } + ] + }, + { + "name": "progress()", + "prose": "The progress() functional notation returns a value representing the position of one calculation (the progress value) between two other calculations (the progress start value and progress end value). The argument calculations can resolve to any , , or , but must have a consistent type or else the function is invalid. The result will be a , made consistent with the consistent type of the arguments.", + "href": "https://www.w3.org/TR/css-values-5/#funcdef-progress", + "type": "function" + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-values-5/#typedef-progress-fn", + "type": "type", + "value": "progress( from to )" + }, + { + "name": "media-progress()", + "prose": "Similar to the progress() notation, the media-progress() functional notation returns a value representing current value of the specified media query [MEDIAQUERIES-4] as a progress value between two explicit values of the media query (as the progress start value and progress end value).", + "href": "https://www.w3.org/TR/css-values-5/#funcdef-media-progress", + "type": "function" + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-values-5/#typedef-media-progress", + "type": "type", + "value": "media-progress( from to )" + }, + { + "name": "container-progress()", + "prose": "The container-progress() functional notation is identical to the media-progress() functional notation, except that it accepts container features [CSS-CONTAIN-3] in place of media features.", + "href": "https://www.w3.org/TR/css-values-5/#funcdef-container-progress", + "type": "function" + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-values-5/#typedef-container-progress", + "type": "type", + "value": "container-progress( [ of ]? from to )" + }, + { + "name": "", + "prose": "The value type represents the mix progress value in a mix notation, and ultimately resolves to a percentage. It can, however, draw that percentage value from sources such as media queries and animation timelines, and can also convert it through an easing function before using it for interpolation.", + "href": "https://www.w3.org/TR/css-values-5/#typedef-progress", + "type": "type", + "value": "[ | | <'animation-timeline'> ]? && by ", + "values": [ + { + "name": "", + "prose": "Computes to the equivalent : 0% becomes 0, 100% becomes 1, etc.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-progress-percentage-token", + "type": "value", + "value": "" + }, + { + "name": "", + "prose": "Represents the mix progress value.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-progress-number", + "type": "value", + "value": "" + }, + { + "name": "<'animation-timeline'>", + "prose": "Represents the mix progress value as the progress of the specified animation timeline. The values none and auto, however, are invalid. [CSS-ANIMATIONS-2] [WEB-ANIMATIONS-2]", + "href": "https://www.w3.org/TR/css-values-5/#valdef-progress-animation-timeline", + "type": "value", + "value": "<'animation-timeline'>" + }, + { + "name": "", + "prose": "Converts the specified input mix progress value into an output mix progress value using the specified easing function. [CSS-EASING-1]", + "href": "https://www.w3.org/TR/css-values-5/#valdef-progress-easing-function", + "type": "value", + "value": "" + } + ] + }, + { + "name": "calc-mix()", + "prose": "The calc-mix() mix notation represents an interpolated numeric or dimensional value. Like calc(), it is a math function, with the following syntactic form:", + "href": "https://www.w3.org/TR/css-values-5/#funcdef-calc-mix", + "type": "function" + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-values-5/#typedef-calc-mix", + "type": "type", + "value": "calc-mix( , , )" + }, + { + "name": "transform-mix()", + "prose": "The transform-mix() mix notation represents an interpolated , with the following syntactic form:", + "href": "https://www.w3.org/TR/css-values-5/#funcdef-transform-mix", + "type": "function" + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-values-5/#typedef-transform-mix", + "type": "type", + "value": "transform-mix( , , )" + }, + { + "name": "mix()", + "prose": "Interpolation of any two property values can be represented by the mix() mix notation, which supports two alternative syntax patterns:", + "href": "https://www.w3.org/TR/css-values-5/#funcdef-mix", + "type": "function" + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-values-5/#typedef-mix", + "type": "type", + "value": "mix( , , ) | mix( && of <'animation-name'> )" + }, + { + "name": "first-valid()", + "prose": "The first-valid() functional notation inlines the fallback behavior intrinsic to parsing declarations. Unlike most notations, it can accept any valid or invalid syntax in its arguments, and represents the first value among its arguments that is supported (parsed as valid) by the UA as the whole value of the property it’s used in.", + "href": "https://www.w3.org/TR/css-values-5/#funcdef-first-valid", + "type": "function" + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-values-5/#typedef-first-valid", + "type": "type", + "value": "first-valid( # )" + }, + { + "name": "toggle()", + "prose": "The toggle() expression allows descendant elements to cycle over a list of values instead of inheriting the same value.", + "href": "https://www.w3.org/TR/css-values-5/#funcdef-toggle", + "type": "function" + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-values-5/#typedef-toggle", + "type": "type", + "value": "toggle( # )" + }, + { + "name": "attr()", + "prose": "The attr() function substitutes the value of an attribute on an element into a property, similar to how the var() function substitutes a custom property value into a function.", + "href": "https://www.w3.org/TR/css-values-5/#funcdef-attr", + "type": "function", + "value": "attr( ? , ?)", + "values": [ + { + "name": "string", + "prose": "The substitution value is a CSS string, whose value is the literal value of the attribute. (No CSS parsing or \"cleanup\" of the value is performed.) No value triggers fallback.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-attr-string", + "type": "value", + "value": "string" + }, + { + "name": "ident", + "prose": "The substitution value is a CSS , whose value is the literal value of the attribute, with leading and trailing ASCII whitespace stripped. (No CSS parsing of the value is performed.) If the attribute value, after trimming, is the empty string, there is instead no substitution value. If the ’s value is a CSS-wide keyword or default, there is instead no substitution value.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-attr-ident", + "type": "value", + "value": "ident" + }, + { + "name": "color", + "prose": "Parse a component value from the attribute’s value. If the result is a or a named color ident, the substitution value is that result as a . Otherwise there is no substitution value.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-attr-color", + "type": "value", + "value": "color" + }, + { + "name": "number", + "prose": "Parse a component value from the attribute’s value. If the result is a , the result is the substitution value. Otherwise, there is no substitution value.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-attr-number", + "type": "value", + "value": "number" + }, + { + "name": "percentage", + "prose": "Parse a component value from the attribute’s value. If the result is a , the result is the substitution value. Otherwise, there is no substitution value.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-attr-percentage", + "type": "value", + "value": "percentage" + }, + { + "name": "length", + "prose": "Parse a component value from the attribute’s value. If the result is a whose unit matches the given type, the result is the substitution value. Otherwise, there is no substitution value.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-attr-length", + "type": "value", + "value": "length" + }, + { + "name": "angle", + "prose": "Parse a component value from the attribute’s value. If the result is a whose unit matches the given type, the result is the substitution value. Otherwise, there is no substitution value.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-attr-angle", + "type": "value", + "value": "angle" + }, + { + "name": "time", + "prose": "Parse a component value from the attribute’s value. If the result is a whose unit matches the given type, the result is the substitution value. Otherwise, there is no substitution value.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-attr-time", + "type": "value", + "value": "time" + }, + { + "name": "frequency", + "prose": "Parse a component value from the attribute’s value. If the result is a whose unit matches the given type, the result is the substitution value. Otherwise, there is no substitution value.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-attr-frequency", + "type": "value", + "value": "frequency" + }, + { + "name": "flex", + "prose": "Parse a component value from the attribute’s value. If the result is a whose unit matches the given type, the result is the substitution value. Otherwise, there is no substitution value.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-attr-flex", + "type": "value", + "value": "flex" + }, + { + "name": "", + "prose": "Parse a component value from the attribute’s value. If the result is a , the substitution value is a dimension with the result’s value, and the given unit. Otherwise, there is no substitution value.", + "href": "https://www.w3.org/TR/css-values-5/#valdef-attr-dimension-unit", + "type": "value", + "value": "" + } + ] + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-values-5/#typedef-attr-name", + "type": "type", + "value": "[ '|' ]? " + }, + { + "name": "", + "href": "https://www.w3.org/TR/css-values-5/#typedef-attr-type", + "type": "type", + "value": "string | ident | color | number | percentage | length | angle | time | frequency | flex | " + }, + { + "name": "", + "prose": "The production matches a literal \"%\" character (that is, a with a value of \"%\") or an ident whose value is any of the CSS units for , ,