Linear gradients are often wrong and radial gradients are not implemented at all.
Created attachment 20532 [details] Correct colors of gradients This only correct the colors of gradients in svg. There are still problems with displaying linear gradients.
Created attachment 20535 [details] Add RadialGradient to Cairo Add basic radialGradient for SVG to Cairo. Don't inclued boundingBoxMode.
Created attachment 20558 [details] Fixed colors and drawing of Gradients in Cairo Fixed colors and drawing of Gradients in Cairo. boundingBoxMode is still missing for radian gradients. (This patch includes previous patches)
Created attachment 20578 [details] Fixed gradients for SVG in Cairo This Patch fixes problems with color-set and drawing of radial and linear gradients (fixed problems with boundingBoxMode too). Have problems with animation and gradients (but I have problems with animation all the time). Should be fixed in another bug-report. I don't believe that it is related to SVGPaintServerGradientCairo. Why should boundingBoxMode use strokeBBox? The qt-port uses something like that and the source-code is bigger with it.
Created attachment 20590 [details] Fixed gradients for SVG in Cairo (forgot a focal-test in radialGradient)
Created attachment 20593 [details] Fixed colors and drawing minor changes
Comment on attachment 20593 [details] Fixed colors and drawing The patch in general looks fine. We don't generally pre-declare variables at the top of a block. That's C-style and this is C++. double cx, fx, cy, fy, radius, fradius; // one example These are extra braces according to our style guidelines: if ((fx + cx) < cx) { + fx = int(cos(angle) * radius) + 1; + } Otherwise it looks fine. Why are there no test changes? Does the GTK build still not have pixel tests?
Created attachment 20611 [details] Fixed gradients for SVG in Cairo Fixes to match coding-style.
Created attachment 20635 [details] Fixed gradients for SVG in Cairo It uses RenderPathCairo's strokeBBox now.
Comment on attachment 20635 [details] Fixed gradients for SVG in Cairo r=me
Landed in r32284.