Comment 31 for bug 702423

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

>> Louis Simard, #14

> In Scour revision 195, elements referencing a duplicate gradient
> are updated for renaming only in xlink:href and XML fill=, stroke=
> etc. attributes, so anything in style= doesn't get updated.

Looks like my hunch was right. Gradients were being removed for being duplicates of others, but the style= attribute was never updated to match. So gradients that were removed from the file were still referred to by graphics elements.

Jan Thor's _getStyle and _setStyle patch was useful to shorten the code needed for ths fix. It's a diff of under 10 lines for scour.py, with a new unit test for the duplicate-gradient name-updating behavior with --disable-style-to-xml.

The unit test passes. I need to perform more tests with files gathered from this bug report, then I'll commit a fix.