+2007-02-20 Rob Buis <buis@kde.org>
+
+ Reviewed by Darin.
+
+ http://bugs.webkit.org/show_bug.cgi?id=12439
+ SVG parser complains about points attribute in polygon and polyline element
+
+ Add a test for testing the poly parser. Also update test results.
+
+ * svg/W3C-SVG-1.1/animate-elem-30-t-expected.txt:
+ * svg/W3C-SVG-1.1/animate-elem-33-t-expected.txt:
+ * svg/W3C-SVG-1.1/animate-elem-34-t-expected.txt:
+ * svg/W3C-SVG-1.1/animate-elem-37-t-expected.txt:
+ * svg/W3C-SVG-1.1/animate-elem-41-t-expected.txt:
+ * svg/W3C-SVG-1.1/animate-elem-78-t-expected.txt:
+ * svg/W3C-SVG-1.1/color-prop-03-t-expected.txt:
+ * svg/W3C-SVG-1.1/interact-cursor-01-f-expected.txt:
+ * svg/W3C-SVG-1.1/linking-uri-01-b-expected.txt:
+ * svg/W3C-SVG-1.1/linking-uri-02-b-expected.txt:
+ * svg/W3C-SVG-1.1/metadata-example-01-b-expected.txt:
+ * svg/W3C-SVG-1.1/painting-marker-03-f-expected.txt:
+ * svg/W3C-SVG-1.1/shapes-polygon-01-t-expected.txt:
+ * svg/W3C-SVG-1.1/shapes-polyline-01-t-expected.txt:
+ * svg/W3C-SVG-1.1/struct-group-03-t-expected.txt:
+ * svg/W3C-SVG-1.1/struct-use-01-t-expected.txt:
+ * svg/W3C-SVG-1.1/styling-css-01-b-expected.txt:
+ * svg/W3C-SVG-1.1/styling-css-02-b-expected.txt:
+ * svg/W3C-SVG-1.1/styling-css-03-b-expected.txt:
+ * svg/custom/js-update-polygon-changes-expected.txt:
+ * svg/custom/js-update-polygon-removal-expected.txt:
+ * svg/custom/polyline-hittest-expected.txt:
+ * svg/custom/polyline-invalid-points-expected.checksum:
+ * svg/custom/polyline-invalid-points-expected.txt:
+ * svg/custom/polyline-invalid-points.svg:
+ * svg/custom/svgpolyparser-extra-space-expected.txt:
+ * svg/dom/points-parser-expected.txt: Added.
+ * svg/dom/points-parser.html: Added.
+
2007-02-19 Mitz Pettel <mitz@webkit.org>
Reviewed by Hyatt.
-CONSOLE MESSAGE: line 33: Error: Problem parsing points="200,20 200,40 220,40 220,60"
-CONSOLE MESSAGE: line 34: Error: Problem parsing points="200,120 200,140 220,140 220,160"
-CONSOLE MESSAGE: line 84: Error: Problem parsing points="200,20 200,40 220,40 220,60"
-CONSOLE MESSAGE: line 91: Error: Problem parsing points="240,20 240,40 260,40 260,20"
-CONSOLE MESSAGE: line 117: Error: Problem parsing points="200,20 200,40 220,40 220,60"
-CONSOLE MESSAGE: line 121: Error: Problem parsing points="240,20 240,40 260,40 260,20"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 30: Error: Problem parsing points="-150,0 0,0 150,0"
-CONSOLE MESSAGE: line 48: Error: Problem parsing points="-150,0 -90,0"
-CONSOLE MESSAGE: line 49: Error: Problem parsing points="90,0 150,0"
-CONSOLE MESSAGE: line 76: Error: Problem parsing points="-105,0 -25,-60 25,-60 105,0"
-CONSOLE MESSAGE: line 97: Error: Problem parsing points="-125,0 125,0"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 32: Error: Problem parsing points="248.5,38.5 276.5,22.5 298.5,19.5 316.5,26.5 332.5,40.5 331.5,57.5 322.5,70.5 307.5,76.5 314.5,80.5 324.5,86.5 333.5,99.5 333.5,121.5 327.5,130.5 312.5,143.5 292.5,149.5 270.5,148.5 248.5,142.5 252.5,114.5 267.5,119.5 282.5,119.5 297.5,115.5 304.5,109.5 295.5,99.5 284.5,92.5 277.5,84.5 270.5,74.5 281.5,66.5 293.5,60.5 297.5,50.5 292.5,45.5 281.5,45.5 274.5,49.5 266.5,53.5"
-CONSOLE MESSAGE: line 34: Error: Problem parsing points="108.5,38.5 123.5,26.5 148.5,16.5 172.5,17.5 188.5,19.5 202.5,23.5 206.5,26.5 210.5,37.5 213.5,44.5 215.5,57.5 209.5,68.5 203.5,81.5 187.5,98.5 164.5,120.5 206.5,121.5 224.5,121.5 220.5,149.5 194.5,147.5 181.5,147.5 167.5,146.5 150.5,147.5 133.5,149.5 117.5,148.5 117.5,136.5 118.5,124.5 133.5,115.5 151.5,97.5 170.5,78.5 186.5,59.5 179.5,43.5 159.5,35.5 139.5,40.5 125.5,49.5"
-CONSOLE MESSAGE: line 36: Error: Problem parsing points="26.5,32.5 33.5,32.5 40.5,29.5 47.5,23.5 61.5,17.5 73.5,16.5 74.5,33.5 73.5,50.5 73.5,64.5 72.5,77.5 72.5,90.5 72.5,105.5 71.5,126.5 89.5,128.5 90.5,138.5 89.5,151.5 72.5,151.5 54.5,152.5 38.5,152.5 27.5,152.5 28.5,139.5 30.5,127.5 44.5,125.5 46.5,112.5 47.5,99.5 46.5,87.5 48.5,73.5 48.5,53.5 34.5,52.5 22.5,52.5 22.5,51.5 22.5,41.5 22.5,33.5"
-CONSOLE MESSAGE: line 38: Error: Problem parsing points="427.5,17.5 439.5,15.5 449.5,15.5 449.5,29.5 447.5,44.5 447.5,59.5 465.5,60.5 466.5,74.5 465.5,89.5 450.5,87.5 449.5,102.5 449.5,123.5 449.5,140.5 449.5,153.5 420.5,154.5 421.5,137.5 420.5,123.5 420.5,111.5 419.5,99.5 392.5,97.5 367.5,99.5 366.5,79.5 367.5,69.5 376.5,43.5 381.5,27.5 384.5,17.5 412.5,16.5 406.5,36.5 400.5,49.5 394.5,70.5 419.5,71.5 423.5,49.5 424.5,33.5"
-CONSOLE MESSAGE: line 41: Error: Problem parsing points="26.5,32.5 33.5,32.5 40.5,29.5 47.5,23.5 61.5,17.5 73.5,16.5 74.5,33.5 73.5,50.5 73.5,64.5 72.5,77.5 72.5,90.5 72.5,105.5 71.5,126.5 89.5,128.5 90.5,138.5 89.5,151.5 72.5,151.5 54.5,152.5 38.5,152.5 27.5,152.5 28.5,139.5 30.5,127.5 44.5,125.5 46.5,112.5 47.5,99.5 46.5,87.5 48.5,73.5 48.5,53.5 34.5,52.5 22.5,52.5 22.5,51.5 22.5,41.5 22.5,33.5"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 67: Error: Problem parsing points="-30 20 -30 -20 30 20 30 -20"
-CONSOLE MESSAGE: line 73: Error: Problem parsing points="-30 20 -30 -20 30 20 30 -20"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 109: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 110: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 113: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 113: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 114: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 114: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 115: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 115: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 117: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 125: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 131: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 229: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 230: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 233: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 233: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 234: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 234: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 235: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 235: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 237: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 245: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 251: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 258: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 259: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 262: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 262: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 263: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 263: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 264: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 264: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 266: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 274: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 280: Error: Problem parsing points="5,0,20,5,5,10"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 185: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 187: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 191: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 191: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 192: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 192: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 193: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 193: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 195: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 202: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 209: Error: Problem parsing points="20,10,0,10,15,20,10,2,5,20,20,10"
-CONSOLE MESSAGE: line 316: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 318: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 322: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 322: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 323: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 323: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 324: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 324: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 326: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 333: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 340: Error: Problem parsing points="5,2,20,5,5,8"
-CONSOLE MESSAGE: line 349: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 350: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 353: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 353: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 354: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 354: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 355: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 355: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 357: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 364: Error: Problem parsing points="5,0,20,5,5,10"
-CONSOLE MESSAGE: line 371: Error: Problem parsing points="5,0,20,5,5,10"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 60: Error: Problem parsing points="95,40 115,60 95,80 75,60"
-CONSOLE MESSAGE: line 68: Error: Problem parsing points="220,40 240,60 220,80 200,60"
-CONSOLE MESSAGE: line 75: Error: Problem parsing points="345,40 365,60 345,80 325,60"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 111: Error: Problem parsing points="116,36 116,68 148,36"
-CONSOLE MESSAGE: line 112: Error: Problem parsing points="364,36 364,68 332,36"
-CONSOLE MESSAGE: line 113: Error: Problem parsing points="364,280 332,280 364,248"
-CONSOLE MESSAGE: line 114: Error: Problem parsing points="116,280 148,280 116,248"
-CONSOLE MESSAGE: line 115: Error: Problem parsing points="340,134 340,182 364,158"
-CONSOLE MESSAGE: line 116: Error: Problem parsing points="116,158 140,134 140,182"
-CONSOLE MESSAGE: line 117: Error: Problem parsing points="240,36 264,63.3 214,63.3"
-CONSOLE MESSAGE: line 118: Error: Problem parsing points="240,280 264,252.7 214,252.7"
-CONSOLE MESSAGE: line 125: Error: Problem parsing points="390,295 390,335"
-CONSOLE MESSAGE: line 126: Error: Problem parsing points="370,315 410,315"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 156: Error: Problem parsing points="87,211 134,238 116,283 57,283 39,238 87,211"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 166: Error: Problem parsing points="87,211 134,238 116,283 57,283 39,238 87,211"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 149: Error: Problem parsing points="433,107 425,111 425,103"
-CONSOLE MESSAGE: line 150: Error: Problem parsing points="428,160 421,165 420,157"
-CONSOLE MESSAGE: line 151: Error: Problem parsing points="600,210 592,214 592,206"
-CONSOLE MESSAGE: line 152: Error: Problem parsing points="511,264 503,268 503,260"
-CONSOLE MESSAGE: line 153: Error: Problem parsing points="597,324 590,329 588,321"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0,0) size 479.50x359.50
-CONSOLE MESSAGE: line 59: Error: Problem parsing points="100,60 120,140 140,60 160,140 180,60 180,100 100,100"
-CONSOLE MESSAGE: line 60: Error: Problem parsing points="190,60 210,140 230,60 250,140 270,60 270,100 190,100"
-CONSOLE MESSAGE: line 68: Error: Problem parsing points="100,60 120,140 140,60 160,140 180,60 180,100 100,100"
-CONSOLE MESSAGE: line 69: Error: Problem parsing points="190,60 210,140 230,60 250,140 270,60 270,100 190,100"
KCanvasResource {id="marker1" [type=MARKER] [angle=0.00] [ref x=50.00 y=50.00]}
KCanvasResource {id="marker2" [type=MARKER] [angle=0.00] [ref x=100.00 y=100.00]}
layer at (0,0) size 480x360
-CONSOLE MESSAGE: line 50: Error: Problem parsing points="59,45,95,63,108,105,82,139,39,140,11,107,19,65"
-CONSOLE MESSAGE: line 52: Error: Problem parsing points="179,45,218,63,228,105,202,139,159,140,131,107,139,65,179,45"
-CONSOLE MESSAGE: line 57: Error: Problem parsing points="350,45 375,80 410,95 375,110 350,145 325,120 290,95 325,70,350,45"
-CONSOLE MESSAGE: line 62: Error: Problem parsing points="59,185,98,203,108,245,82,279,39,280,11,247,19,205,59,185"
-CONSOLE MESSAGE: line 64: Error: Problem parsing points="179,185,218,203,228,245,202,279,159,280,131,247,139,205"
-CONSOLE MESSAGE: line 68: Error: Problem parsing points="270,225 300,245 320,225 340,245 280,280 390,280 420,240 280,185"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 55: Error: Problem parsing points="10,50,35,150,60,50,85,150,110,50,135,150"
-CONSOLE MESSAGE: line 58: Error: Problem parsing points="220,50,267,84,249,140,190,140,172,84,220,50"
-CONSOLE MESSAGE: line 64: Error: Problem parsing points="310,50,335,150,360,50,385,150,410,50,435,150"
-CONSOLE MESSAGE: line 70: Error: Problem parsing points="59,185,98,203,108,245,82,279,39,280,11,247,19,205"
-CONSOLE MESSAGE: line 73: Error: Problem parsing points="189,185,228,203,238,245,212,279,169,280,141,247,149,205"
-CONSOLE MESSAGE: line 78: Error: Problem parsing points="270,225 300,245 320,225 340,245 280,280 390,280 420,240 280,185"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 134: Error: Problem parsing points="10.5,0 21,21 0,7 21,7 0,21"
-CONSOLE MESSAGE: line 154: Error: Problem parsing points="3,40 11,10 19,40"
-CONSOLE MESSAGE: line 158: Error: Problem parsing points="3,40 11,10 19,40"
-CONSOLE MESSAGE: line 205: Error: Problem parsing points="10.5,0 21,21 0,7 21,7 0,21"
-CONSOLE MESSAGE: line 225: Error: Problem parsing points="3,40 11,10 19,40"
-CONSOLE MESSAGE: line 229: Error: Problem parsing points="3,40 11,10 19,40"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 46: Error: Problem parsing points="0,0 20,0 20,20 0,20 0 0"
-CONSOLE MESSAGE: line 47: Error: Problem parsing points="0,0 20,0 20,20"
-CONSOLE MESSAGE: line 81: Error: Problem parsing points="0,0 20,0 20,20"
-CONSOLE MESSAGE: line 82: Error: Problem parsing points="0,0 20,0 20,20 0,20 0 0"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0.50) size 479x359
-CONSOLE MESSAGE: line 72: Error: Problem parsing points="300,100, 320,120, 340,110, 360,120, 390,90, 340,70"
-CONSOLE MESSAGE: line 86: Error: Problem parsing points="300,100, 320,120, 340,110, 360,120, 390,90, 340,70"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0) size 479x359.50
-CONSOLE MESSAGE: line 71: Error: Problem parsing points="300,100, 320,120, 340,110, 360,120, 390,90, 340,70"
-CONSOLE MESSAGE: line 85: Error: Problem parsing points="300,100, 320,120, 340,110, 360,120, 390,90, 340,70"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0) size 479x359.50
-CONSOLE MESSAGE: line 86: Error: Problem parsing points="300,100, 320,120, 340,110, 360,120, 390,90, 340,70"
-CONSOLE MESSAGE: line 102: Error: Problem parsing points="300,100, 320,120, 340,110, 360,120, 390,90, 340,70"
layer at (0,0) size 480x360
RenderView at (0,0) size 480x360
RenderSVGContainer {svg} at (0.50,0) size 479x359.50
-CONSOLE MESSAGE: line 34: Error: Problem parsing points="270,265 300,285 320,265 340,285 280,320 390,320 420,280 280,225"
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
RenderSVGContainer {svg} at (265.20,209.61) size 161.15x104.39
-CONSOLE MESSAGE: line 30: Error: Problem parsing points="270,265 300,285 320,265 340,285 280,320 390,320 420,280 280,225"
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
RenderSVGContainer {svg} at (265.20,259.34) size 162.25x64.66
-CONSOLE MESSAGE: line 28: Error: Problem parsing points="0 0 100 0 100 100 0 100"
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
RenderSVGContainer {svg} at (0,0) size 100x100
-778803df0a824ed8f2c7dfa07c56832e
\ No newline at end of file
+16310588467cfc20d551635abc59b784
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
RenderSVGContainer {svg} at (0,0) size 100x100
- RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
- RenderPath {polyline} at (0,0) size 100x100 [stroke={[type=SOLID] [color=#008000] [stroke width=100.00]}] [data="M50.00,0.00L50.00,100.00"]
+ RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+ RenderPath {polyline} at (0,0) size 0x0 [stroke={[type=SOLID] [color=#FF0000] [stroke width=100.00]}] [data=""]
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg">
- <rect x="0" y="0" width="100" height="100" fill="red"/>
- <polyline fill="none" stroke="green" stroke-width="100" points="50,0 50, 100,INF INF"/>
+ <rect x="0" y="0" width="100" height="100" fill="green"/>
+ <polyline fill="none" stroke="red" stroke-width="100" points="50,0 50, 100,INF INF"/>
</svg>
-CONSOLE MESSAGE: line 4: Error: Problem parsing points=" 20,100 100,20 180,100"
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
RenderSVGContainer {svg} at (20,20) size 160x80
--- /dev/null
+CONSOLE MESSAGE: line 77: Error: Problem parsing points="a"
+CONSOLE MESSAGE: line 77: Error: Problem parsing points="10"
+CONSOLE MESSAGE: line 77: Error: Problem parsing points="10,"
+CONSOLE MESSAGE: line 77: Error: Problem parsing points="10,,"
+CONSOLE MESSAGE: line 77: Error: Problem parsing points="10,,10"
+CONSOLE MESSAGE: line 77: Error: Problem parsing points="10,10,"
+CONSOLE MESSAGE: line 77: Error: Problem parsing points="10,10a"
+CONSOLE MESSAGE: line 77: Error: Problem parsing points=",10"
+CONSOLE MESSAGE: line 77: Error: Problem parsing points=",10,"
+CONSOLE MESSAGE: line 77: Error: Problem parsing points=",10,,"
+CONSOLE MESSAGE: line 77: Error: Problem parsing points=",10,10"
+This tests the parser for points attribute values.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Test string: ' '
+PASS '' is ''
+
+Test string: '10 10'
+PASS '10 10' is '10 10'
+
+Test string: '10,10'
+PASS '10 10' is '10 10'
+
+Test string: '10, 10'
+PASS '10 10' is '10 10'
+
+Test string: '10 10 20 20'
+PASS '10 10 20 20' is '10 10 20 20'
+
+Test string: '10, 10 20 20'
+PASS '10 10 20 20' is '10 10 20 20'
+
+Test string: '10, 10, 20 20'
+PASS '10 10 20 20' is '10 10 20 20'
+
+Test string: '10, 10, 20, 20'
+PASS '10 10 20 20' is '10 10 20 20'
+
+Test string: '10, 10 20, 20'
+PASS '10 10 20 20' is '10 10 20 20'
+
+Test string: '10 10, 20, 20'
+PASS '10 10 20 20' is '10 10 20 20'
+
+Test string: '10 10 20, 20'
+PASS '10 10 20 20' is '10 10 20 20'
+
+Test string: '10+10'
+PASS '10 10' is '10 10'
+
+Test string: '10-10'
+PASS '10 -10' is '10 -10'
+
+Test string: '10,+10'
+PASS '10 10' is '10 10'
+
+Test string: '10,-10'
+PASS '10 -10' is '10 -10'
+
+Test string: ' 10,10'
+PASS '10 10' is '10 10'
+
+Test string: '10,10 '
+PASS '10 10' is '10 10'
+
+Test string: '10, 10'
+PASS '10 10' is '10 10'
+
+Test string: '10 ,10'
+PASS '10 10' is '10 10'
+
+Test string: '10 , 10'
+PASS '10 10' is '10 10'
+
+Test string: ' 10,10'
+PASS '10 10' is '10 10'
+
+Test string: '10,10 '
+PASS '10 10' is '10 10'
+
+Test string: '10, 10'
+PASS '10 10' is '10 10'
+
+Test string: '10 ,10'
+PASS '10 10' is '10 10'
+
+Test string: '10 , 10'
+PASS '10 10' is '10 10'
+
+Strings that fail to parse, and hence parse as "".
+
+Test string: 'a'
+PASS '' is ''
+
+Test string: '10'
+PASS '' is ''
+
+Test string: '10,'
+PASS '' is ''
+
+Test string: '10,,'
+PASS '' is ''
+
+Test string: '10,,10'
+PASS '' is ''
+
+Test string: '10,10,'
+PASS '' is ''
+
+Test string: '10,10a'
+PASS '' is ''
+
+Test string: ',10'
+PASS '' is ''
+
+Test string: ',10,'
+PASS '' is ''
+
+Test string: ',10,,'
+PASS '' is ''
+
+Test string: ',10,10'
+PASS '' is ''
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
--- /dev/null
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+
+description("This tests the parser for points attribute values.");
+
+var polyElement = document.createElementNS("http://www.w3.org/2000/svg", "polyline");
+
+function parsePoints(str, result)
+{
+ polyElement.setAttributeNS(null, "points", " ");
+ polyElement.setAttributeNS(null, "points", str);
+ debug("Test string: '" + str + "'");
+ var len = polyElement.points.numberOfItems;
+ var points = "";
+ for (var i = 0; i < len; ++i) {
+ var p = polyElement.points.getItem(i);
+ if (i > 0) points += " ";
+ points = points + p.x + " " + p.y;
+ }
+ if (points === result) {
+ testPassed("'" + points + "' is '" + result + "'");
+ } else {
+ testFailed("'" + string + "' should be '" + result + "', but is '" + points + "'");
+ }
+ debug("");
+}
+
+parsePoints(" ", "");
+parsePoints("10 10", "10 10");
+parsePoints("10,10", "10 10");
+parsePoints("10, 10", "10 10");
+parsePoints("10 10 20 20", "10 10 20 20");
+parsePoints("10, 10 20 20", "10 10 20 20");
+parsePoints("10, 10, 20 20", "10 10 20 20");
+parsePoints("10, 10, 20, 20", "10 10 20 20");
+parsePoints("10, 10 20, 20", "10 10 20 20");
+parsePoints("10 10, 20, 20", "10 10 20 20");
+parsePoints("10 10 20, 20", "10 10 20 20");
+parsePoints("10+10", "10 10");
+parsePoints("10-10", "10 -10");
+parsePoints("10,+10", "10 10");
+parsePoints("10,-10", "10 -10");
+parsePoints(" 10,10", "10 10");
+parsePoints("10,10 ", "10 10");
+parsePoints("10, 10", "10 10");
+parsePoints("10 ,10", "10 10");
+parsePoints("10 , 10", "10 10");
+parsePoints(" 10,10", "10 10");
+parsePoints("10,10 ", "10 10");
+parsePoints("10, 10", "10 10");
+parsePoints("10 ,10", "10 10");
+parsePoints("10 , 10", "10 10");
+
+debug('Strings that fail to parse, and hence parse as "".');
+debug('');
+
+parsePoints("a", "");
+parsePoints("10", "");
+parsePoints("10,", "");
+parsePoints("10,,", "");
+parsePoints("10,,10", "");
+parsePoints("10,10,", "");
+parsePoints("10,10a", "");
+parsePoints(",10", "");
+parsePoints(",10,", "");
+parsePoints(",10,,", "");
+parsePoints(",10,10", "");
+
+successfullyParsed = true;
+
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
+2007-02-20 Rob Buis <buis@kde.org>
+
+ Reviewed by Darin.
+
+ http://bugs.webkit.org/show_bug.cgi?id=12439
+ SVG parser complains about points attribute in polygon and polyline element
+
+ Return true when the parsed points specification is valid.
+
+ * ksvg2/svg/SVGParserUtilities.cpp:
+ (WebCore::parseNumber):
+ (WebCore::SVGPolyParser::parsePoints):
+ * ksvg2/svg/SVGPolyElement.cpp:
+ (WebCore::SVGPolyElement::parseMappedAttribute):
+
2007-02-20 Zack Rusin <zrusin@trolltech.com>
Reviewed by Lars
/* This file is part of the KDE project
Copyright (C) 2002, 2003 The Karbon Developers
2006 Alexander Kellett <lypanov@kde.org>
- 2006 Rob Buis <buis@kde.org>
+ 2006, 2007 Rob Buis <buis@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
expsign = -1;
}
- exponent = 0;
while (ptr < end && *ptr >= '0' && *ptr <= '9') {
exponent *= 10;
exponent += *ptr - '0';
const UChar* cur = s.characters();
const UChar* end = cur + s.length();
- if (!skipOptionalSpaces(cur, end))
- return false;
+ skipOptionalSpaces(cur, end);
+ bool delimParsed = false;
int segmentNum = 0;
- while (1) {
+ while (cur < end) {
+ delimParsed = false;
double xPos = 0;
if (!parseNumber(cur, end, xPos))
return false;
double yPos = 0;
- if (!parseNumber(cur, end, yPos))
+ if (!parseNumber(cur, end, yPos, false))
return false;
+ skipOptionalSpaces(cur, end);
+
+ if (cur < end && *cur == ',') {
+ delimParsed = true;
+ cur++;
+ }
+ skipOptionalSpaces(cur, end);
+
svgPolyTo(xPos, yPos, segmentNum++);
}
+ return cur == end && !delimParsed;
}
bool SVGPathParser::parseSVG(const String& s, bool process)
if (attr->name() == SVGNames::pointsAttr) {
ExceptionCode ec = 0;
points()->clear(ec);
- if (!parsePoints(value) && !m_ignoreAttributeChanges)
+ if (!parsePoints(value) && !m_ignoreAttributeChanges) {
+ points()->clear(ec);
document()->accessSVGExtensions()->reportError("Problem parsing points=\"" + value + "\"");
+ }
} else {
if (SVGTests::parseMappedAttribute(attr))
return;