Title: [266206] trunk
Revision
266206
Author
[email protected]
Date
2020-08-26 17:06:29 -0700 (Wed, 26 Aug 2020)

Log Message

Leading white spaces should be ignored when parsing an SVG list property
https://bugs.webkit.org/show_bug.cgi?id=215602

Patch by Said Abou-Hallawa <[email protected]> on 2020-08-26
Reviewed by Sam Weinig.

Source/WebCore:

The SVG2.0 specs state that the CSS value definition syntax must be used
to define the syntax of the SVG attributes. The CSS syntax states that
leading and trailing spaces should be ignored when parsing the primitive
data types of all the SVG lists.

This has been inconsistency between WebKit and other browsers and within
WebKit itself. Parsing the attribute string of an SVGTransformList skips
the leading white spaces while the rest of the lists do not do that.

All the parsing methods should skip the leading white spaces before looping
to parse individual items. The last step of the loop is to skip the trailing
spaces and the delimiter which we do already.

Tests: svg/custom/feColorMatrix-values-leading-spaces.html
       svg/dom/svg-list-properties-parser-leading-trailing-spaces.html

* svg/SVGLengthList.cpp:
(WebCore::SVGLengthList::parse):
* svg/SVGNumberList.cpp:
(WebCore::SVGNumberList::parse):
* svg/SVGStringList.cpp:
(WebCore::SVGStringList::parse):
* svg/SVGTransformList.cpp:
(WebCore::SVGTransformList::parseGeneric):

LayoutTests:

* svg/custom/feColorMatrix-values-leading-spaces-expected.html: Added.
* svg/custom/feColorMatrix-values-leading-spaces.html: Added.
* svg/dom/length-list-parser-expected.txt:
* svg/dom/svg-list-properties-parser-leading-trailing-spaces-expected.txt: Added.
* svg/dom/svg-list-properties-parser-leading-trailing-spaces.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (266205 => 266206)


--- trunk/LayoutTests/ChangeLog	2020-08-26 23:58:05 UTC (rev 266205)
+++ trunk/LayoutTests/ChangeLog	2020-08-27 00:06:29 UTC (rev 266206)
@@ -1,3 +1,16 @@
+2020-08-26  Said Abou-Hallawa  <[email protected]>
+
+        Leading white spaces should be ignored when parsing an SVG list property
+        https://bugs.webkit.org/show_bug.cgi?id=215602
+
+        Reviewed by Sam Weinig.
+
+        * svg/custom/feColorMatrix-values-leading-spaces-expected.html: Added.
+        * svg/custom/feColorMatrix-values-leading-spaces.html: Added.
+        * svg/dom/length-list-parser-expected.txt:
+        * svg/dom/svg-list-properties-parser-leading-trailing-spaces-expected.txt: Added.
+        * svg/dom/svg-list-properties-parser-leading-trailing-spaces.html: Added.
+
 2020-08-26  Karl Rackler  <[email protected]>
 
         rdar://67706887 (REGRESSION (r264950): [ iOS 13 WK2 ] imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.html is a constant failure)

Added: trunk/LayoutTests/svg/custom/feColorMatrix-values-leading-spaces-expected.html (0 => 266206)


--- trunk/LayoutTests/svg/custom/feColorMatrix-values-leading-spaces-expected.html	                        (rev 0)
+++ trunk/LayoutTests/svg/custom/feColorMatrix-values-leading-spaces-expected.html	2020-08-27 00:06:29 UTC (rev 266206)
@@ -0,0 +1,10 @@
+<style>
+    .box {
+        width: 100px;
+        height: 100px;
+        background-color: lime;
+    }
+</style>
+<body>
+    <div class="box"></div>
+</body>

Added: trunk/LayoutTests/svg/custom/feColorMatrix-values-leading-spaces.html (0 => 266206)


