Title: [88266] trunk
Revision
88266
Author
[email protected]
Date
2011-06-07 14:15:30 -0700 (Tue, 07 Jun 2011)

Log Message

2011-06-07  Rob Buis  <[email protected]>

        Reviewed by Dirk Schulze.

        stroke-dasharray does not handle "none"
        https://bugs.webkit.org/show_bug.cgi?id=62203

        Test stroke-dasharray=none as well as invalid syntaxes.

        * platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.png: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.txt: Added.
        * platform/mac/svg/W3C-SVG-1.1/styling-css-04-f-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/styling-css-04-f-expected.txt:
        * platform/mac/svg/custom/invalid-dasharray-expected.png: Added.
        * platform/mac/svg/custom/invalid-dasharray-expected.txt: Added.
        * svg/W3C-SVG-1.1-SE/styling-css-04-f.svg: Added.
        * svg/custom/invalid-dasharray.svg: Added.
2011-06-07  Rob Buis  <[email protected]>

        Reviewed by Dirk Schulze.

        stroke-dasharray does not handle "none"
        https://bugs.webkit.org/show_bug.cgi?id=62203

        Use the initial strokeDashArray style for stroke-dasharray="none" to apply to SVGRenderStyle rather than bailing out.

        Tests: svg/W3C-SVG-1.1-SE/styling-css-04-f.svg
               svg/custom/invalid-dasharray.svg

        * css/SVGCSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applySVGProperty):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (88265 => 88266)


--- trunk/LayoutTests/ChangeLog	2011-06-07 21:10:43 UTC (rev 88265)
+++ trunk/LayoutTests/ChangeLog	2011-06-07 21:15:30 UTC (rev 88266)
@@ -1,3 +1,21 @@
+2011-06-07  Rob Buis  <[email protected]>
+
+        Reviewed by Dirk Schulze.
+
+        stroke-dasharray does not handle "none"
+        https://bugs.webkit.org/show_bug.cgi?id=62203
+
+        Test stroke-dasharray=none as well as invalid syntaxes.
+
+        * platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.png: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.txt: Added.
+        * platform/mac/svg/W3C-SVG-1.1/styling-css-04-f-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/styling-css-04-f-expected.txt:
+        * platform/mac/svg/custom/invalid-dasharray-expected.png: Added.
+        * platform/mac/svg/custom/invalid-dasharray-expected.txt: Added.
+        * svg/W3C-SVG-1.1-SE/styling-css-04-f.svg: Added.
+        * svg/custom/invalid-dasharray.svg: Added.
+
 2011-06-07  Mario Sanchez Prada  <[email protected]>
 
         Unreviewed, skip test crashing in GTK bots because of an ASSERT.

Modified: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/styling-css-04-f-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/styling-css-04-f-expected.txt (88265 => 88266)


--- trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/styling-css-04-f-expected.txt	2011-06-07 21:10:43 UTC (rev 88265)
+++ trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/styling-css-04-f-expected.txt	2011-06-07 21:15:30 UTC (rev 88266)
@@ -39,8 +39,8 @@
       RenderSVGContainer {g} at (29,209) size 349x69
         RenderSVGPath {rect} at (29,209) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#0000FF]}] [x=30.00] [y=210.00] [width=67.50] [height=67.50]
         RenderSVGPath {rect} at (99,209) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#008000]}] [x=100.00] [y=210.00] [width=67.50] [height=67.50]
-        RenderSVGPath {rect} at (169,209) size 69x69 [stroke={[type=SOLID] [color=#000000] [dash array={5.00, 3.14}]}] [fill={[type=SOLID] [color=#FFA500]}] [x=170.00] [y=210.00] [width=67.50] [height=67.50]
-        RenderSVGPath {rect} at (239,209) size 69x69 [stroke={[type=SOLID] [color=#000000] [dash array={3.14, 8.00}]}] [fill={[type=SOLID] [color=#FFD700]}] [x=240.00] [y=210.00] [width=67.50] [height=67.50]
+        RenderSVGPath {rect} at (169,209) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FFA500]}] [x=170.00] [y=210.00] [width=67.50] [height=67.50]
+        RenderSVGPath {rect} at (239,209) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FFD700]}] [x=240.00] [y=210.00] [width=67.50] [height=67.50]
         RenderSVGPath {rect} at (309,209) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#800080]}] [x=310.00] [y=210.00] [width=67.50] [height=67.50]
       RenderSVGContainer {g} at (379,209) size 69x69
         RenderSVGPath {rect} at (379,209) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=380.00] [y=210.00] [width=67.50] [height=67.50]

