RESOLVED FIXED 41563
SVG text transformed incorrectly when a transform and gradient applied
https://bugs.webkit.org/show_bug.cgi?id=41563
Summary SVG text transformed incorrectly when a transform and gradient applied
Cameron McCormack (:heycam)
Reported 2010-07-02 22:29:24 PDT
Created attachment 60438 [details] Test showing the problem. If SVG text has a rotation applied to it, and the text is filled with a gradient, then the transformation doesn't look correct. In the attached test, the two texts should differ only by their fill style and a translation.
Attachments
Test showing the problem. (529 bytes, image/svg+xml)
2010-07-02 22:29 PDT, Cameron McCormack (:heycam)
no flags
Screenshot of the problem. (12.21 KB, image/png)
2010-07-02 22:30 PDT, Cameron McCormack (:heycam)
no flags
Initial patch (325.54 KB, patch)
2010-07-08 03:53 PDT, Nikolas Zimmermann
rwlbuis: review+
Cameron McCormack (:heycam)
Comment 1 2010-07-02 22:30:11 PDT
Created attachment 60439 [details] Screenshot of the problem.
Dirk Schulze
Comment 2 2010-07-03 05:11:00 PDT
(In reply to comment #0) > If SVG text has a rotation applied to it, and the text is filled with a gradient, then the transformation doesn't look correct. In the attached test, the two texts should differ only by their fill style and a translation. Works for me on Gtk. Did you test it with the latest nightly?
Cameron McCormack (:heycam)
Comment 3 2010-07-03 05:25:05 PDT
(In reply to comment #2) > Did you test it with the latest nightly? Yes. I didn't notice this problem on Windows either, so my first guess is something in the CG-specific code.
Dirk Schulze
Comment 4 2010-07-03 05:37:11 PDT
Ok, so a problem with the platform text code of Mac perhaps.
Simon Fraser (smfr)
Comment 5 2010-07-03 10:17:55 PDT
Looks like the transformation is being applied twice or something?
Dirk Schulze
Comment 6 2010-07-03 11:59:53 PDT
(In reply to comment #5) > Looks like the transformation is being applied twice or something? It looks like the text also get skewed. So a second transformation get's applied. :-(
Nikolas Zimmermann
Comment 7 2010-07-07 06:50:15 PDT
Should have nothing to do with text, but rather with RenderSVGResourceGradient special case for gradient-on-text on PLATFORM(CG). Will investigate.
Nikolas Zimmermann
Comment 8 2010-07-07 07:54:33 PDT
Just a FYI: got a fix, but have no time atm to write ChangeLog etc, will upload it tomorrow.
Nikolas Zimmermann
Comment 9 2010-07-08 03:53:41 PDT
Created attachment 60864 [details] Initial patch Small fix, large patch due to some changed pixel tests.
Rob Buis
Comment 10 2010-07-08 04:12:24 PDT
Comment on attachment 60864 [details] Initial patch Patch looks fine, just some language and comments fixes are needed which were agreed on with WildFox on IRC.
Nikolas Zimmermann
Comment 11 2010-07-08 04:14:29 PDT
Landed in r62776.
Note You need to log in before you can comment on or make changes to this bug.