Last Comment Bug 353575 - gradients, clipPaths and masks inside svg:symbol aren't rendered
: gradients, clipPaths and masks inside svg:symbol aren't rendered
Status: ASSIGNED
:
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal with 10 votes (vote)
: ---
Assigned To: Brian Birtles (:birtles)
:
Mentors:
: 306674 485362 584666 703766 1235364 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-20 16:01 PDT by Takeshi Kurosawa
Modified: 2015-12-28 06:36 PST (History)
16 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (1.11 KB, image/svg+xml)
2006-09-20 16:03 PDT, Takeshi Kurosawa
no flags Details
Test case with overlapping IDs and hidden groups (684 bytes, image/svg+xml)
2011-11-13 18:09 PST, Brian Birtles (:birtles)
no flags Details

Description Takeshi Kurosawa 2006-09-20 16:01:29 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060918 Minefield/3.0a1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060918 Minefield/3.0a1

gradients inside svg:symbol aren't rendered. gradients outside svg:symbol are rendered.

Reproducible: Always

Steps to Reproduce:
1.Open a svg file which has gradient(s) inside svg:symbol aren't rendered.
2.
3.

Actual Results:  
gradient(s) are not rendered.

Expected Results:  
gradient(s) are rendered.
Comment 1 Takeshi Kurosawa 2006-09-20 16:03:38 PDT
Created attachment 239433 [details]
testcase

4 rects shuld have same gradient.
Comment 2 Ria Klaassen (not reading all bugmail) 2006-09-21 01:28:43 PDT
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060920 Minefield/3.0a1
Confirmed.
Comment 3 Jonathan Watt [:jwatt] (Away Jun. 27 - Jul. 13) 2006-09-21 02:45:20 PDT
Why would you put the gradient _inside_ the symbol? The elements in the symbol are probably cloned into a shadow tree, in which case you're increasing memory use (and there are going to be multiple shadow elements with the same ID).
Comment 4 Takeshi Kurosawa 2006-09-21 10:48:20 PDT
(In reply to comment #3)
> Why would you put the gradient _inside_ the symbol?

Adobe Illustrator 12.0.1, SVG Export Plug-In exports svg files which include the gradient inside the symbol.

For example, http://spreadfirefox.jp/foxkeh/downloads/parts/tail01.svg
another examples at  http://spreadfirefox.jp/foxkeh/downloads/parts/
# A mascot in those pages is Foxkeh, a mascot of Firefox brought by Mozilla Japan.
Comment 5 Robert Longson 2009-03-26 08:41:17 PDT
*** Bug 485362 has been marked as a duplicate of this bug. ***
Comment 6 jonathan chetwynd 2009-03-26 08:49:32 PDT
#3 jwatt asks "Why would you put the gradient _inside_ the symbol?"

one reason is authoring tool user interface.
beyond hand coding...

ie unless a number of icons are saved as a set at one time, each will have the gradients, then when the icons are agglomerated, there is much duplication:
http://www.openicon.org/icon-ark/freedesktop/gnome/devices.svgz
Comment 7 adeveria 2010-07-28 11:40:53 PDT
For the SVG-edit project, I'm working on arbitrary SVG importing. The idea is to insert a <symbol> element with the data, so multiple copies can be made using <use>. This bug means that import files with gradients will thus appear filled in black when using Firefox.

As a workaround I was going to put the imported <svg> in a <defs>, then have the <use> elements refer to that, but unfortunately Adobe Illustrator incorrectly displays an image like this (it does fine with <symbol>). A bug on their part, certainly, but it forces me to decide whether to support Firefox or Illustrator. 

Considering how <symbol> is very very similar to <svg> elements (in which this bug does not occur), I find it hard to imagine that this bug would be hard to fix.
Comment 8 Robert Longson 2010-08-05 04:59:14 PDT
*** Bug 584666 has been marked as a duplicate of this bug. ***
Comment 9 Kohei Yoshino [:kohei] 2011-09-13 23:22:21 PDT
Just FYI: The Foxkeh assets, including the broken tail SVG files in comment 4, have been moved to
http://www.foxkeh.com/downloads/parts/
Comment 10 Brian Birtles (:birtles) 2011-11-13 18:09:46 PST
Created attachment 574211 [details]
Test case with overlapping IDs and hidden groups

A similar problem occurs when we have overlapping IDs and the first occurrence is within a hidden group. This crops up in Santa's Workshop and results in the snowflakes, trees and elves appearing partially or wholly black:

http://ie.microsoft.com/testdrive/Performance/SantasWorkshop/Default.xhtml

The attached test case is a simplified version of what's happening in Santa's Workshop.

I suspect the root cause is the same as this bug. Namely, if a gradient first appears in a context that isn't rendered we seem to refuse to render it from there on.

The fact that Illustrator is exporting this sort of arrangement raises the importance of this bug as does its use in Santa's Workshop.
Comment 11 Robert Longson 2011-11-14 00:52:26 PST
The display:none is a different issue, bug 376027 tracks that.
Comment 12 Robert Longson 2012-01-21 15:41:27 PST
*** Bug 703766 has been marked as a duplicate of this bug. ***
Comment 13 Kirby 2013-08-28 03:31:44 PDT
It has now been a year and eight months since the last entry in this log, and seven years (SEVEN YEARS!) since this bug was first reported and still not been fixed.  WTF??  I use Illustrator.  I create SVG files.  Some of those files have symbols in them.  And the only browser that can't render them with gradients is Firefox.  I don't want a work-around, I don't want a temporary solution: I want to be able to create a symbol with a gradient inside of it and have it render correctly.  After seven years, this is too much to ask of Firefox??  Even an outdated version of Internet Explorer can handle this job.  But not Firefox.  Brilliant.  Seven years.  Wow.  Time to give up and move on to some other browser, I guess.
Comment 14 Brian Birtles (:birtles) 2013-08-29 15:53:19 PDT
Kirby, please keep comments to those which help fix the bug. For progress updates, please follow bug 376027. My previous patch for that bug also fixed this bug (since they have the same root cause) but was unfortunately rejected due to questions raised about the validity of the spec. I have investigated an alternative approach and written it out in detail so that another contributor can implement it. If no one else is available I will try to implement it soon.
Comment 15 Kirby 2013-09-13 08:28:57 PDT
(In reply to Brian Birtles (:birtles) from comment #14)
> Kirby, please keep comments to those which help fix the bug. For progress
> updates, please follow bug 376027. My previous patch for that bug also fixed
> this bug (since they have the same root cause) but was unfortunately
> rejected due to questions raised about the validity of the spec. I have
> investigated an alternative approach and written it out in detail so that
> another contributor can implement it. If no one else is available I will try
> to implement it soon.

Brian: I am sorry my previous message came out sounding so angry and frustrated.  I wish you the best of luck in finding a solution to this problem— know that I am continuing to monitor it with fingers-crossed.
Comment 16 andy 2014-08-20 22:46:30 PDT Comment hidden (advocacy)
Comment 17 guilherme 2015-08-26 11:30:29 PDT Comment hidden (off-topic)
Comment 18 Robert Longson 2015-08-26 12:42:28 PDT Comment hidden (obsolete)
Comment 19 Robert Longson 2015-12-28 06:36:03 PST
*** Bug 306674 has been marked as a duplicate of this bug. ***
Comment 20 Robert Longson 2015-12-28 06:36:08 PST
*** Bug 1235364 has been marked as a duplicate of this bug. ***

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