Diff
Modified: trunk/LayoutTests/ChangeLog (86790 => 86791)
--- trunk/LayoutTests/ChangeLog 2011-05-18 21:26:03 UTC (rev 86790)
+++ trunk/LayoutTests/ChangeLog 2011-05-18 21:40:16 UTC (rev 86791)
@@ -1,3 +1,20 @@
+2011-05-18 Rob Buis <[email protected]>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Marker test from ietestcenter fails
+ https://bugs.webkit.org/show_bug.cgi?id=60721
+
+ Test cases where display=none is set on <marker>, i.e. directly or through ancestor.
+
+ * platform/mac/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.png: Added.
+ * platform/mac/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.txt: Added.
+ * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt:
+ * platform/mac/svg/custom/painting-marker-07-f-inherit-expected.png: Added.
+ * platform/mac/svg/custom/painting-marker-07-f-inherit-expected.txt: Added.
+ * svg/W3C-SVG-1.1-SE/painting-marker-07-f.svg: Added.
+ * svg/custom/painting-marker-07-f-inherit.svg: Added.
+
2011-05-18 Alexis Menard <[email protected]>, Simon Hausmann <[email protected]>
Reviewed by Eric Carlson.
Added: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.txt (0 => 86791)
--- trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.txt 2011-05-18 21:40:16 UTC (rev 86791)
@@ -0,0 +1,19 @@
+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 (0,0) size 325x225
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGResourceMarker {marker} [id="testMarker"] [markerUnits=strokeWidth] [ref at (0,0)] [angle=0.00]
+ RenderSVGPath {path} at (0,0) size 200x200 [fill={[type=SOLID] [color=#008000]}] [data="" 0 0 L 200 200 L 0 150 Z"]
+ RenderSVGHiddenContainer {g} at (0,0) size 0x0
+ RenderSVGResourceMarker {marker} [id="testMarker2"] [markerUnits=strokeWidth] [ref at (0,0)] [angle=0.00]
+ RenderSVGPath {path} at (0,0) size 200x200 [fill={[type=SOLID] [color=#008000]}] [data="" 0 0 L 200 200 L 0 150 Z"]
+ RenderSVGPath {path} at (0,0) size 225x225 [fill={[type=SOLID] [color=#000000]}] [end marker=testMarker] [data="" 0 0 L 25 25"]
+ RenderSVGPath {path} at (100,0) size 225x225 [fill={[type=SOLID] [color=#000000]}] [end marker=testMarker2] [data="" 100 0 L 125 25"]
+ 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.3 $"
+ RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
Modified: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt (86790 => 86791)
--- trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt 2011-05-18 21:26:03 UTC (rev 86790)
+++ trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt 2011-05-18 21:40:16 UTC (rev 86791)
@@ -58,6 +58,7 @@
chunk 1 text run 6 at (168.10,180.00) startOffset 19 endOffset 20 width 10.00: "V"
chunk 1 text run 7 at (177.47,180.00) startOffset 20 endOffset 21 width 11.67: "G"
chunk 1 text run 8 at (189.05,180.00) startOffset 21 endOffset 26 width 38.35: "Angle"
+ RenderSVGResourceMarker {marker} [id="m"] [markerUnits=strokeWidth] [ref at (0,0)] [angle=1.80]
RenderSVGContainer {g} at (10,314) size 227x33
RenderSVGText {text} at (10,314) size 227x33 contains 1 chunk(s)
RenderSVGInlineText {#text} at (0,0) size 227x33
Added: trunk/LayoutTests/platform/mac/svg/custom/painting-marker-07-f-inherit-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/svg/custom/painting-marker-07-f-inherit-expected.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/platform/mac/svg/custom/painting-marker-07-f-inherit-expected.txt (0 => 86791)
--- trunk/LayoutTests/platform/mac/svg/custom/painting-marker-07-f-inherit-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/svg/custom/painting-marker-07-f-inherit-expected.txt 2011-05-18 21:40:16 UTC (rev 86791)
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 100x100
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGHiddenContainer {g} at (0,0) size 0x0
+ RenderSVGResourceMarker {marker} [id="testMarker"] [markerUnits=strokeWidth] [ref at (0,0)] [angle=0.00]
+ RenderSVGPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+ RenderSVGPath {path} at (0,0) size 100x100 [fill={[type=SOLID] [color=#000000]}] [end marker=testMarker] [data="" 10 10 L 0 0"]
Added: trunk/LayoutTests/svg/W3C-SVG-1.1-SE/painting-marker-07-f.svg (0 => 86791)
--- trunk/LayoutTests/svg/W3C-SVG-1.1-SE/painting-marker-07-f.svg (rev 0)
+++ trunk/LayoutTests/svg/W3C-SVG-1.1-SE/painting-marker-07-f.svg 2011-05-18 21:40:16 UTC (rev 86791)
@@ -0,0 +1,66 @@
+<svg 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 2008 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="Microsoft" status="accepted" version="$Revision: 1.3 $" testname="$RCSfile: painting-marker-07-f.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href=""
+ <p>
+ A 'marker' element with 'display' set to 'none' on that
+ element or any ancestor is rendered when referenced by another element.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Run the test. No interaction required
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test passes if there are two green triangles visible on the page.
+ </p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: painting-marker-07-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">
+ <defs>
+ <marker id="testMarker" markerWidth="100" markerHeight="100" display="none">
+ <path d="M 0 0 L 200 200 L 0 150 z" fill="green" />
+ </marker>
+ <g display="none">
+ <marker id="testMarker2" markerWidth="100" markerHeight="100">
+ <path d="M 0 0 L 200 200 L 0 150 z" fill="green" />
+ </marker>
+ </g>
+ </defs>
+ <path d="M 0 0 L 25 25" marker-end="url(#testMarker)" />
+ <path d="M 100 0 L 125 25" marker-end="url(#testMarker2)" />
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.3 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- 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/painting-marker-07-f-inherit.svg (0 => 86791)
--- trunk/LayoutTests/svg/custom/painting-marker-07-f-inherit.svg (rev 0)
+++ trunk/LayoutTests/svg/custom/painting-marker-07-f-inherit.svg 2011-05-18 21:40:16 UTC (rev 86791)
@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <defs>
+ <g display="none">
+ <marker id="testMarker" markerWidth="100" markerHeight="100" style="display:inherit">
+ <rect width="100" height="100" fill="green" />
+ </marker>
+ </g>
+ </defs>
+ <path d="M 10 10 L 0 0" marker-end="url(#testMarker)" />
+</svg>
Modified: trunk/Source/WebCore/ChangeLog (86790 => 86791)
--- trunk/Source/WebCore/ChangeLog 2011-05-18 21:26:03 UTC (rev 86790)
+++ trunk/Source/WebCore/ChangeLog 2011-05-18 21:40:16 UTC (rev 86791)
@@ -1,3 +1,23 @@
+2011-05-18 Rob Buis <[email protected]>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Marker test from ietestcenter fails
+ https://bugs.webkit.org/show_bug.cgi?id=60721
+
+ Change <marker> renderer creation behaviour to always create the renderer. This fixes
+ the problem that no marker is rendered when display=none is set on the <marker>. The
+ specification states that display=none should have no influence on <marker> usage:
+ "The ‘display’ property does not apply to the ‘marker’ element; thus, ..., and ‘marker’
+ elements are available for referencing even when the ‘display’ property on the ‘marker’
+ element or any of its ancestors is set to none."
+
+ Tests: svg/W3C-SVG-1.1-SE/painting-marker-07-f.svg
+ svg/custom/painting-marker-07-f-inherit.svg
+
+ * svg/SVGMarkerElement.h:
+ (WebCore::SVGMarkerElement::rendererIsNeeded):
+
2011-05-18 Alexis Menard <[email protected]>, Simon Hausmann <[email protected]>
Reviewed by Eric Carlson.
Modified: trunk/Source/WebCore/svg/SVGMarkerElement.h (86790 => 86791)
--- trunk/Source/WebCore/svg/SVGMarkerElement.h 2011-05-18 21:26:03 UTC (rev 86790)
+++ trunk/Source/WebCore/svg/SVGMarkerElement.h 2011-05-18 21:40:16 UTC (rev 86791)
@@ -72,6 +72,7 @@
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+ virtual bool rendererIsNeeded(RenderStyle*) { return true; }
virtual bool selfHasRelativeLengths() const;