What this checks
This sampler checks whether ctx.globalCompositeOperation = "plus-darker" is accepted and whether a few pixels match the CSSWG/WebKit-aligned formula.
Fix CL: Chromium 7966179 adds Chromium-side canvas and paint plumbing for plus-darker, with WPT and recorder coverage in css/compositing/canvas-plus-darker.html.
alpha = min(1, sourceAlpha + destinationAlpha)
color = max(0, alpha - min(1,
sourceAlpha * (1 - sourceColor) + destinationAlpha * (1 - destinationColor)))
On unpatched Chromium, assignment falls back to source-over. On a patched build, the reported operation remains plus-darker and the pixel checks pass.
Live result
Rendered
Expected pattern
left to right: transparent red over blue, half red over half blue, opaque gray over black.
Pixel checks
| case | actual rgba | expected rgba | result |
|---|
Links followed
- w3c/fxtf-drafts#447: CSSWG resolved to define plus-darker from Safari/WebKit research.
- w3c/csswg-drafts#9276: view transitions should use plus-lighter or plus-darker based on color-scheme.
- Chromium issue 40281895: dependent view-transition color-scheme work.
- WPT PR 41713: canvas composite-mode test used for RED/GREEN validation.
- Chromium CL 7966179: adds plus-darker to canvas globalCompositeOperation and adds
canvas-plus-darker.html.