2006-09-12 Julien Palmas <julien.palmas@gmail.com>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Sep 2006 05:37:00 +0000 (05:37 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Sep 2006 05:37:00 +0000 (05:37 +0000)
        Reviewed by darin.  Landed by eseidel.

        * ksvg2/svg/svgpathparser.cpp:
        (WebCore::SVGPolyParser::parsePoints):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16339 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/svg/custom/svgpolyparser-extra-space-expected.checksum [new file with mode: 0644]
LayoutTests/svg/custom/svgpolyparser-extra-space-expected.png [new file with mode: 0644]
LayoutTests/svg/custom/svgpolyparser-extra-space-expected.txt [new file with mode: 0644]
LayoutTests/svg/custom/svgpolyparser-extra-space.svg [new file with mode: 0644]
WebCore/ChangeLog
WebCore/ksvg2/svg/svgpathparser.cpp

index f63293caa248f71c9396c66861542e1d965b9830..3e8fb36c517a1ec68e44001257559f2364c77e18 100644 (file)
@@ -1,3 +1,12 @@
+2006-09-12  Julien Palmas  <julien.palmas@gmail.com>
+
+        Reviewed by darin.  Landed by eseidel.
+
+        * svg/custom/svgpolyparser-extra-space-expected.checksum: Added.
+        * svg/custom/svgpolyparser-extra-space-expected.png: Added.
+        * svg/custom/svgpolyparser-extra-space-expected.txt: Added.
+        * svg/custom/svgpolyparser-extra-space.svg: Added.
+
 2006-09-12  Kevin McCullough  <KMcCullough@apple.com>
 
         Reviewed by Andersca, Maciej, Brady.
diff --git a/LayoutTests/svg/custom/svgpolyparser-extra-space-expected.checksum b/LayoutTests/svg/custom/svgpolyparser-extra-space-expected.checksum
new file mode 100644 (file)
index 0000000..3b8b778
--- /dev/null
@@ -0,0 +1 @@
+d4ffd7091807829603f95a596a221a9d
\ No newline at end of file
diff --git a/LayoutTests/svg/custom/svgpolyparser-extra-space-expected.png b/LayoutTests/svg/custom/svgpolyparser-extra-space-expected.png
new file mode 100644 (file)
index 0000000..102feda
Binary files /dev/null and b/LayoutTests/svg/custom/svgpolyparser-extra-space-expected.png differ
diff --git a/LayoutTests/svg/custom/svgpolyparser-extra-space-expected.txt b/LayoutTests/svg/custom/svgpolyparser-extra-space-expected.txt
new file mode 100644 (file)
index 0000000..42c281d
--- /dev/null
@@ -0,0 +1,4 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+    KCanvasContainer {svg} at (20,20) size 160x80
+      KCanvasItem {polygon} at (20,20) size 160x80 [fill={[type=SOLID] [color=#000000]}] [data="M20.00,100.00L100.00,20.00L180.00,100.00"]
diff --git a/LayoutTests/svg/custom/svgpolyparser-extra-space.svg b/LayoutTests/svg/custom/svgpolyparser-extra-space.svg
new file mode 100644 (file)
index 0000000..5238538
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg">
+    <polygon fill="black" points=" 20,100 100,20 180,100"/>
+</svg>
index 3a58f6e96f8e8ffa0407bb6325222faec9aa6e9f..ec621a59b096d637f2bce02c4067b2dfa6c8fb5d 100644 (file)
@@ -1,3 +1,10 @@
+2006-09-12  Julien Palmas  <julien.palmas@gmail.com>
+
+        Reviewed by darin.  Landed by eseidel.
+
+        * ksvg2/svg/svgpathparser.cpp:
+        (WebCore::SVGPolyParser::parsePoints):
+
 2006-09-11  Kevin McCullough  <KMcCullough@apple.com>
 
         Reviewed by Andersca, Maciej, Brady.
index cfc74a69c21b08f308e5ee61d6a81ea1e19b25b1..9649b93aea320fd8527291a0db252f378fb0a1ae 100644 (file)
@@ -115,6 +115,8 @@ void SVGPolyParser::parsePoints(const DeprecatedString& s) const
     const char* currSegment = pointData.latin1();
     const char* eoString = pointData.latin1() + pointData.length();
     
+    skipOptionalSpaces(currSegment);
+    
     int segmentNum = 0;
     while (currSegment < eoString) {
         const char* prevSegment = currSegment;