Re: [fxtf-drafts] Canvas 2D integration needs to be better

Agree that this is a DOM definition and so should use the IDL syntax.

Should the mix-in interface that uses these values also be defined in this spec, or is it sufficient to define the enum here and reference it from the canvas specs?

Alternatively, the canvas spec could define the entire IDL (including the enum of possible values) and link to the individual composite mode definitions to define what the keywords mean.  It would mean that any updates to add new composite modes would need edits to both specs, but I don't expect that will happen often with composite modes (as opposed to blend modes.)

For reference, the current [HTML (Living Standard) definition of the function](https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-globalcompositeoperation) is:

> ```
>  interface mixin CanvasCompositing {
>   // compositing
>   attribute unrestricted double globalAlpha; // (default 1.0)
>   attribute DOMString globalCompositeOperation; // (default source-over)
> };
> ```
>
>The globalCompositeOperation attribute sets the current composition operator, which controls how shapes and images are drawn onto the output bitmap, once they have had globalAlpha and the current transformation matrix applied. The possible values are those defined in the Compositing and Blending specification, and include the values source-over and copy. 

(Aside: the links in the Compositing & Blending spec should probably be changed to point to the WHATWG Living Standard instead of the no-longer-updated W3C Canvas2D spec.)

__________________________

@dirkschulze Would you be willing to take on this spec as a new editor? There would need to be an active editor to publish an update.

Also since the spec is already CR, we'd need to get an opinion from the WG as to whether this counts as an editorial clean-up or if it requires a new WD then CR.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/252#issuecomment-361461331 using your GitHub account

Received on Tuesday, 30 January 2018 02:58:52 UTC