You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
78
78
79
79
<div class='note'>
80
80
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>.
87
87
</pre>
88
88
</div>
89
89
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:
91
91
1. If the |name| is not a valid <<ident>>, <a>throw</a> a <a>NotSupportedError</a> and abort all these steps.
92
92
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.
93
93
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>
98
98
8. If the result of <a>IsArray</a>(argument=|inputProperties|) is false, <a>throw</a> a <a>NotSupportedError</a> and abort all these steps.
99
99
9. Add the key-value pair (|name| - |inputProperties|) to the <b>paint name to input properties map</b> of the associated <a>document</a>.
100
100
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}}.
102
102
103
103
Note: The list of CSS properties provided by the input properties getter can either be custom or native CSS properties.
104
104
@@ -110,9 +110,9 @@ Note: In a future version of the spec, the author may be able to set an option t
110
110
111
111
Issue(w3c/css-houdini-drafts#31): Allow author to specify the intrinsic size.
112
112
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:
114
114
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}}.
116
116
117
117
Paint Notation {#paint-notation}
118
118
================================
@@ -166,13 +166,13 @@ When the user agent wants to <dfn>draw an image</dfn> of a <<paint()>> for a <va
166
166
167
167
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|.
168
168
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:
171
171
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:
174
174
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>.
176
176
177
177
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).
178
178
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
196
196
197
197
Issue(w3c/css-houdini-drafts#23): Decide geometry information should be in level 1.
198
198
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:
201
201
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:
204
204
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>.
206
206
207
207
If an exception is <a>thrown</a> the resulting image output will be an <a>invalid image</a>.
208
208
@@ -234,7 +234,7 @@ Example 1: A colored circle. {#example-1}
234
234
-----------------------------------------
235
235
236
236
<pre class='lang-javascript'>
237
-
// Inside PaintProcessorGlobalScope.
237
+
// Inside PaintWorkletGlobalScope.
238
238
registerPaint('circle', class {
239
239
static get inputProperties() { return ['--circle-color']; }
0 commit comments