Skip to content

Commit db69bd2

Browse files
committed
[css-paint-api][css-properties-and-values-api] %s/processor/worklet/gc
1 parent 7dc1284 commit db69bd2

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

css-paint-api/Overview.bs

+17-17
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ Registering Custom Paint {#registering-custom-paint}
6868
<pre class='idl'>
6969
callback VoidFunction = void ();
7070

71-
interface PaintProcessorGlobalScope : ProcessorGlobalScope {
71+
interface PaintWorkletGlobalScope : WorkletGlobalScope {
7272
void registerPaint(DOMString name, VoidFunction paintCtor);
7373
void unregisterPaint(DOMString name);
7474
};
7575
</pre>
7676

77-
A {{PaintProcessorGlobalScope}} has a map of <b>name to paint instance map</b>. Initially this map is empty; it is populated when {{registerPaint(name, paintCtor)}} is called.
77+
A {{PaintWorkletGlobalScope}} has a map of <b>name to paint instance map</b>. Initially this map is empty; it is populated when {{registerPaint(name, paintCtor)}} is called.
7878

7979
<div class='note'>
8080
Note: This is how the class should look.
@@ -87,7 +87,7 @@ A {{PaintProcessorGlobalScope}} has a map of <b>name to paint instance map</b>.
8787
</pre>
8888
</div>
8989

90-
When the <dfn method for=PaintProcessorGlobalScope>registerPaint(<var>name</var>, <var>paintCtor</var>)</dfn> method is called, the user agent <em>must</em> run the following steps:
90+
When the <dfn method for=PaintWorkletGlobalScope>registerPaint(<var>name</var>, <var>paintCtor</var>)</dfn> method is called, the user agent <em>must</em> run the following steps:
9191
1. If the |name| is not a valid <<ident>>, <a>throw</a> a <a>NotSupportedError</a> and abort all these steps.
9292
2. If the |name| exists as a key in the <b>name to paint instance map</b>, <a>throw</a> a <a>NotSupportedError</a> and abort all these steps.
9393
3. If the result of <a>IsConstructor</a>(argument=|paintCtor|) is false, <a>throw</a> a <a>NotSupportedError</a> and abort all these steps.
@@ -98,7 +98,7 @@ When the <dfn method for=PaintProcessorGlobalScope>registerPaint(<var>name</var>
9898
8. If the result of <a>IsArray</a>(argument=|inputProperties|) is false, <a>throw</a> a <a>NotSupportedError</a> and abort all these steps.
9999
9. Add the key-value pair (|name| - |inputProperties|) to the <b>paint name to input properties map</b> of the associated <a>document</a>.
100100
10. Let <var>paintInstance</var> be the result of <a>Construct</a>(|paintCtor|).
101-
11. Add the key-value pair (|name| - |paintInstance|) to the <b>name to paint instance map</b> of the {{PaintProcessorGlobalScope}}.
101+
11. Add the key-value pair (|name| - |paintInstance|) to the <b>name to paint instance map</b> of the {{PaintWorkletGlobalScope}}.
102102

103103
Note: The list of CSS properties provided by the input properties getter can either be custom or native CSS properties.
104104

@@ -110,9 +110,9 @@ Note: In a future version of the spec, the author may be able to set an option t
110110

111111
Issue(w3c/css-houdini-drafts#31): Allow author to specify the intrinsic size.
112112

113-
When the <dfn method for=PaintProcessorGlobalScope>unregisterPaint(<var>name</var>)</dfn> method is called, the user agent <em>must</em> run the following steps:
113+
When the <dfn method for=PaintWorkletGlobalScope>unregisterPaint(<var>name</var>)</dfn> method is called, the user agent <em>must</em> run the following steps:
114114
1. Remove the key-value pair associated with the |name| key in the <b>paint name to input properties map</b> of the associated <a>document</a>.
115-
2. Remove the key-value pair associated with the |name| key in the <b>name to paint instance map</b> of the {{PaintProcessorGlobalScope}}.
115+
2. Remove the key-value pair associated with the |name| key in the <b>name to paint instance map</b> of the {{PaintWorkletGlobalScope}}.
116116

117117
Paint Notation {#paint-notation}
118118
================================
@@ -166,13 +166,13 @@ When the user agent wants to <dfn>draw an image</dfn> of a <<paint()>> for a <va
166166

167167
5. Let <var>styleMap</var> be a new {{StylePropertyMap}} populated with <em>only</em> the <a>computed value</a>'s for properties listed in |inputProperties|.
168168

169-
6. Let <var>overflow</var> be the result <a>invoke a method on a class inside a Processor</a> given "overflow" as the <em>methodPropertyKey</em> and [|styleMap|] as the <em>arguments</em> with the following options:
170-
- To <a>create a processor global scope</a> the user agent will:
169+
6. Let <var>overflow</var> be the result <a>invoke a method on a class inside a Worklet</a> given "overflow" as the <em>methodPropertyKey</em> and [|styleMap|] as the <em>arguments</em> with the following options:
170+
- To <a>create a worklet global scope</a> the user agent will:
171171

172-
Return a new {{PaintProcessorGlobalScope}}.
173-
- To <a>lookup a class instance on a processor global scope</a> given a |processorGlobalScope|, the user agent will:
172+
Return a new {{PaintWorkletGlobalScope}}.
173+
- To <a>lookup a class instance on a worklet global scope</a> given a |workletGlobalScope|, the user agent will:
174174

175-
Return the result of looking up |name| on the |processorGlobalScope|'s <b>name to paint instance map</b>.
175+
Return the result of looking up |name| on the |workletGlobalScope|'s <b>name to paint instance map</b>.
176176

177177
Note: User agents may have to compute overflow before entering their paint phase in order to determine which fragments to paint (overflow changes what could be seen on the output device).
178178
User agents may opt into running the steps up to this point, to determine overflow, then continuing later to determine the drawn image for the fragments which need painting.
@@ -196,13 +196,13 @@ When the user agent wants to <dfn>draw an image</dfn> of a <<paint()>> for a <va
196196

197197
Issue(w3c/css-houdini-drafts#23): Decide geometry information should be in level 1.
198198

199-
9. To produce the image output, <a>invoke a method on a class inside a Processor</a> given "paint" as the <em>methodPropertyKey</em> and [|renderingContext|, |geometry|, |styleMap|] as the <em>arguments</em> with the following options:
200-
- To <a>create a processor global scope</a> the user agent will:
199+
9. To produce the image output, <a>invoke a method on a class inside a Worklet</a> given "paint" as the <em>methodPropertyKey</em> and [|renderingContext|, |geometry|, |styleMap|] as the <em>arguments</em> with the following options:
200+
- To <a>create a worklet global scope</a> the user agent will:
201201

202-
Return a new {{PaintProcessorGlobalScope}}.
203-
- To <a>lookup a class instance on a processor global scope</a> given a |processorGlobalScope|, the user agent will:
202+
Return a new {{PaintWorkletGlobalScope}}.
203+
- To <a>lookup a class instance on a worklet global scope</a> given a |workletGlobalScope|, the user agent will:
204204

205-
Return the result of looking up |name| on the |processorGlobalScope|'s <b>name to paint instance map</b>.
205+
Return the result of looking up |name| on the |workletGlobalScope|'s <b>name to paint instance map</b>.
206206

207207
If an exception is <a>thrown</a> the resulting image output will be an <a>invalid image</a>.
208208

@@ -234,7 +234,7 @@ Example 1: A colored circle. {#example-1}
234234
-----------------------------------------
235235

236236
<pre class='lang-javascript'>
237-
// Inside PaintProcessorGlobalScope.
237+
// Inside PaintWorkletGlobalScope.
238238
registerPaint('circle', class {
239239
static get inputProperties() { return ['--circle-color']; }
240240
paint(ctx, geom, properties) {

css-properties-values-api/Overview.bs

+5-6
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ Editor: Elliot Sprehn, esprehn@chromium.org
1414
Editor: Greg Whitworth, gwhit@microsoft.com
1515
Ignored Terms: boolean, Animatable, Map, Context, isolated worker, SyntaxError,
1616
Ignored Terms: InvalidModificationError, NotFoundError, StylePropertyMapReadOnly,
17-
Ignored Terms: processor global scope
18-
Ignored Terms: Worklet, throw, NotSupportedError, isconstructor, get, iscallable,
19-
Ignored Terms: construct, name map of inputs, invoke a method on a class inside a worklet
20-
Ignored Terms: create a worklet global scope, lookup a class instance on a worklet global scope
17+
Ignored Terms: worklet global scope
18+
Ignored Terms: throw, NotSupportedError, isconstructor, get, iscallable,
19+
Ignored Terms: construct, name map of inputs
2120
Ignored Vars: arguments, methodPropertyKey, inputStyleMap, workletGlobalScope
2221
Repository: w3c/css-houdini-drafts
2322
At Risk: the apply hook (<a section href="#the-apply-hook"></a>)
@@ -232,7 +231,7 @@ dictionary ApplyDescriptor {
232231

233232
callback VoidFunction = void ();
234233

235-
interface StyleWorklet : Worklet {
234+
interface StyleWorklet : WorkletGlobalScope {
236235
void registerApplyHook(DOMString name, VoidFunction applyCtor, ApplyDescriptor config);
237236
void unregisterApplyHook(DOMString name);
238237
};
@@ -252,7 +251,7 @@ The {{ElementProxy}} interface {#the-elementproxy-interface}
252251
------------------------------------------------------------
253252

254253
{{ElementProxy}} objects represent the partial state of DOM objects that are
255-
available to apply hooks running in <a>processor global scope</a>s. They provide
254+
available to apply hooks running in <a>worklet global scope</a>s. They provide
256255
the following attributes:
257256

258257
: inputStyle

0 commit comments

Comments
 (0)