Two of the test cases added in bug 526402 assert that a gradient drawn from point A to point B, color X to color Y, is pixel-identical with a gradient drawn from B to A, color Y to X. We currently manage this visually but not pixel-for-pixel (thus those test cases are todos). Examining the test and reference images for the simpler of these tests in an image editor, it appears to me that the problem is with mapping the endpoints onto the box. aja-linear-1b draws a vertical gradient from bottom up, blue to yellow, and expects it to match a vertical gradient from top down, yellow to blue. Here's the pixel values for the top and bottom four rows of test and reference: test reference #fdfd01 #ffff00 #fcfc02 #fefe00 #fbfb03 #fcfc02 #f9f905 #fbfb03 ... ... #0303fb #0505f9 #0202fc #0303fb #0000fe #0202fc #0000ff #0101fd so that looks to me like the map from (x,y) to t is shifted by two pixels, or possibly two and a half pixels, between the two. Fencepost error? Note that the problem can be reproduced with canvas as well as with CSS gradients, and is consistent among canvas/canvas, canvas/CSS, CSS/canvas, CSS/CSS; so I imagine it is in thebes or cairo.
Still a bug everywhere (Except d2d).
Component: Graphics → Canvas: 2D
Uh, why did you recharacterize this as a *canvas* bug? It can be triggered by CSS gradients.
Component: Canvas: 2D → Graphics
Right, accidental change.
You need to log in before you can comment on or make changes to this bug.