The change on GraphcisContextCG in http://trac.webkit.org/changeset/75139 caused a problem with filling and stroking texts with gradients in SVG. The order of concatCTM and clipRect was mixed up.
Created attachment 79253 [details] Patch
Comment on attachment 79253 [details] Patch Hm. the question is, why is the shadow not black? Do you see similar behaviors on Canvas rect with shadow? Or Canvas texts and shadow? (filled with a gradient of course).
(In reply to comment #2) > (From update of attachment 79253 [details]) > Hm. the question is, why is the shadow not black? Do you see similar behaviors on Canvas rect with shadow? Or Canvas texts and shadow? (filled with a gradient of course). Looks like I asked the same thing at the same time on https://bugs.webkit.org/show_bug.cgi?id=51869#c24 :) On canvas, the shadow is black for rect and text (or whatever color is set to it). The non-black SVG text-shadow is the behavior I get if I go back some revisions. Same in Google Chrome Dev Channel on Mac. So, this is not something that was broken recently.
Comment on attachment 79253 [details] Patch I trust you, if you say it was wrong before you committed your patch. r=me.
I tested this patch on Leopard, it fixes _most_ issues. But svg/css/composite-shadow-text.svg remains broken, the first gradient doesn't show up. Gradient on text remains broken, when a shadow is also applied to the target. <rect fill="url(#someGradient" style="-webkit-svg-shadow: ..../">
Comment on attachment 79253 [details] Patch Clearing flags on attachment: 79253 Committed r76029: <http://trac.webkit.org/changeset/76029>
All reviewed patches have been landed. Closing bug.
(In reply to comment #5) > I tested this patch on Leopard, it fixes _most_ issues. > But svg/css/composite-shadow-text.svg remains broken, the first gradient doesn't show up. > > Gradient on text remains broken, when a shadow is also applied to the target. > <rect fill="url(#someGradient" style="-webkit-svg-shadow: ..../"> I feared it. I have hoped that SVG Text + text-shadow covers it :-( Niko, can you check if removing the if and it's content makes it run again?
(In reply to comment #3) > On canvas, the shadow is black for rect and text (or whatever color is set to it). The non-black SVG text-shadow is the behavior I get if I go back some revisions. Same in Google Chrome Dev Channel on Mac. So, this is not something that was broken recently. But when was it broken?
(In reply to comment #9) > (In reply to comment #3) > > > On canvas, the shadow is black for rect and text (or whatever color is set to it). The non-black SVG text-shadow is the behavior I get if I go back some revisions. Same in Google Chrome Dev Channel on Mac. So, this is not something that was broken recently. > > But when was it broken? We never had test cases for SVG texts, filled with a gradient together with a text shadow. All test cases were with solid colors and they still run. It's likely that it never worked. Needs to be checked.
(In reply to comment #10) > (In reply to comment #9) > > (In reply to comment #3) > > > > > On canvas, the shadow is black for rect and text (or whatever color is set to it). The non-black SVG text-shadow is the behavior I get if I go back some revisions. Same in Google Chrome Dev Channel on Mac. So, this is not something that was broken recently. > > > > But when was it broken? > > We never had test cases for SVG texts, filled with a gradient together with a text shadow. All test cases were with solid colors and they still run. It's likely that it never worked. Needs to be checked. Well we have svg/css/composite-shadow-text.svg, added recently which covers svg gradient + -webkit-svg-shadow, that is broken atm.
Helder, do you plan to fix it, or should we roll out the patch?
(In reply to comment #12) > Helder, do you plan to fix it, or should we roll out the patch? Of course, we need composite-shadow-text.svg to work again. I'll look at it asap. Any hints are more than welcome, since I've never touched SVG code and I'm new to CG.
Created attachment 80025 [details] context -> layerContext. This fixes the SVG text gradient fill.
Created attachment 80026 [details] Translate layerContext CTM - make pixel test succeed again
Comment on attachment 80026 [details] Translate layerContext CTM - make pixel test succeed again Makes sense. r=me
(In reply to comment #16) > (From update of attachment 80026 [details]) > Makes sense. r=me Thanks. Can you please reopen the bug (and possibly reapply R+) so that the patch gets sent to the CQ? Or maybe land it manually.
reopening for landing the patch.
Comment on attachment 80026 [details] Translate layerContext CTM - make pixel test succeed again Clearing flags on attachment: 80026 Committed r76612: <http://trac.webkit.org/changeset/76612>