Reviewed by Darin.
authorrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 7 Jan 2007 08:37:24 +0000 (08:37 +0000)
committerrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 7 Jan 2007 08:37:24 +0000 (08:37 +0000)
        http://bugs.webkit.org/show_bug.cgi?id=12125
        overflow attribute of the symbol element not respected

        Copy the attribute map to the cloned node so the overflow on
        the symbol is respected.

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

12 files changed:
LayoutTests/ChangeLog
LayoutTests/svg/W3C-SVG-1.1/struct-symbol-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/struct-symbol-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/struct-symbol-01-b-expected.txt
LayoutTests/svg/carto.net/window-expected.checksum
LayoutTests/svg/carto.net/window-expected.png
LayoutTests/svg/custom/use-symbol-overflow-expected.checksum [new file with mode: 0644]
LayoutTests/svg/custom/use-symbol-overflow-expected.png [new file with mode: 0644]
LayoutTests/svg/custom/use-symbol-overflow-expected.txt [new file with mode: 0644]
LayoutTests/svg/custom/use-symbol-overflow.svg [new file with mode: 0644]
WebCore/ChangeLog
WebCore/ksvg2/svg/SVGUseElement.cpp

index 4a35fe3e2929a332e4512657826a55944e713961..1fe5d3a2ac73e01de0df67f6af43790e5d588ded 100644 (file)
@@ -1,3 +1,23 @@
+2007-01-06  Rob Buis  <buis@kde.org>
+
+        Reviewed by Darin.
+
+        Testcase for:
+        http://bugs.webkit.org/show_bug.cgi?id=12125
+        overflow attribute of the symbol element not respected
+
+        Also including changed testresults (improvements).
+
+        * svg/W3C-SVG-1.1/struct-symbol-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/struct-symbol-01-b-expected.png:
+        * svg/W3C-SVG-1.1/struct-symbol-01-b-expected.txt:
+        * svg/carto.net/window-expected.checksum:
+        * svg/carto.net/window-expected.png:
+        * svg/custom/use-symbol-overflow-expected.checksum: Added.
+        * svg/custom/use-symbol-overflow-expected.png: Added.
+        * svg/custom/use-symbol-overflow-expected.txt: Added.
+        * svg/custom/use-symbol-overflow.svg: Added.
+
 2007-01-06  Darin Adler  <darin@apple.com>
 
         Suggested by Mitz.
index f72c495d48680609d8ad03b631a4bc709de47120..b47a390b23f2381b698b6de05f944c6ec005afba 100644 (file)
@@ -1 +1 @@
-bb0634418a40c5de1cb822c8b4f3b419
\ No newline at end of file
+a97920a94b38670d839c72a49c9cea9b
\ No newline at end of file
index f5a25f3a816171648a250de8713bc615cbec0f43..ab222a6f0970f0064fa02b74f0e4d8991251c8bb 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/struct-symbol-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/struct-symbol-01-b-expected.png differ
index cd3978bceb6802a0faf7d10ae0cbb44b5fc9a11b..dd18e62ed188905005033f4eed486a573b794170 100644 (file)
@@ -5,15 +5,15 @@ layer at (0,0) size 480x360
         RenderSVGContainer {g} at (0,0) size 1240x1150
           RenderSVGContainer {use} at (0,0) size 1000x1000
             RenderSVGContainer {g} at (0,0) size 1000x1000
-              RenderSVGContainer {svg} at (45,0) size 150x150
+              RenderSVGContainer {svg} at (0,0) size 240x150
                 RenderImage {image} at (0,0) size 1000x1000
           RenderSVGContainer {use} at (240,150) size 1000x1000
             RenderSVGContainer {g} at (240,150) size 1000x1000 [transform={m=((1.00,0.00)(0.00,1.00)) t=(240.00,150.00)}]
