Fix bug 603994, whereby a <style> stylesheet would not count as a reference towards gradients etc., if the stylesheet was a CDATA element surrounded by whitespace nodes.

Add unit tests for this.

Add some descriptions to the failure modes of some unit tests, which would fail without any message (if they failed, but right now they succeed! ;).
This commit is contained in:
Hurr Durr 2010-07-11 16:16:45 -04:00
parent c17c689ae4
commit 3fc0877b7c
3 changed files with 61 additions and 12 deletions

16
unittests/style-cdata.svg Normal file
View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
<defs>
<style type="text/css">
<![CDATA[
rect { fill: url(#somethingreallylong); }
]]>
</style>
<linearGradient id="somethingreallylong" x1="0" x2="0" y1="0" y2="1">
<stop stop-color="red" offset="0" />
<stop stop-color="green" offset="1" />
</linearGradient>
</defs>
<rect width="100" height="100" />
</svg>

After

Width:  |  Height:  |  Size: 501 B