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{{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.
79
+
The{{RenderWorkletGlobalScope}} 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.
80
80
81
81
<div class='note'>
82
82
Note: This is how the class should look.
@@ -89,7 +89,7 @@ A {{PaintWorkletGlobalScope}} has a map of <b>name to paint instance map</b>. In
89
89
</pre>
90
90
</div>
91
91
92
-
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:
92
+
When the <dfn method for=RenderWorkletGlobalScope>registerPaint(<var>name</var>, <var>paintCtor</var>)</dfn> method is called, the user agent <em>must</em> run the following steps:
93
93
1. If the |name| is not a valid <<ident>>, <a>throw</a> a <a>NotSupportedError</a> and abort all these steps.
94
94
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.
95
95
3. If the result of <a>IsConstructor</a>(argument=|paintCtor|) is false, <a>throw</a> a <a>NotSupportedError</a> and abort all these steps.
@@ -100,7 +100,7 @@ When the <dfn method for=PaintWorkletGlobalScope>registerPaint(<var>name</var>,
100
100
8. If the result of <a>IsArray</a>(argument=|inputProperties|) is false, <a>throw</a> a <a>NotSupportedError</a> and abort all these steps.
101
101
9. Add the key-value pair (|name| - |inputProperties|) to the <b>paint name to input properties map</b> of the associated <a>document</a>.
102
102
10. Let <var>paintInstance</var> be the result of <a>Construct</a>(|paintCtor|).
103
-
11. Add the key-value pair (|name| - |paintInstance|) to the <b>name to paint instance map</b> of the {{PaintWorkletGlobalScope}}.
103
+
11. Add the key-value pair (|name| - |paintInstance|) to the <b>name to paint instance map</b> of the {{RenderWorkletGlobalScope}}.
104
104
105
105
Note: The list of CSS properties provided by the input properties getter can either be custom or native CSS properties.
106
106
@@ -112,9 +112,9 @@ Note: In a future version of the spec, the author may be able to set an option t
112
112
113
113
Issue(w3c/css-houdini-drafts#31): Allow author to specify the intrinsic size.
114
114
115
-
When the <dfn method for=PaintWorkletGlobalScope>unregisterPaint(<var>name</var>)</dfn> method is called, the user agent <em>must</em> run the following steps:
115
+
When the <dfn method for=RenderWorkletGlobalScope>unregisterPaint(<var>name</var>)</dfn> method is called, the user agent <em>must</em> run the following steps:
116
116
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>.
117
-
2. Remove the key-value pair associated with the |name| key in the <b>name to paint instance map</b> of the {{PaintWorkletGlobalScope}}.
117
+
2. Remove the key-value pair associated with the |name| key in the <b>name to paint instance map</b> of the {{RenderWorkletGlobalScope}}.
118
118
119
119
Paint Notation {#paint-notation}
120
120
================================
@@ -219,7 +219,7 @@ When the user agent wants to <dfn>draw an image</dfn> of a <<paint()>> for a <va
219
219
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:
220
220
- To <a>create a worklet global scope</a> the user agent will:
221
221
222
-
Return a new {{PaintWorkletGlobalScope}}.
222
+
Return a new {{RenderWorkletGlobalScope}}.
223
223
- To <a>lookup a class instance on a worklet global scope</a> given a |workletGlobalScope|, the user agent will:
224
224
225
225
Return the result of looking up |name| on the |workletGlobalScope|'s <b>name to paint instance map</b>.
@@ -244,7 +244,7 @@ When the user agent wants to <dfn>draw an image</dfn> of a <<paint()>> for a <va
244
244
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:
245
245
- To <a>create a worklet global scope</a> the user agent will:
246
246
247
-
Return a new {{PaintWorkletGlobalScope}}.
247
+
Return a new {{RenderWorkletGlobalScope}}.
248
248
- To <a>lookup a class instance on a worklet global scope</a> given a |workletGlobalScope|, the user agent will:
249
249
250
250
Return the result of looking up |name| on the |workletGlobalScope|'s <b>name to paint instance map</b>.
@@ -279,7 +279,7 @@ Example 1: A colored circle. {#example-1}
279
279
-----------------------------------------
280
280
281
281
<pre class='lang-javascript'>
282
-
// Inside PaintWorkletGlobalScope.
282
+
// Inside RenderWorkletGlobalScope.
283
283
registerPaint('circle', class {
284
284
static get inputProperties() { return ['--circle-color']; }
0 commit comments