Reviewed by Darin.
authorrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Aug 2006 10:04:16 +0000 (10:04 +0000)
committerrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Aug 2006 10:04:16 +0000 (10:04 +0000)
        http://bugzilla.opendarwin.org/show_bug.cgi?id=10524
        svg transform: comma delimiting breaks display

        Properly parse transforms which use ',' as seperators.

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

LayoutTests/ChangeLog
LayoutTests/svg/custom/transform-scale-parse-expected.checksum [new file with mode: 0644]
LayoutTests/svg/custom/transform-scale-parse-expected.png [new file with mode: 0644]
LayoutTests/svg/custom/transform-scale-parse-expected.txt [new file with mode: 0644]
LayoutTests/svg/custom/transform-scale-parse.svg [new file with mode: 0644]
WebCore/ChangeLog
WebCore/ksvg2/svg/SVGTransformable.cpp

index 87a620f..be217f4 100644 (file)
@@ -1,3 +1,16 @@
+2006-08-24  Rob Buis  <buis@kde.org>
+
+        Reviewed by Darin.
+
+        Testcase for:
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=10524
+        svg transform: comma delimiting breaks display
+
+        * svg/custom/transform-scale-parse-expected.checksum: Added.
+        * svg/custom/transform-scale-parse-expected.png: Added.
+        * svg/custom/transform-scale-parse-expected.txt: Added.
+        * svg/custom/transform-scale-parse.svg: Added.
+
 2006-08-22  Trey Matteson  <trey@usa.net>
 
         Reviewed by NOBODY
diff --git a/LayoutTests/svg/custom/transform-scale-parse-expected.checksum b/LayoutTests/svg/custom/transform-scale-parse-expected.checksum
new file mode 100644 (file)
index 0000000..f1bfb4b
--- /dev/null
@@ -0,0 +1 @@
+273e1e5ff7f8c003561e6e0f854aa170
\ No newline at end of file
diff --git a/LayoutTests/svg/custom/transform-scale-parse-expected.png b/LayoutTests/svg/custom/transform-scale-parse-expected.png
new file mode 100644 (file)
index 0000000..e85c456
Binary files /dev/null and b/LayoutTests/svg/custom/transform-scale-parse-expected.png differ
diff --git a/LayoutTests/svg/custom/transform-scale-parse-expected.txt b/LayoutTests/svg/custom/transform-scale-parse-expected.txt
new file mode 100644 (file)
index 0000000..4b7bf93
--- /dev/null
@@ -0,0 +1,5 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+    KCanvasContainer {svg} at (10,10) size 100x100
+      KCanvasItem {rect} at (10,10) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M10.00,10.00L110.00,10.00L110.00,110.00L10.00,110.00"]
+      KCanvasItem {rect} at (10,10) size 100x100 [transform={m=((2.00,0.00)(0.00,2.00)) t=(10.00,10.00)}] [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L50.00,0.00L50.00,50.00L0.00,50.00"]
diff --git a/LayoutTests/svg/custom/transform-scale-parse.svg b/LayoutTests/svg/custom/transform-scale-parse.svg
new file mode 100644 (file)
index 0000000..0a19048
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
+  <rect x="10" y="10" width="100" height="100" fill="red" />
+  <rect x="0" y="0" width="50" height="50" fill="green" transform="translate(10,10), scale(2)" />
+</svg>
index f2d928d..7dc4783 100644 (file)
@@ -1,3 +1,15 @@
+2006-08-24  Rob Buis  <buis@kde.org>
+
+        Reviewed by Darin.
+
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=10524
+        svg transform: comma delimiting breaks display
+
+        Properly parse transforms which use ',' as seperators.
+
+        * ksvg2/svg/SVGTransformable.cpp:
+        (SVGTransformable::parseTransformAttribute):
+
 2006-08-23  Darin Adler  <darin@apple.com>
 
         Reviewed by Maciej.
index 54e27d4..c4fa6f2 100644 (file)
@@ -79,7 +79,7 @@ void SVGTransformable::parseTransformAttribute(SVGTransformList *list, const Ato
             break;
 
         if (subtransform[0].startsWith(";") || subtransform[0].startsWith(","))
-            subtransform[0] = subtransform[0].right(subtransform[0].length() - 1);
+            subtransform[0] = subtransform[0].mid(1).stripWhiteSpace();
 
         RefPtr<SVGTransform> t(new SVGTransform());