Last Comment Bug 719727 - SVG: Gradient fill that is part of a pattern is cut off
: SVG: Gradient fill that is part of a pattern is cut off
Product: Core
Classification: Components
Component: SVG (show other bugs)
: 9 Branch
: x86_64 Windows 7
: -- normal with 2 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Jet Villegas (:jet)
Depends on: 773595
  Show dependency treegraph
Reported: 2012-01-20 00:36 PST by Tsvetomir Tsonev
Modified: 2012-07-22 11:32 PDT (History)
0 users
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Test case (1.02 KB, image/svg+xml)
2012-01-20 00:36 PST, Tsvetomir Tsonev
no flags Details
Workaround (1.05 KB, image/svg+xml)
2012-01-20 00:37 PST, Tsvetomir Tsonev
no flags Details
testcase (1.04 KB, image/svg+xml)
2012-07-12 07:17 PDT, Jonathan Watt [:jwatt]
no flags Details
Static test case (861 bytes, image/svg+xml)
2012-07-12 07:56 PDT, Tsvetomir Tsonev
no flags Details
Browser screenshots (99.39 KB, image/png)
2012-07-12 08:08 PDT, Tsvetomir Tsonev
no flags Details

Description Tsvetomir Tsonev 2012-01-20 00:36:19 PST
Created attachment 590133 [details]
Test case

Linear gradients that are part of a pattern are not rendered correctly.

This is always visible when the pattern is applied to a path.

The behavior changes when the pattern is applied to a circle. I've created an animated test case that clearly shows this. Note that turning the animation off doesn't help.

I was able to work around it by setting patternContentUnits to objectBoundingBox and transforming the coordinates.

Originally reported on StackOverflow:
Comment 1 Tsvetomir Tsonev 2012-01-20 00:37:13 PST
Created attachment 590134 [details]

Workaround for the problem by using patternContentUnits="objectBoundingBox"
Comment 2 Jonathan Watt [:jwatt] 2012-07-12 07:17:44 PDT
Created attachment 641449 [details]

Actually circle is no different to path. Your testcase changes y for the circle, but transform for the path, meaning that you are not changing user space for the former, but are for the latter. This testcase animates transform for both the circle and the path to compare apples to apples.

I'm not entirely sure this is even a bug to be honest, but I don't have time to consider it properly right now during this drive-by comment.
Comment 3 Tsvetomir Tsonev 2012-07-12 07:56:48 PDT
Created attachment 641465 [details]
Static test case

Static version of the test case
Comment 4 Tsvetomir Tsonev 2012-07-12 08:08:56 PDT
Created attachment 641474 [details]
Browser screenshots

Screenshots of the static test case in FF/Chrome/IE
Comment 5 Tsvetomir Tsonev 2012-07-12 08:09:25 PDT
I agree with you, translate has the same effect for circles and paths.

Animation is not required to reproduce the bug. I've used it to highlight the issue, but it can be observed for static shapes. See the static test case and screenshots.
Comment 6 Robert Longson 2012-07-21 08:35:03 PDT
Fixed by patch in bug 773595

Note You need to log in before you can comment on or make changes to this bug.