References to gradients in <style> are not considered as such; the gradients are removed

Bug #603994 reported by Louis Simard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scour
Fix Released
High
Unassigned

Bug Description

The file fulltests/scantailor.svg, originally from Ubuntu 10.04's /usr/share/app-install/icons/scantailor.svg and added to trunk revision 181, renders incorrectly after being Scoured.

-- To reproduce --

Program version: trunk revision 180

Command line: ./scour.py --shorten-ids --enable-id-stripping --create-groups --renderer-workaround --indent=none -i fulltests/scantailor.svg -o fulltests/scantailor.opt.svg

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :
Changed in scour:
importance: Undecided → High
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

Even with the default command-line options, the fill:url(#idNUMBER) references in <style> aren't being considered as references and the gradients are getting removed from <defs>.

summary: - Bad render: fulltests/scantailor.svg
+ References to gradients in <style> are not considered as such; the
+ gradients are removed
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

Debug information added by this patch (not a solution for the bug!) makes the problem more obvious:

A CDATA node may be surrounded by Text nodes if CDATA is surrounded by whitespace, but findReferencedElements considers only the first child node of a <style> element. findReferencedElements therefore ignores the entire stylesheet in this test case.

Changed in scour:
status: New → Triaged
Changed in scour:
assignee: nobody → Cynthia Gauthier (louis-simard)
status: Triaged → In Progress
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :