With https://bugs.webkit.org/show_bug.cgi?id=234492, we added support for choosing between premultiplied alpha and unpremultiplied alpha color stop interpolation for Gradient, but only for the CoreGraphics backend. To support CSS gradients, the Cairo needs to add support for both modes as well (the unpremultiplied case is still needed for SVG and Canvas).
AFAIU, with Cairo we set the colors for the stops un-premultiplied (because there is no other option, that's what the public API allows), then Cairo pre-multiplies color values while building its internal state, then internally always does calculations using premultiplied values, meaning that when painting a gradient it will interpolate stop colors which are premultiplied — there is no way of telling Cairo to calculate interpolaton of gradient stops un-premultiplied. Meaning: with Cairo the way it paints gradiants the output is correct for CSS, but not SVG/Canvas. (Take this with some big grains of salt, I am not a graphics expert, what I *think* know is from looking sometimes inside Cairo in the last months.)
(In reply to Adrian Perez from comment #1) > Meaning: with Cairo the way it paints gradiants the output > is correct for CSS, but not SVG/Canvas. Is this right? fast/gradients/alpha-premultiplied.html is failing for Cairo ports. This is not a test case for SVG or Canvas.
<rdar://problem/86985929>