Summary: | SVG text transformed incorrectly when a transform and gradient applied | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Cameron McCormack (:heycam) <heycam> | ||||||||
Component: | SVG | Assignee: | 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: |
|
Created attachment 60439 [details]
Screenshot of the problem.
(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? (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. Ok, so a problem with the platform text code of Mac perhaps. Looks like the transformation is being applied twice or something? (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. :-( Should have nothing to do with text, but rather with RenderSVGResourceGradient special case for gradient-on-text on PLATFORM(CG). Will investigate. Just a FYI: got a fix, but have no time atm to write ChangeLog etc, will upload it tomorrow. Created attachment 60864 [details]
Initial patch
Small fix, large patch due to some changed pixel tests.
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.
Landed in r62776. |
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.