Skip to content

Commit cda5ace

Browse files
committed
[css-paint-api] A UA should log an error to the console if it reaches an invalid state.
For example if a class was registered with different input properties, or if a class wasn't registered in all PaintWorkletGlobalScopes. Fixes w3c#342.
1 parent 318824b commit cda5ace

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

css-paint-api/Overview.bs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ called, the user agent <em>must</em> run the following steps:
235235
2. If |existingInputProperties| and |inputProperties| are not equivalent, <a
236236
for=map>set</a> |paintInputPropertiesMap|[|name|] to <code>"invalid"</code>.
237237

238+
3. The user agent <em>should</em> log an error to the debugging console stating that the
239+
same class was registered with different <code>inputProperties</code>.
240+
238241
3. Otherwise, <a for=map>set</a> |paintInputPropertiesMap|[|name|] to |inputProperties|.
239242

240243
Note: The list of input properties should only be looked up once, the class doesn't have the
@@ -416,6 +419,9 @@ When the user agent wants to <dfn>invoke a paint callback</dfn> given |name|, |c
416419

417420
2. <a for=map>Set</a> |paintInputPropertiesMap|[|name|] to <code>"invalid"</code>.
418421

422+
3. The user agent <em>should</em> log an error to the debugging console stating that a
423+
class wasn't registered in all {{PaintWorkletGlobalScope}}s.
424+
419425
2. Let the image output be an <a>invalid image</a> and abort all these steps.
420426

421427
Note: This handles the case where there may be a paint worklet global scope which didn't

0 commit comments

Comments
 (0)