-              RenderSVGContainer {svg} at (285,150) size 150x150
-                RenderPath {rect} at (285,150) size 75x75 [fill={[type=SOLID] [color=#FFFF00]}] [data="M0.00,0.00L500.00,0.00L500.00,500.00L0.00,500.00"]
-                RenderPath {rect} at (360,150) size 75x75 [fill={[type=SOLID] [color=#FF0000]}] [data="M500.00,0.00L1000.00,0.00L1000.00,500.00L500.00,500.00"]
-                RenderPath {rect} at (285,225) size 75x75 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,500.00L500.00,500.00L500.00,1000.00L0.00,1000.00"]
-                RenderPath {rect} at (360,225) size 75x75 [fill={[type=SOLID] [color=#FFFF00]}] [data="M500.00,500.00L1000.00,500.00L1000.00,1000.00L500.00,1000.00"]
+              RenderSVGContainer {svg} at (240,150) size 240x150
+                RenderPath {rect} at (240,150) size 120x75 [fill={[type=SOLID] [color=#FFFF00]}] [data="M0.00,0.00L500.00,0.00L500.00,500.00L0.00,500.00"]
+                RenderPath {rect} at (360,150) size 120x75 [fill={[type=SOLID] [color=#FF0000]}] [data="M500.00,0.00L1000.00,0.00L1000.00,500.00L500.00,500.00"]
+                RenderPath {rect} at (240,225) size 120x75 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,500.00L500.00,500.00L500.00,1000.00L0.00,1000.00"]
+                RenderPath {rect} at (360,225) size 120x75 [fill={[type=SOLID] [color=#FFFF00]}] [data="M500.00,500.00L1000.00,500.00L1000.00,1000.00L500.00,1000.00"]
       RenderSVGText {text} at (10,340) size 480x46
         RenderSVGInlineText {#text} at (0,-36) size 264x46
           text run at (0,-36) width 264: "$Revision: 1.6 $"
index 43f05e479bae72487b5e291265ecc03aa17a0a7b..8287e8c4e5a08ab6860203f14b868fc8b4282875 100644 (file)
@@ -1 +1 @@
-bf4f7249c62d8a4aca577ce3fbe6c978
\ No newline at end of file
+7a696a0b8d582b1e07fae7cdeb22121d
\ No newline at end of file
index 3156b6a62072d9216df49f249cb47bdee0a4abd7..c6cadb756d4d89c1b449e0773ba3f2edbff75a60 100644 (file)
Binary files a/LayoutTests/svg/carto.net/window-expected.png and b/LayoutTests/svg/carto.net/window-expected.png differ
diff --git a/LayoutTests/svg/custom/use-symbol-overflow-expected.checksum b/LayoutTests/svg/custom/use-symbol-overflow-expected.checksum
new file mode 100644 (file)
index 0000000..3a4f1f7
--- /dev/null
@@ -0,0 +1 @@
+16310588467cfc20d551635abc59b784
\ No newline at end of file
diff --git a/LayoutTests/svg/custom/use-symbol-overflow-expected.png b/LayoutTests/svg/custom/use-symbol-overflow-expected.png
new file mode 100644 (file)
index 0000000..3db2634
Binary files /dev/null and b/LayoutTests/svg/custom/use-symbol-overflow-expected.png differ
diff --git a/LayoutTests/svg/custom/use-symbol-overflow-expected.txt b/LayoutTests/svg/custom/use-symbol-overflow-expected.txt
new file mode 100644 (file)
index 0000000..0bb8418
--- /dev/null
@@ -0,0 +1,8 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+    RenderSVGContainer {svg} at (0,0) size 100x100
+      RenderSVGContainer {defs} at (0,0) size 0x0
+      RenderSVGContainer {use} at (0,0) size 100x100
+        RenderSVGContainer {g} at (0,0) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(50.00,50.00)}]
+          RenderSVGContainer {svg} at (0,0) size 100x100
+            RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M-50.00,-50.00L50.00,-50.00L50.00,50.00L-50.00,50.00"]
diff --git a/LayoutTests/svg/custom/use-symbol-overflow.svg b/LayoutTests/svg/custom/use-symbol-overflow.svg
new file mode 100644 (file)
index 0000000..a7624b0
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
+<svg version="1.1" baseProfile="basic" id="svg-root" width="100%" height="100%" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
+    <defs>
+        <symbol id="symbolRect" overflow="visible">
+        <rect x="-50" y="-50" width="100" height="100" fill="green"/>
+        </symbol>
+    </defs>
+    <use id="Zuerich" x="50" y="50" xlink:href="#symbolRect"/>
+</svg>
+
index 6cbbd90adea9d6a538069486a70a9e9c2a77c217..487cc0d4322d29f07a9418a15cc3fb2de2f420de 100644 (file)
@@ -1,3 +1,16 @@
+2007-01-06  Rob Buis  <buis@kde.org>
+
+        Reviewed by Darin.
+
+        http://bugs.webkit.org/show_bug.cgi?id=12125
+        overflow attribute of the symbol element not respected
+
+        Copy the attribute map to the cloned node so the overflow on
+        the symbol is respected.
+
+        * ksvg2/svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::closeRenderer):
+
 2007-01-06  Eric Seidel  <eric@webkit.org>
 
         Reviewed and significantly tweaked by Darin.
index 23798adc3c14c822536b11d027bc537a798a47ef..0108d2f222879a15cc04099310f1152021cd578f 100644 (file)
@@ -113,6 +113,7 @@ void SVGUseElement::closeRenderer()
             dummy->setAttribute(SVGNames::viewBoxAttr, symbolViewBox);
         }
         target->cloneChildNodes(dummy.get());
+        *dummy->attributes() = *target->attributes();
 
         RefPtr<SVGElement> dummy2 = new SVGDummyElement(SVGNames::gTag, document());
         dummy2->setAttribute(SVGNames::transformAttr, trans);