Bug 82775 - SVG <use> of <symbol> containing <linearGradient> renders black
Summary: SVG <use> of <symbol> containing <linearGradient> renders black
Status: RESOLVED DUPLICATE of bug 72796
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rob Buis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-30 13:38 PDT by Stephen Chenney
Modified: 2012-04-24 08:45 PDT (History)
3 users (show)

See Also:


Attachments
Repro case (638 bytes, image/svg+xml)
2012-03-30 13:38 PDT, Stephen Chenney
no flags Details
Patch (13.98 KB, patch)
2012-04-18 11:38 PDT, Rob Buis
no flags Details | Formatted Diff | Diff

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