Added: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.png ___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.txt (0 => 88266)


--- trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.txt	2011-06-07 21:15:30 UTC (rev 88266)
@@ -0,0 +1,81 @@
+layer at (0,0) size 480x360
+  RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+  RenderSVGRoot {svg} at (0,0) size 480x360
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+    RenderSVGContainer {g} at (15,16) size 433x262
+      RenderSVGContainer {g} at (15,16) size 433x262
+        RenderSVGText {text} at (162,16) size 156x24 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 156x24
+            chunk 1 (middle anchor) text run 1 at (162.50,35.00) startOffset 0 endOffset 17 width 155.00: "CSS selector test"
+        RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+        RenderSVGContainer {g} at (29,69) size 209x69
+          RenderSVGPath {rect} at (29,69) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#0000FF]}] [x=30.00] [y=70.00] [width=67.50] [height=67.50]
+          RenderSVGContainer {g} at (99,69) size 69x69
+            RenderSVGPath {rect} at (99,69) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#008000]}] [x=100.00] [y=70.00] [width=67.50] [height=67.50]
+          RenderSVGContainer {g} at (169,69) size 69x69
+            RenderSVGPath {rect} at (169,69) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FFA500]}] [x=170.00] [y=70.00] [width=67.50] [height=67.50]
+        RenderSVGContainer {g} at (239,69) size 69x69
+          RenderSVGContainer {g} at (239,69) size 69x69
+            RenderSVGContainer {g} at (239,69) size 69x69
+              RenderSVGContainer {g} at (239,69) size 69x69
+                RenderSVGContainer {g} at (239,69) size 69x69
+                  RenderSVGContainer {g} at (239,69) size 69x69
+                    RenderSVGPath {rect} at (239,69) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FFD700]}] [x=240.00] [y=70.00] [width=67.50] [height=67.50]
+        RenderSVGContainer {g} at (309,69) size 139x69
+          RenderSVGContainer {g} at (309,69) size 139x69
+            RenderSVGContainer {g} at (309,69) size 139x69
+              RenderSVGPath {rect} at (309,69) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#800080]}] [x=310.00] [y=70.00] [width=67.50] [height=67.50]
+              RenderSVGContainer {g} at (379,69) size 69x69
+                RenderSVGContainer {g} at (379,69) size 69x69
+                  RenderSVGPath {rect} at (379,69) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#C0C0C0]}] [x=380.00] [y=70.00] [width=67.50] [height=67.50]
+        RenderSVGContainer {g} at (29,139) size 209x69
+          RenderSVGPath {rect} at (29,139) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#0000FF]}] [x=30.00] [y=140.00] [width=67.50] [height=67.50]
+          RenderSVGPath {rect} at (99,139) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#008000]}] [x=100.00] [y=140.00] [width=67.50] [height=67.50]
+          RenderSVGPath {rect} at (169,139) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FFA500]}] [x=170.00] [y=140.00] [width=67.50] [height=67.50]
+        RenderSVGContainer {g} at (239,139) size 209x69
+          RenderSVGPath {rect} at (239,139) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FFD700]}] [x=240.00] [y=140.00] [width=67.50] [height=67.50]
+          RenderSVGPath {rect} at (309,139) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#800080]}] [x=310.00] [y=140.00] [width=67.50] [height=67.50]
+          RenderSVGContainer {g} at (379,139) size 69x69
+            RenderSVGPath {rect} at (379,139) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#C0C0C0]}] [x=380.00] [y=140.00] [width=67.50] [height=67.50]
+        RenderSVGContainer {g} at (29,209) size 349x69
+          RenderSVGPath {rect} at (29,209) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#0000FF]}] [x=30.00] [y=210.00] [width=67.50] [height=67.50]
+          RenderSVGPath {rect} at (99,209) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#008000]}] [x=100.00] [y=210.00] [width=67.50] [height=67.50]
+          RenderSVGPath {rect} at (169,209) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FFA500]}] [x=170.00] [y=210.00] [width=67.50] [height=67.50]
+          RenderSVGPath {rect} at (239,209) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FFD700]}] [x=240.00] [y=210.00] [width=67.50] [height=67.50]
+          RenderSVGPath {rect} at (309,209) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#800080]}] [x=310.00] [y=210.00] [width=67.50] [height=67.50]
+        RenderSVGContainer {g} at (379,209) size 69x69
+          RenderSVGPath {rect} at (379,209) size 69x69 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#C0C0C0]}] [x=380.00] [y=210.00] [width=67.50] [height=67.50]
+        RenderSVGContainer {g} at (15,45) size 400x212
+          RenderSVGText {text} at (58,45) size 12x19 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 12x19
+              chunk 1 (middle anchor) text run 1 at (58.50,60.00) startOffset 0 endOffset 1 width 11.00: "A"
+          RenderSVGText {text} at (127,45) size 12x19 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 12x19
+              chunk 1 (middle anchor) text run 1 at (127.50,60.00) startOffset 0 endOffset 1 width 11.00: "B"
+          RenderSVGText {text} at (194,45) size 12x19 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 12x19
+              chunk 1 (middle anchor) text run 1 at (194.00,60.00) startOffset 0 endOffset 1 width 12.00: "C"
+          RenderSVGText {text} at (264,45) size 12x19 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 12x19
+              chunk 1 (middle anchor) text run 1 at (264.00,60.00) startOffset 0 endOffset 1 width 12.00: "D"
+          RenderSVGText {text} at (334,45) size 12x19 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 12x19
+              chunk 1 (middle anchor) text run 1 at (334.50,60.00) startOffset 0 endOffset 1 width 11.00: "E"
+          RenderSVGText {text} at (405,45) size 10x19 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 10x19
+              chunk 1 (middle anchor) text run 1 at (405.00,60.00) startOffset 0 endOffset 1 width 10.00: "F"
+          RenderSVGText {text} at (15,98) size 10x19 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 10x19
+              chunk 1 (middle anchor) text run 1 at (15.50,113.00) startOffset 0 endOffset 1 width 9.00: "1"
+          RenderSVGText {text} at (15,168) size 10x19 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 10x19
+              chunk 1 (middle anchor) text run 1 at (15.50,183.00) startOffset 0 endOffset 1 width 9.00: "2"
+          RenderSVGText {text} at (15,238) size 10x19 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 10x19
+              chunk 1 (middle anchor) text run 1 at (15.50,253.00) startOffset 0 endOffset 1 width 9.00: "3"
+    RenderSVGContainer {g} at (10,310) size 231x38
+      RenderSVGText {text} at (10,310) size 231x38 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 231x38
+          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.8 $"
+    RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]

