Bug 41563 - SVG text transformed incorrectly when a transform and gradient applied
Summary: SVG text transformed incorrectly when a transform and gradient applied
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.6
: P2 Normal
Assignee: Nikolas Zimmermann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-02 22:29 PDT by Cameron McCormack
Modified: 2010-07-08 04:14 PDT (History)
3 users (show)

See Also:


Attachments
Test showing the problem. (529 bytes, image/svg+xml)
2010-07-02 22:29 PDT, Cameron McCormack
no flags Details
Screenshot of the problem. (12.21 KB, image/png)
2010-07-02 22:30 PDT, Cameron McCormack
no flags Details
Initial patch (325.54 KB, patch)
2010-07-08 03:53 PDT, Nikolas Zimmermann
rwlbuis: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron McCormack 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 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 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.