w3c/css-houdini-drafts

[css-paint-api] invoke a paint callback steps seem to be confused about what object types they are working with

Opened this issue · 2 comments

https://www.w3.org/TR/css-paint-api-1/#invoke-a-paint-callback step 1 says:

Let paintDefinitionMap be workletGlobalScope’s paint definitions map.

and https://www.w3.org/TR/css-paint-api-1/#paint-definitions defines that to be a "map" in the sense of https://infra.spec.whatwg.org/#ordered-map -- so far so good.

But then step 3 says:

Let definition be the result of get paintDefinitionMap[name].

where "get" links to https://tc39.es/ecma262/#sec-get-o-p which is an operation performed on ES objects, not infra maps. There are lots of other instances of this broken "get" usage in this algorithm too.

The simplest fix is probably to just remove the "get" bit completely; https://infra.spec.whatwg.org/#map-get already defines paintDefinitionMap[name] to do the right thing.