--- trunk/LayoutTests/svg/custom/feColorMatrix-values-leading-spaces.html	                        (rev 0)
+++ trunk/LayoutTests/svg/custom/feColorMatrix-values-leading-spaces.html	2020-08-27 00:06:29 UTC (rev 266206)
@@ -0,0 +1,21 @@
+<!--This test verifies the leading spaces are ignored when parising the attribute of an SVG list property-->
+<style>
+    .box {
+        width: 100px;
+        height: 100px;
+        background-color: red;
+        filter: url(#f);
+    }
+</style>
+<body>
+    <svg height="0">
+        <filter id="f">
+            <feColorMatrix values="
+                0 0 0 0 0
+                1 1 1 0 0
+                0 0 0 0 0
+                0 0 0 1 0">
+        </filter>
+    </svg>
+    <div class="box"></div>
+</body>

Modified: trunk/LayoutTests/svg/dom/length-list-parser-expected.txt (266205 => 266206)


--- trunk/LayoutTests/svg/dom/length-list-parser-expected.txt	2020-08-26 23:58:05 UTC (rev 266205)
+++ trunk/LayoutTests/svg/dom/length-list-parser-expected.txt	2020-08-27 00:06:29 UTC (rev 266206)
@@ -5,8 +5,10 @@
 
 Parsed as 1 length(s) [ 8.847 ]: 8.847
 Parsed as 1 length(s) [ 8625686 ]: 8625686 3.0-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, 90,e4997..,782-4326e.	-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013e,+e9	e 4829.,063721-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e6 072
+Parsed as 8 length(s) [ 28, -8, 0, 47, 4, 0, 35, 684 ]:  28	-8 -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,47 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35	+684 +	159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460
 Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7 
 Parsed as 2 length(s) [ 2, 0.5 ]: 2	.5,658-7 e ,8477553
+Parsed as 1 length(s) [ 2183 ]:  2183 9-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000191,59-- 70478.,566964784	e1-53	847e0.6e34805-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 975	922e,4	+e0e-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 .
 Parsed as 3 length(s) [ 8, 2, 589 ]: 8 2 589	-45e58 -4	-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e58-++689.-98-,42 94564.,967-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011+ ,9+6-	.765+-87 e. 68	9452182-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016.. 1	+
 Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-	8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198	50
 Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e 	378584833	,.141	e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010	8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
@@ -14,6 +16,7 @@
 Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35	+684 +	159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000010641,,572-960	1-9 289	
 Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7 
 Parsed as 2 length(s) [ 2, 0.5 ]: 2	.5,658-7 e ,8477553
+Parsed as 1 length(s) [ 2183 ]:  2183 9-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000191,59-- 70478.,566964784	e1-53	847e0.6e34805-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 975	922e,4	+e0e-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 .
 Parsed as 3 length(s) [ 8, 2, 589 ]: 8 2 589	-45e58 -4	-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e58-++689.-98-,42 94564.,967-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011+ ,9+6-	.765+-87 e. 68	9452182-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016.. 1	+
 Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-	8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198	50
 Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e 	378584833	,.141	e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010	8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
@@ -21,6 +24,7 @@
 Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35	+684 +	159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000010641,,572-960	1-9 289	
 Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7 
 Parsed as 2 length(s) [ 2, 0.5 ]: 2	.5,658-7 e ,8477553
+Parsed as 1 length(s) [ 2183 ]:  2183 9-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000191,59-- 70478.,566964784	e1-53	847e0.6e34805-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 975	922e,4	+e0e-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 .
 Parsed as 3 length(s) [ 8, 2, 589 ]: 8 2 589	-45e58 -4	-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e58-++689.-98-,42 94564.,967-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011+ ,9+6-	.765+-87 e. 68	9452182-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016.. 1	+
 Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-	8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198	50
 Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e 	378584833	,.141	e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010	8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
@@ -28,6 +32,7 @@
 Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35	+684 +	159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000010641,,572-960	1-9 289	
 Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7 
 Parsed as 2 length(s) [ 2, 0.5 ]: 2	.5,658-7 e ,8477553
+Parsed as 1 length(s) [ 2183 ]:  2183 9-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000191,59-- 70478.,566964784	e1-53	847e0.6e34805-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 975	922e,4	+e0e-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 .
 Parsed as 3 length(s) [ 8, 2, 589 ]: 8 2 589	-45e58 -4	-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e58-++689.-98-,42 94564.,967-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011+ ,9+6-	.765+-87 e. 68	9452182-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016.. 1	+
 Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-	8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198	50
 Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e 	378584833	,.141	e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010	8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
@@ -35,6 +40,7 @@
 Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35	+684 +	159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000010641,,572-960	1-9 289	
 Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7 
 Parsed as 2 length(s) [ 2, 0.5 ]: 2	.5,658-7 e ,8477553
+Parsed as 1 length(s) [ 2183 ]:  2183 9-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000191,59-- 70478.,566964784	e1-53	847e0.6e34805-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 975	922e,4	+e0e-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 .
 Parsed as 3 length(s) [ 8, 2, 589 ]: 8 2 589	-45e58 -4	-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e58-++689.-98-,42 94564.,967-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011+ ,9+6-	.765+-87 e. 68	9452182-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016.. 1	+
 Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-	8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198	50
 Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e 	378584833	,.141	e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010	8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
@@ -42,6 +48,7 @@
 Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35	+684 +	159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000010641,,572-960	1-9 289	
 Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7 
 Parsed as 2 length(s) [ 2, 0.5 ]: 2	.5,658-7 e ,8477553
+Parsed as 1 length(s) [ 2183 ]:  2183 9-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000191,59-- 70478.,566964784	e1-53	847e0.6e34805-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 975	922e,4	+e0e-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 .
 Parsed as 3 length(s) [ 8, 2, 589 ]: 8 2 589	-45e58 -4	-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e58-++689.-98-,42 94564.,967-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011+ ,9+6-	.765+-87 e. 68	9452182-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016.. 1	+
 Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-	8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198	50
 Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e 	378584833	,.141	e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010	8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
@@ -49,6 +56,7 @@
 Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35	+684 +	159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000010641,,572-960	1-9 289	
 Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7 
 Parsed as 2 length(s) [ 2, 0.5 ]: 2	.5,658-7 e ,8477553
+Parsed as 1 length(s) [ 2183 ]:  2183 9-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000191,59-- 70478.,566964784	e1-53	847e0.6e34805-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 975	922e,4	+e0e-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 .
 Parsed as 3 length(s) [ 8, 2, 589 ]: 8 2 589	-45e58 -4	-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e58-++689.-98-,42 94564.,967-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011+ ,9+6-	.765+-87 e. 68	9452182-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016.. 1	+
 Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-	8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198	50
 Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e 	378584833	,.141	e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010	8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
@@ -56,6 +64,7 @@
 Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35	+684 +	159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000010641,,572-960	1-9 289	
 Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7 
 Parsed as 2 length(s) [ 2, 0.5 ]: 2	.5,658-7 e ,8477553
+Parsed as 1 length(s) [ 2183 ]:  2183 9-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000191,59-- 70478.,566964784	e1-53	847e0.6e34805-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 975	922e,4	+e0e-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 .
 Parsed as 3 length(s) [ 8, 2, 589 ]: 8 2 589	-45e58 -4	-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e58-++689.-98-,42 94564.,967-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011+ ,9+6-	.765+-87 e. 68	9452182-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016.. 1	+
 Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-	8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198	50
 Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e 	378584833	,.141	e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010	8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
@@ -63,6 +72,7 @@
 Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35	+684 +	159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000010641,,572-960	1-9 289	
 Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7 
 Parsed as 2 length(s) [ 2, 0.5 ]: 2	.5,658-7 e ,8477553
+Parsed as 1 length(s) [ 2183 ]:  2183 9-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000191,59-- 70478.,566964784	e1-53	847e0.6e34805-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 975	922e,4	+e0e-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 .
 Parsed as 3 length(s) [ 8, 2, 589 ]: 8 2 589	-45e58 -4	-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e58-++689.-98-,42 94564.,967-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011+ ,9+6-	.765+-87 e. 68	9452182-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016.. 1	+
 Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-	8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198	50
 Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e 	378584833	,.141	e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010	8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
@@ -70,6 +80,7 @@
 Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35	+684 +	159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000010641,,572-960	1-9 289	
 Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7 
 Parsed as 2 length(s) [ 2, 0.5 ]: 2	.5,658-7 e ,8477553
+Parsed as 1 length(s) [ 2183 ]:  2183 9-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000191,59-- 70478.,566964784	e1-53	847e0.6e34805-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 975	922e,4	+e0e-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 .
 Parsed as 3 length(s) [ 8, 2, 589 ]: 8 2 589	-45e58 -4	-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e58-++689.-98-,42 94564.,967-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011+ ,9+6-	.765+-87 e. 68	9452182-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016.. 1	+
 Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-	8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198	50
 Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e 	378584833	,.141	e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010	8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
@@ -77,6 +88,7 @@
 Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35	+684 +	159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000010641,,572-960	1-9 289	
 Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7 
 Parsed as 2 length(s) [ 2, 0.5 ]: 2	.5,658-7 e ,8477553
+Parsed as 1 length(s) [ 2183 ]:  2183 9-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000191,59-- 70478.,566964784	e1-53	847e0.6e34805-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 975	922e,4	+e0e-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 .
 Parsed as 3 length(s) [ 8, 2, 589 ]: 8 2 589	-45e58 -4	-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e58-++689.-98-,42 94564.,967-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011+ ,9+6-	.765+-87 e. 68	9452182-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016.. 1	+
 Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-	8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198	50
 Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e 	378584833	,.141	e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010	8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
@@ -84,6 +96,7 @@
 Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35	+684 +	159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000010641,,572-960	1-9 289	
 Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7 
 Parsed as 2 length(s) [ 2, 0.5 ]: 2	.5,658-7 e ,8477553
+Parsed as 1 length(s) [ 2183 ]:  2183 9-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000191,59-- 70478.,566964784	e1-53	847e0.6e34805-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 975	922e,4	+e0e-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 .
 Parsed as 3 length(s) [ 8, 2, 589 ]: 8 2 589	-45e58 -4	-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e58-++689.-98-,42 94564.,967-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011+ ,9+6-	.765+-87 e. 68	9452182-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016.. 1	+
 PASS successfullyParsed is true
 

Added: trunk/LayoutTests/svg/dom/svg-list-properties-parser-leading-trailing-spaces-expected.txt (0 => 266206)


--- trunk/LayoutTests/svg/dom/svg-list-properties-parser-leading-trailing-spaces-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/svg/dom/svg-list-properties-parser-leading-trailing-spaces-expected.txt	2020-08-27 00:06:29 UTC (rev 266206)
@@ -0,0 +1,29 @@
+This test verifies the leading and the trailing spaces are ignored when parising the attributes of an SVG list properties
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+Check SVGNumberList parsing
+PASS feColorMatrixElement.values.baseVal.length is 20
+PASS SVGListToString(feColorMatrixElement.values.baseVal) is "[0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0]"
+
+Check SVGLengthList parsing
+PASS textElement.x.baseVal.length is 10
+PASS SVGListToString(textElement.x.baseVal) is "[10 20 30 40 50 60 70 80 90 100]"
+
+Check SVGPointList parsing
+PASS polylineElement.points.length is 4
+PASS SVGListToString(polylineElement.points) is "[0,0 100,0 100,100 0,100]"
+
+Check SVStringList parsing
+PASS textElement.systemLanguage.length is 10
+PASS SVGListToString(textElement.systemLanguage) is "[1 2 3 4 5 6 7 8 9 10]"
+
+Check SVTransformList parsing
+PASS textElement.transform.baseVal.length is 2
+PASS SVGListToString(textElement.transform.baseVal) is "[scale(2, 2) translate(10, 10)]"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/svg/dom/svg-list-properties-parser-leading-trailing-spaces.html (0 => 266206)


--- trunk/LayoutTests/svg/dom/svg-list-properties-parser-leading-trailing-spaces.html	                        (rev 0)
+++ trunk/LayoutTests/svg/dom/svg-list-properties-parser-leading-trailing-spaces.html	2020-08-27 00:06:29 UTC (rev 266206)
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+SVGNumber.prototype.toString = function() {
+    return this.value.toString();
+}
+
+SVGLength.prototype.toString = function() {
+    return this.valueAsString;
+}
+
+SVGPoint.prototype.toString = function() {
+    return this.x + "," + this.y;
+}
+
+SVGTransform.prototype.toString = function() {
+    switch (this.type) {
+    case SVGTransform.SVG_TRANSFORM_TRANSLATE:
+        return "translate(" + this.matrix.e + ", " + this.matrix.f + ")";
+    case SVGTransform.SVG_TRANSFORM_SCALE:
+        return "scale(" + this.matrix.a + ", " + this.matrix.d + ")";
+    }
+    return "";
+}
+
+function SVGListToString(list) {
+    var s = "";
+
+    for (var i = 0; i < list.length; ++i) {
+        if (s.length)
+            s += " ";
+        s += list[i].toString();
+    }
+
+    return "[" + s + "]";
+}
+
+description("This test verifies the leading and the trailing spaces are ignored when parising the attributes of an SVG list properties");
+
+var feColorMatrixElement = document.createElementNS("http://www.w3.org/2000/svg", "feColorMatrix");
+feColorMatrixElement.setAttribute("values", " 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 ");
+
+debug("");
+debug("Check SVGNumberList parsing");
+shouldBe("feColorMatrixElement.values.baseVal.length", "20");
+shouldBeEqualToString("SVGListToString(feColorMatrixElement.values.baseVal)", "[0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0]");
+
+var textElement = document.createElementNS("http://www.w3.org/2000/svg", "text");
+textElement.setAttribute("x", " \t\n10 20 30 40 50 60 70 80 90 100\t\n ");
+
+debug("");
+debug("Check SVGLengthList parsing");
+shouldBe("textElement.x.baseVal.length", "10");
+shouldBeEqualToString("SVGListToString(textElement.x.baseVal)", "[10 20 30 40 50 60 70 80 90 100]");
+
+var polylineElement = document.createElementNS("http://www.w3.org/2000/svg", "polyline");
+polylineElement.setAttribute("points", " \t\n0 0 100 0 100 100 0 100\t\n ");
+
+debug("");
+debug("Check SVGPointList parsing");
+shouldBe("polylineElement.points.length", "4");
+shouldBeEqualToString("SVGListToString(polylineElement.points)", "[0,0 100,0 100,100 0,100]");
+
+textElement.setAttribute("systemLanguage", " \t\n1 2 3 4 5 6 7 8 9 10\t\n ");
+
+debug("");
+debug("Check SVStringList parsing");
+shouldBe("textElement.systemLanguage.length", "10");
+shouldBeEqualToString("SVGListToString(textElement.systemLanguage)", "[1 2 3 4 5 6 7 8 9 10]");
+
+textElement.setAttribute('transform', ' \t\nscale(2, 2) translate(10 10)\t\n ');
+
+debug("");
+debug("Check SVTransformList parsing");
+shouldBe("textElement.transform.baseVal.length", "2");
+shouldBeEqualToString("SVGListToString(textElement.transform.baseVal)", "[scale(2, 2) translate(10, 10)]");
+ 
+successfullyParsed = true;
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (266205 => 266206)


--- trunk/Source/WebCore/ChangeLog	2020-08-26 23:58:05 UTC (rev 266205)
+++ trunk/Source/WebCore/ChangeLog	2020-08-27 00:06:29 UTC (rev 266206)
@@ -1,3 +1,35 @@
+2020-08-26  Said Abou-Hallawa  <[email protected]>
+
+        Leading white spaces should be ignored when parsing an SVG list property
+        https://bugs.webkit.org/show_bug.cgi?id=215602
+
+        Reviewed by Sam Weinig.
+
+        The SVG2.0 specs state that the CSS value definition syntax must be used
+        to define the syntax of the SVG attributes. The CSS syntax states that
+        leading and trailing spaces should be ignored when parsing the primitive
+        data types of all the SVG lists.
+
+        This has been inconsistency between WebKit and other browsers and within
+        WebKit itself. Parsing the attribute string of an SVGTransformList skips
+        the leading white spaces while the rest of the lists do not do that.
+
+        All the parsing methods should skip the leading white spaces before looping 
+        to parse individual items. The last step of the loop is to skip the trailing
+        spaces and the delimiter which we do already.
+
+        Tests: svg/custom/feColorMatrix-values-leading-spaces.html
+               svg/dom/svg-list-properties-parser-leading-trailing-spaces.html
+
+        * svg/SVGLengthList.cpp:
+        (WebCore::SVGLengthList::parse):
+        * svg/SVGNumberList.cpp:
+        (WebCore::SVGNumberList::parse):
+        * svg/SVGStringList.cpp:
+        (WebCore::SVGStringList::parse):
+        * svg/SVGTransformList.cpp:
+        (WebCore::SVGTransformList::parseGeneric):
+
 2020-08-26  Wenson Hsieh  <[email protected]>
 
         Avoid unnecessarily copying a Vector in WebCore::transformsForValue

Modified: trunk/Source/WebCore/svg/SVGLengthList.cpp (266205 => 266206)


--- trunk/Source/WebCore/svg/SVGLengthList.cpp	2020-08-26 23:58:05 UTC (rev 266205)
+++ trunk/Source/WebCore/svg/SVGLengthList.cpp	2020-08-27 00:06:29 UTC (rev 266206)
@@ -36,6 +36,8 @@
     clearItems();
 
     return readCharactersForParsing(value, [&](auto buffer) {
+        skipOptionalSVGSpaces(buffer);
+
         while (buffer.hasCharactersRemaining()) {
             auto start = buffer.position();
 

Modified: trunk/Source/WebCore/svg/SVGNumberList.cpp (266205 => 266206)


--- trunk/Source/WebCore/svg/SVGNumberList.cpp	2020-08-26 23:58:05 UTC (rev 266205)
+++ trunk/Source/WebCore/svg/SVGNumberList.cpp	2020-08-27 00:06:29 UTC (rev 266206)
@@ -36,8 +36,8 @@
     clearItems();
 
     return readCharactersForParsing(value, [&](auto buffer) {
-        // The spec (section 4.1) strangely doesn't allow leading whitespace.
-        // We might choose to violate that intentionally.
+        skipOptionalSVGSpaces(buffer);
+
         while (buffer.hasCharactersRemaining()) {
             auto number = parseNumber(buffer);
             if (!number)

Modified: trunk/Source/WebCore/svg/SVGStringList.cpp (266205 => 266206)


--- trunk/Source/WebCore/svg/SVGStringList.cpp	2020-08-26 23:58:05 UTC (rev 266205)
+++ trunk/Source/WebCore/svg/SVGStringList.cpp	2020-08-27 00:06:29 UTC (rev 266206)
@@ -40,6 +40,8 @@
     };
 
     return readCharactersForParsing(data, [&](auto buffer) {
+        skipOptionalSVGSpaces(buffer);
+
         while (buffer.hasCharactersRemaining()) {
             auto start = buffer.position();
             

Modified: trunk/Source/WebCore/svg/SVGTransformList.cpp (266205 => 266206)


--- trunk/Source/WebCore/svg/SVGTransformList.cpp	2020-08-26 23:58:05 UTC (rev 266205)
+++ trunk/Source/WebCore/svg/SVGTransformList.cpp	2020-08-27 00:06:29 UTC (rev 266206)
@@ -65,9 +65,10 @@
 template<typename CharacterType> bool SVGTransformList::parseGeneric(StringParsingBuffer<CharacterType>& buffer)
 {
     bool delimParsed = false;
+    skipOptionalSVGSpaces(buffer);
+
     while (buffer.hasCharactersRemaining()) {
         delimParsed = false;
-        skipOptionalSVGSpaces(buffer);
         
         auto parsedTransformType = SVGTransformable::parseTransformType(buffer);
         if (!parsedTransformType)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to