Summary: | Canvas 2d globalCompositeOperation source-in, source-out, destination-in, destination-atop, darker and copy are broken | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Stefan Wehrmeyer <stefanwehrmeyer> | ||||
Component: | Canvas | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED DUPLICATE | ||||||
Severity: | Normal | CC: | benwells, chuck, hamaji, imgroxx, jchaffraix, jiminizer, kangax, mdelaney7, mike, oliver, VYV03354 | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
URL: | https://developer.mozilla.org/samples/canvas-tutorial/6_1_canvas_composite.html | ||||||
Attachments: |
|
Description
Stefan Wehrmeyer
2010-05-16 07:42:51 PDT
We believe the spec is wrong in its definition of these behaviours. The spec behaviour is inconsistent with the original canvas implementation from webkit, and is less powerful. (In reply to comment #1) > We believe the spec is wrong in its definition of these behaviours. The spec behaviour is inconsistent with the original canvas implementation from webkit, and is less powerful. ... And is slower. *** Bug 34027 has been marked as a duplicate of this bug. *** (In reply to comment #1) > We believe the spec is wrong in its definition of these behaviours. I believe the spec has been updated, and Mozilla has changed their behavior in FF4. Case closed? The behavior of compositing in Webkit is still not compliant to the spec. Firefox and Opera behave the same and as far as I can see compliant to the HTML5 canvas spec. The "darker" compositing mode is not in the spec, but the description in the bug report still holds. I'm the developer of Mapnificent.net and I'm relying on the "destination-in" compositing mode to implement intersections of two areas, see this link (in a Firefox browser) for an example: http://bit.ly/hkqzBN That doesn't work in Webkit browsers and it is pretty frustrating. I don't know which spec Webkit needs to implement, but I would vote for the HTML5 Canvas spec instead of the original canvas implementation (that might be inconsistent to the current spec). As a developer I want my HTML5 application to work the same across browsers and currently Webkit is the only one stepping out of line. Please someone confirm this or make a decision. Oliver, your thoughts on this? FYI, I posted a patch to correct the source-in and source-out behavior for fillRect as part of bug39027 as FF4, IE9 and Opera all matches the specification and we are the only one standing out. I'm in the same position as Stefan here. Without destination-in working to specification, my app won't work on Webkit based browsers. The specification still reflects how I believe destination-in should work (show destination only where destination and source overlap) and other browsers implement this correctly. If the behaviour of the specification is "less powerful" than the webkit implementation, then surely there must at least be a webkit specific way of achieving what is defined in the specification as "destination-in". |