Skip to content

Commit

Permalink
Reflect worklets moving to HTML (#1011)
Browse files Browse the repository at this point in the history
See #1000.
  • Loading branch information
domenic authored Oct 16, 2020
1 parent b7d7411 commit eb1a482
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 640 deletions.
23 changes: 11 additions & 12 deletions css-layout-api/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Former Editor: Shane Stephens, [email protected], w3cid 47691
Editor: Robert O'Callahan, [email protected]
Editor: Rossen Atanassov, [email protected], w3cid 49885
Ignored Terms: LayoutWorklet
Ignored Terms: create a workletglobalscope
</pre>

<style>
Expand Down Expand Up @@ -1776,11 +1775,10 @@ context=] for a given |box|, |childBoxes| it <em>must</em> run the following ste
<code>"invalid"</code>, then let |box| fallback to the [=flow layout=] and abort all these
steps.

4. Let |workletGlobalScope| be a {{LayoutWorkletGlobalScope}} from the list of [=worklet's
WorkletGlobalScopes=] from the layout {{Worklet}}, following the rules defined in
[[#global-scope-selection]].
4. Let |workletGlobalScope| be a {{LayoutWorkletGlobalScope}} from the layout {{Worklet}}'s
[=Worklet/global scopes=], following the rules defined in [[#global-scope-selection]].

The user agent <em>may</em> also [=create a WorkletGlobalScope=] at this time, given the
The user agent <em>may</em> also [=create a worklet global scope=] at this time, given the
layout {{Worklet}}.

5. Run [=invoke an intrinsic sizes callback=] given |name|, |box|, |childBoxes|, and
Expand Down Expand Up @@ -1889,11 +1887,10 @@ it <em>must</em> run the following steps:
<code>"invalid"</code>, then let |box| fallback to the [=flow layout=] and abort all these
steps.

4. Let |workletGlobalScope| be a {{LayoutWorkletGlobalScope}} from the list of [=worklet's
WorkletGlobalScopes=] from the layout {{Worklet}}, following the rules defined in
[[#global-scope-selection]].
4. Let |workletGlobalScope| be a {{LayoutWorkletGlobalScope}} from the layout {{Worklet}}'s
[=Worklet/global scopes=], following the rules defined in [[#global-scope-selection]].

The user agent <em>may</em> also [=create a WorkletGlobalScope=] at this time, given the
The user agent <em>may</em> also [=create a worklet global scope=] at this time, given the
layout {{Worklet}}.

5. Run [=invoke a layout callback=] given |name|, |box|, |childBoxes|,
Expand Down Expand Up @@ -2021,8 +2018,8 @@ following steps:

### Global Scope Selection ### {#global-scope-selection}

When the user agent needs to select a {{LayoutWorkletGlobalScope}} from the layout [=worklet's
WorkletGlobalScopes=] [=list=] it <em>must</em>:
When the user agent needs to select a {{LayoutWorkletGlobalScope}} from the layout {{Worklet}}'s
[=Worklet/global scopes=] [=list=] it <em>must</em>:

- Select from at <em>least</em> two {{LayoutWorkletGlobalScope}}s, unless the user agent is
under memory constraints.
Expand All @@ -2033,7 +2030,9 @@ WorkletGlobalScopes=] [=list=] it <em>must</em>:
over time.

Note: These rules exist to ensure that authors do not rely on being able to store state on the
global object or non-regeneratable state on the class. See [[worklets-1#code-idempotency]].
global object or non-regeneratable state on the class. See
<a href="https://html.spec.whatwg.org/multipage/worklets.html#worklets-idempotent">the
discussion in the worklets specification about code idempotence</a>.

### Utility Algorithms ### {#utility-algorithms}

Expand Down
15 changes: 8 additions & 7 deletions css-paint-api/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -536,11 +536,10 @@ with), given |snappedConcreteObjectSize| it <em>must</em> run the following step
arguments.
</div>

10. Let |workletGlobalScope| be a {{PaintWorkletGlobalScope}} from the list of [=worklet's
WorkletGlobalScopes=] from the paint {{Worklet}}, following the rules defined in
[[#global-scope-selection]].
10. Let |workletGlobalScope| be a {{PaintWorkletGlobalScope}} from the the paint {{Worklet}}'s
[=Worklet/global scopes=], following the rules defined in [[#global-scope-selection]].

The user agent <em>may</em> also [=create a WorkletGlobalScope=] at this time, given the
The user agent <em>may</em> also [=create a worklet global scope=] at this time, given the
paint {{Worklet}}.

11. Run [=invoke a paint callback=] given |name|, |inputArguments|, |snappedConcreteObjectSize|,
Expand Down Expand Up @@ -686,8 +685,8 @@ Note: The contents of the resulting image are not designed to be accessible. Aut
Global Scope Selection {#global-scope-selection}
------------------------------------------------

When the user agent needs to select a {{PaintWorkletGlobalScope}} from the paint [=worklet's
WorkletGlobalScopes=] [=list=] it <em>must</em>:
When the user agent needs to select a {{PaintWorkletGlobalScope}} from the paint {{Worklet}}'s
[=Worklet/global scopes=] [=list=] it <em>must</em>:

- Select from at <em>least</em> two {{PaintWorkletGlobalScope}}s, unless the user agent is under
memory constraints.
Expand All @@ -698,7 +697,9 @@ WorkletGlobalScopes=] [=list=] it <em>must</em>:
over time.

Note: These rules exist to ensure that authors do not rely on being able to store state on the
global object or non-regeneratable state on the class. See [[worklets-1#code-idempotency]].
global object or non-regeneratable state on the class. See
<a href="https://html.spec.whatwg.org/multipage/worklets.html#worklets-idempotent">the
discussion in the worklets specification about code idempotence</a>.

Examples {#examples}
====================
Expand Down
Loading

0 comments on commit eb1a482

Please sign in to comment.