Fix Bug 541889: Properly parse polygon/polyline points missing whitespace/comma for negative attributes

This commit is contained in:
JSCHILL1 2010-03-25 17:48:15 -07:00
parent fd82967bbc
commit 05e73f11c3
8 changed files with 72 additions and 13 deletions

View file

@ -0,0 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<svg xmlns="http://www.w3.org/2000/svg">
<polygon points="100,-100,100-100,100-100-100,-100-100,200" />
</svg>

After

Width:  |  Height:  |  Size: 155 B

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg">
<polygon fill="blue" points="10000,-50" />
<polygon fill="blue" points="10000,50" />
</svg>

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 145 B

Before After
Before After

View file

@ -0,0 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<svg xmlns="http://www.w3.org/2000/svg">
<polyline points="100,-100,100-100,100-100-100,-100-100,200" />
</svg>

After

Width:  |  Height:  |  Size: 156 B

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg">
<polyline fill="blue" points="10000,-50" />
<polyline fill="blue" points="10000,50" />
</svg>

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 146 B

Before After
Before After

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<path id="L" stroke="#000000" d="M0,0 100,100"/>
<g id="G"><use xlink:href="#L"/> <path stroke="#000000" d="M0,100 100,0"/></g>
</defs>
<use xlink:href="#G"/>
</svg>

After

Width:  |  Height:  |  Size: 345 B