Bug 6052 - WebKit+SVG fails to handle xlink:href on gradients
Summary: WebKit+SVG fails to handle xlink:href on gradients
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Julien Palmas
URL: http://en.wikipedia.org/wiki/Svg
Keywords: HasReduction
Depends on:
Blocks: 6060
  Show dependency treegraph
 
Reported: 2005-12-12 11:30 PST by Rob Buis
Modified: 2006-01-15 03:13 PST (History)
0 users

See Also:


Attachments
Reduced testcase (1.98 KB, image/svg+xml)
2005-12-13 03:26 PST, Rob Buis
no flags Details
Further reduction (504 bytes, image/svg+xml)
2005-12-13 03:39 PST, Eric Seidel (no email)
no flags Details
Simple patch (1.62 KB, patch)
2005-12-16 16:59 PST, Julien Palmas
eric: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Buis 2005-12-12 11:30:46 PST
I see two misrendering svgs on this page, and both due to the same, likely
gradient related, bug. Compare the svg and generated png, the differences are
quite clear. Please fix :)
Cheers,

Rob.
Comment 1 Eric Seidel (no email) 2005-12-12 11:33:52 PST
I believe this is related to the hackish way in which we currently do style resolution for <stop> elements.  
However, I see:
2005-12-12 11:26:15.712 Safari[25820] Warning, no gradient stops, gradient (0x13da4be4) will be all 
black!
in the console, which indicates this might not be a style problem at all.
Comment 2 Rob Buis 2005-12-13 03:26:45 PST
Created attachment 5063 [details]
Reduced testcase
Comment 3 Eric Seidel (no email) 2005-12-13 03:39:36 PST
Created attachment 5064 [details]
Further reduction
Comment 4 Julien Palmas 2005-12-16 16:59:41 PST
Created attachment 5119 [details]
Simple patch

The referenced gradient (the one containing the stops) was never properly built
(ie: addStop never called).
Hense the gradient using xlink:href did not inherit any stop.
Comment 5 Ladd Van Tol 2005-12-17 13:54:09 PST
Rendering of gradients is much improved with this patch.

Also fixes display (but not performance) of http://me.in-berlin.de/~darwin/svg/incoming/gearflowers.svg 
as referred to by 6060.

Comment 6 Darin Adler 2005-12-19 14:12:43 PST
Comment on attachment 5119 [details]
Simple patch

Patch looks fine.

But there's no ChangeLog and no regression test -- we would like to have both
of those.
Comment 7 Eric Seidel (no email) 2005-12-20 00:29:32 PST
Comment on attachment 5119 [details]
Simple patch

This works, but I think we can do this better by removing the whole
resourceNotification() system all together.  I have a patch for that and will
post it.  Thanks for such a great diagnosis!
Comment 8 Eric Seidel (no email) 2006-01-15 03:13:31 PST
This works again.  Although it's still not a nice as it should be.