Created attachment 231505 [details] Test Applying a stroke after globalCompositeOperation has been set to destination-in, destination-atop, source-in, source-out or copy does not result in correct rendering. See the attached file and/or fiddle. It draws pairs of canvases, one doing a stroke, setting compositing, then filling, the other filling, setting the complementing compositing mode, then stroking. What is the expected behavior? The pairs should be the same, e.g. stroke, source-in, fill should be the same as fill, dest-in, stroke. What went wrong? The stroke doesn't appear to be applied in the destination-in, destination-atop cases and does the wrong thing for source-in, source-out and copy. The rendering is correct on Opera 12 and Firefox 29 Linux and is also broken on Chrome 34 (https://code.google.com/p/chromium/issues/detail?id=373692). The current Safari output is also badly affected by https://bugs.webkit.org/show_bug.cgi?id=132948 and https://bugs.webkit.org/show_bug.cgi?id=132949. Safari is broken on both MacOS 10.9.2 (Safari 7.0.3) and iOS 7.1.1.
Created attachment 231506 [details] Safari rendering
Created attachment 231507 [details] Expected rendering
Safari 16 now matches the expected rendering.