This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27313 - It seems like this should be defined in terms of an IDL enum. If not, please clarify the relationshi [...]
Summary: It seems like this should be defined in terms of an IDL enum. If not, please ...
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: Compositing (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: rcabanie
QA Contact: public-css-bugzilla
URL: https://html.spec.whatwg.org/#dom-con...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-12 12:23 UTC by contributor
Modified: 2018-01-29 14:33 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2014-11-12 12:23:18 UTC
Specification: https://html.spec.whatwg.org/multipage/scripting.html
Multipage: https://html.spec.whatwg.org/multipage/#dom-context-2d-globalcompositeoperation
Complete: https://html.spec.whatwg.org/#dom-context-2d-globalcompositeoperation
Referrer: https://html.spec.whatwg.org/multipage/

Comment:
It seems like this should be defined in terms of an IDL enum. If not, please
clarify the relationship to the referenced document as it does not define
canonical names. E.g. I believe in browsers you need to use "xor", not "XOR".

Posted from: 46.127.136.57 by annevk@annevk.nl
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:36.0) Gecko/20100101 Firefox/36.0
Comment 1 Ian 'Hixie' Hickson 2014-11-12 19:15:56 UTC
The spec says: "These values are all case-sensitive — they must be used exactly as defined. User agents must not recognise values that are not a case-sensitive match for one of the values given in the Compositing and Blending specification."

Is there more that you need here?

Defining this as an Enum is something that could be done, but it should be done in the Compositing and Blending specification, where the keywords are defined.
Comment 2 Anne 2014-11-12 19:56:37 UTC
But that specification has the wrong casing as far as I can tell. I remember all globalCompositeOperation keywords being lowercase.
Comment 3 rcabanie 2014-11-12 20:32:23 UTC
(In reply to Anne from comment #2)
> But that specification has the wrong casing as far as I can tell. I remember
> all globalCompositeOperation keywords being lowercase.

where do you see that they are not lowercase?
Comment 5 rcabanie 2014-11-12 20:40:31 UTC
(In reply to Anne from comment #4)
> E.g. http://dev.w3.org/fxtf/compositing-1/#porterduffcompositingoperators_xor

Those are the descriptions of the algorithms. The values are described here:
http://dev.w3.org/fxtf/compositing-1/#canvascompositingandblending
Comment 6 Anne 2014-11-12 20:45:10 UTC
If you define them in terms of CSS, should CSS escapes now work? Should they be case-insensitive rather than what Ian just said?

I don't think this works.
Comment 7 Ian 'Hixie' Hickson 2014-11-12 23:02:19 UTC
Yeah that spec should be fixed to define the API surface, not just CSS.
Comment 8 Anne 2018-01-29 14:33:14 UTC
Filed https://github.com/w3c/fxtf-drafts/issues/252.