Bug 41563

Summary: SVG text transformed incorrectly when a transform and gradient applied
Product: WebKit Reporter: Cameron McCormack (:heycam) <heycam>
Component: SVGAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal CC: krit, simon.fraser, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.6   
Attachments:
Description Flags
Test showing the problem.
none
Screenshot of the problem.
none
Initial patch rwlbuis: review+

Description Cameron McCormack (:heycam) 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.
Comment 1 Cameron McCormack (:heycam) 2010-07-02 22:30:11 PDT
Created attachment 60439 [details]
Screenshot of the problem.
Comment 2 Dirk Schulze 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?
Comment 3 Cameron McCormack (:heycam) 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.
Comment 4 Dirk Schulze 2010-07-03 05:37:11 PDT
Ok, so a problem with the platform text code of Mac perhaps.
Comment 5 Simon Fraser (smfr) 2010-07-03 10:17:55 PDT
Looks like the transformation is being applied twice or something?
Comment 6 Dirk Schulze 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. :-(
Comment 7 Nikolas Zimmermann 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.
Comment 8 Nikolas Zimmermann 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.
Comment 9 Nikolas Zimmermann 2010-07-08 03:53:41 PDT
Created attachment 60864 [details]
Initial patch

Small fix, large patch due to some changed pixel tests.
Comment 10 Rob Buis 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.
Comment 11 Nikolas Zimmermann 2010-07-08 04:14:29 PDT
Landed in r62776.