Added: trunk/LayoutTests/platform/mac/svg/custom/invalid-dasharray-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/svg/custom/invalid-dasharray-expected.png ___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/platform/mac/svg/custom/invalid-dasharray-expected.txt (0 => 88266)


--- trunk/LayoutTests/platform/mac/svg/custom/invalid-dasharray-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/svg/custom/invalid-dasharray-expected.txt	2011-06-07 21:15:30 UTC (rev 88266)
@@ -0,0 +1,5 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (0,0) size 105x105
+    RenderSVGPath {rect} at (0,0) size 105x105 [stroke={[type=SOLID] [color=#008000] [stroke width=10.00] [dash array={10.00, 10.00}]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]

Added: trunk/LayoutTests/svg/W3C-SVG-1.1-SE/styling-css-04-f.svg (0 => 88266)


--- trunk/LayoutTests/svg/W3C-SVG-1.1-SE/styling-css-04-f.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/W3C-SVG-1.1-SE/styling-css-04-f.svg	2011-06-07 21:15:30 UTC (rev 88266)
@@ -0,0 +1,153 @@
+<svg version="1.1" baseProfile="full" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+  <!--======================================================================-->
+  <!--=  SVG 1.1 2nd Edition Test Case                                     =-->
+  <!--======================================================================-->
+  <!--=  Copyright 2009 World Wide Web Consortium, (Massachusetts          =-->
+  <!--=  Institute of Technology, European Research Consortium for         =""
+  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
+  <!--=  All Rights Reserved.                                              =-->
+  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
+  <!--======================================================================-->
+  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" template-version="1.4" reviewer="CL" author="BB" status="accepted" version="$Revision: 1.8 $" testname="$RCSfile: styling-css-04-f.svg,v $">
+    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href=""
+        <p>
+          This purpose of the file is to test some of the CSS2 selector syntax.
+        </p>
+    </d:testDescription>
+    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        A UA supporting CSS selectors should render an image identical to the referenced image.
+      </p>
+
+    </d:operatorScript>
+    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+      The test is passed if a grid of 6x3 squares is shown, the colors in each column 
+      are the same and are those of the reference image (blue, green, orange, gold, purple and silver)
+      </p>
+      <p>
+        For a full analysis of this test, please see
+        <a href="" target="css">
+          this explanation.
+        </a>
+      </p>
+    </d:passCriteria>
+  </d:SVGTestCase>
+  <title id="test-title">$RCSfile: styling-css-04-f.svg,v $</title>
+  <defs>
+    <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+      <font-face-src>
+        <font-face-uri xlink:href=""
+      </font-face-src>
+    </font-face>
+  </defs>
+  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+    <g fill="white">
+      <text x="240" y="35" font-size="20" text-anchor="middle">CSS selector test</text>
+      <defs>
+        <style type="text/css">
+          * {stroke:red; stroke-width:1;} /* 0 */
+          text {stroke:none; fill:black;} /* 1 */
+          rect {stroke:black; stroke-dasharray:none;} /* 1 */
+          #test-frame {fill:none} /* 100 */
+          g#alpha {fill:blue} /* 101 */
+          a#alpha {fill:red} /* 101 */
+          #alpha * rect {fill:green} /* 101 */
+          #alpha-2 &gt; rect {fill:orange} /* 101 */
+          #beta rect {fill:gold} /* 101 */
+          g#gamma * g * * rect {fill:silver} /* 103 */
+          g#gamma * * rect {fill:purple} /* 102 */
+          [stroke-width="1.0001"] {fill:blue} /* 10 */
+          g#delta rect[stroke-width="1.0002"] {fill:green} /* 112 */
+          g#delta &gt; rect[stroke-width="1.0003"] {fill:orange} /* 102 */
+          #delta + g &gt; * {fill:gold} /* 101 */
+          g#delta + g &gt; rect + rect {fill:purple} /* 104 */
+          #delta + g#epsilon * rect:first-child {fill:silver} /* 202 */
+          #zeta [cursor] {fill:blue} /* 110 */
+          g#zeta [cursor="help"] {fill:green} /* 111 */
+          g#zeta [rx~="3E"] {fill:orange} /* 111 */
+          g#epsilon + g [stroke-dasharray|="3.1415926"] {fill:gold} /* 112 */
+          g#epsilon + g &gt; rect.hello {fill:purple} /* 113 */
+          g#eta rect:first-child {fill:silver} /* 102 */
+        </style>
+      </defs>
+      <g id="alpha">
+        <rect x="30" y="70" width="67.5" height="67.5" id="A1"/>
+        <g id="alpha-1">
+          <rect x="100" y="70" width="67.5" height="67.5" id="B1"/>
+        </g>
+        <g id="alpha-2">
+          <rect x="170" y="70" width="67.5" height="67.5" id="C1"/>
+        </g>
+      </g>
+      <g id="beta">
+        <g>
+          <g>
+            <g>
+              <g>
+                <g>
+                  <rect x="240" y="70" width="67.5" height="67.5" id="D1"/>
+                </g>
+              </g>
+            </g>
+          </g>
+        </g>
+      </g>
+      <g id="gamma">
+        <g>
+          <g>
+            <rect x="310" y="70" width="67.5" height="67.5" id="E1"/>
+            <g>
+              <g>
+                <rect x="380" y="70" width="67.5" height="67.5" id="F1"/>
+              </g>
+            </g>
+          </g>
+        </g>
+      </g>
+      <g id="delta">
+        <rect x="30" y="140" width="67.5" height="67.5" stroke-width="1.0001" id="A2"/>
+        <rect x="100" y="140" width="67.5" height="67.5" stroke-width="1.0002" id="B2"/>
+        <rect x="170" y="140" width="67.5" height="67.5" stroke-width="1.0003" id="C2"/>
+      </g>
+      <g id="epsilon">
+        <rect x="240" y="140" width="67.5" height="67.5" id="D2"/>
+        <rect x="310" y="140" width="67.5" height="67.5" id="E2"/>
+        <g>
+          <rect x="380" y="140" width="67.5" height="67.5" id="F2"/>
+        </g>
+      </g>
+      <g id="zeta">
+        <rect x="30" y="210" width="67.5" height="67.5" cursor="default" id="A3"/>
+        <rect x="100" y="210" width="67.5" height="67.5" cursor="help" id="B3"/>
+        <rect x="170" y="210" width="67.5" height="67.5" stroke-dasharray="5, 3.14" id="C3" style="fill:orange"/>
+        <rect x="240" y="210" width="67.5" height="67.5" rx="3E-6" stroke-dasharray="3.1415926,8" id="D3" style="fill:gold"/>
+        <rect x="310" y="210" width="67.5" height="67.5" class="hello" id="E3"/>
+      </g>
+      <g id="eta">
+        <rect x="380" y="210" width="67.5" height="67.5" id="F3"/>
+      </g>
+      <g id="labels" font-size="16" font-family="Arial, Helvetica, sans-serif">
+        <text x="64" y="60" text-anchor="middle">A</text>
+        <text x="133" y="60" text-anchor="middle">B</text>
+        <text x="200" y="60" text-anchor="middle">C</text>
+        <text x="270" y="60" text-anchor="middle">D</text>
+        <text x="340" y="60" text-anchor="middle">E</text>
+        <text x="410" y="60" text-anchor="middle">F</text>
+        <text x="20" y="113" text-anchor="middle">1</text>
+        <text x="20" y="183" text-anchor="middle">2</text>
+        <text x="20" y="253" text-anchor="middle">3</text>
+      </g>
+    </g>
+  </g>
+  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+  </g>
+  <rect id="test-frame" x="1" y="1" width="478" height="358"/>
+  <!-- comment out this watermark once the test is approved -->
+  <!--<g id="draft-watermark">
+    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+  </g>-->
+</svg>

Added: trunk/LayoutTests/svg/custom/invalid-dasharray.svg (0 => 88266)


--- trunk/LayoutTests/svg/custom/invalid-dasharray.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/custom/invalid-dasharray.svg	2011-06-07 21:15:30 UTC (rev 88266)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
+    <!-- Test that invalid stroke-dasharray values are not applied -->
+    <style type="text/css"><![CDATA[
+        #rect {
+            stroke-dasharray: none, 3;
+            stroke-dasharray: 3, none;
+            stroke-dasharray: nonsense;
+        }
+    ]]></style>
+    <rect id="rect" fill="none" stroke="green" stroke-width="10" stroke-dasharray="10 10" width="100" height="100"/>
+</svg>

Modified: trunk/Source/WebCore/ChangeLog (88265 => 88266)


--- trunk/Source/WebCore/ChangeLog	2011-06-07 21:10:43 UTC (rev 88265)
+++ trunk/Source/WebCore/ChangeLog	2011-06-07 21:15:30 UTC (rev 88266)
@@ -1,3 +1,18 @@
+2011-06-07  Rob Buis  <[email protected]>
+
+        Reviewed by Dirk Schulze.
+
+        stroke-dasharray does not handle "none"
+        https://bugs.webkit.org/show_bug.cgi?id=62203
+
+        Use the initial strokeDashArray style for stroke-dasharray="none" to apply to SVGRenderStyle rather than bailing out.
+
+        Tests: svg/W3C-SVG-1.1-SE/styling-css-04-f.svg
+               svg/custom/invalid-dasharray.svg
+
+        * css/SVGCSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::applySVGProperty):
+
 2011-06-07  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r88259 and r88263.

Modified: trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp (88265 => 88266)


--- trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp	2011-06-07 21:10:43 UTC (rev 88265)
+++ trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp	2011-06-07 21:15:30 UTC (rev 88266)
@@ -266,8 +266,10 @@
         case CSSPropertyStrokeDasharray:
         {
             HANDLE_INHERIT_AND_INITIAL(strokeDashArray, StrokeDashArray)
-            if (!value->isValueList())
+            if (!value->isValueList()) {
+                svgstyle->setStrokeDashArray(SVGRenderStyle::initialStrokeDashArray());
                 break;
+            }
 
             CSSValueList* dashes = static_cast<CSSValueList*>(value);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to