Bug 82775

Summary: SVG <use> of <symbol> containing <linearGradient> renders black
Product: WebKit Reporter: Stephen Chenney <schenney>
Component: SVGAssignee: Rob Buis <rwlbuis>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: krit, rwlbuis, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Repro case
none
Patch none

Description Stephen Chenney 2012-03-30 13:38:47 PDT
Created attachment 134870 [details]
Repro case

A <use> element that references a <symbol> element that contains a linearGradient applied to a rect renders the rect as black. If you move the linearGradient out of the symbol and into a <def> block, it renders correctly. It also renders correctly if you do not use the <symbol> and <use> the rect directly.

Failing in Safari trunk and Chromium. Works in an earlier version of Chrome (according to reporter) and in Safari 5.1.2.

I strongly suspect this is due to changes in the <use> element handling, although it may also be due to the changes we made to resource invalidation, or it may be something else entirely.

Chromium http://code.google.com/p/chromium/issues/detail?id=120994
Comment 1 Rob Buis 2012-04-18 11:38:29 PDT
Created attachment 137732 [details]
Patch
Comment 2 Rob Buis 2012-04-18 11:52:47 PDT
This patch is just one possible idea. It will now create a hidden renderer for every <symbol>, and attach any resources that could be referenced, not regular shapes/path/text. Another way would be to always create all symbol renderers including the contents, that wastes more memory though.
Note finally that more tests would need to be rebaselined, expect a report from chromium EWS.
Comment 3 Rob Buis 2012-04-24 08:40:03 PDT
Comment on attachment 137732 [details]
Patch

Clearing review flag since bug 72796 patch would fix this one too.
Comment 4 Dirk Schulze 2012-04-24 08:42:43 PDT
Can you mark this as duplicate than?
Comment 5 Rob Buis 2012-04-24 08:45:52 PDT

*** This bug has been marked as a duplicate of bug 72796 ***