Title: [144948] trunk
- Revision
- 144948
- Author
- fmal...@chromium.org
- Date
- 2013-03-06 10:51:10 -0800 (Wed, 06 Mar 2013)
Log Message
SVG pattern to pattern reference does not work if first pattern has a child node
https://bugs.webkit.org/show_bug.cgi?id=111586
Reviewed by Philip Rogers.
Source/WebCore:
SVGPatternElement::collectPatternAttributes should test for child elements, not child nodes.
Tests: svg/custom/pattern-reference-expected.svg
svg/custom/pattern-reference.svg
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::collectPatternAttributes):
LayoutTests:
* svg/custom/pattern-reference-expected.svg: Added.
* svg/custom/pattern-reference.svg: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (144947 => 144948)
--- trunk/LayoutTests/ChangeLog 2013-03-06 18:50:27 UTC (rev 144947)
+++ trunk/LayoutTests/ChangeLog 2013-03-06 18:51:10 UTC (rev 144948)
@@ -1,3 +1,13 @@
+2013-03-06 Florin Malita <fmal...@chromium.org>
+
+ SVG pattern to pattern reference does not work if first pattern has a child node
+ https://bugs.webkit.org/show_bug.cgi?id=111586
+
+ Reviewed by Philip Rogers.
+
+ * svg/custom/pattern-reference-expected.svg: Added.
+ * svg/custom/pattern-reference.svg: Added.
+
2013-03-06 Ryosuke Niwa <rn...@webkit.org>
Add a flaky failure expectation to fast/css/hover-update.html on Mac per bug 111592.
Added: trunk/LayoutTests/svg/custom/pattern-reference-expected.svg (0 => 144948)
--- trunk/LayoutTests/svg/custom/pattern-reference-expected.svg (rev 0)
+++ trunk/LayoutTests/svg/custom/pattern-reference-expected.svg 2013-03-06 18:51:10 UTC (rev 144948)
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <rect width="100" height="100" fill="green"/>
+ <rect x="200" width="100" height="100" fill="green"/>
+</svg>
Added: trunk/LayoutTests/svg/custom/pattern-reference.svg (0 => 144948)
--- trunk/LayoutTests/svg/custom/pattern-reference.svg (rev 0)
+++ trunk/LayoutTests/svg/custom/pattern-reference.svg 2013-03-06 18:51:10 UTC (rev 144948)
@@ -0,0 +1,23 @@
+<?xml version="1.0" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Test for https://bugs.webkit.org/show_bug.cgi?id=111586 -->
+ <defs>
+ <pattern id="ref_pattern1" patternUnits="userSpaceOnUse" width="100" height="100" viewBox="0 0 100 100">
+ <rect width="100" height="100" fill="green"/>
+ </pattern>
+ <pattern id="ref_pattern2" patternUnits="userSpaceOnUse" width="100" height="100" viewBox="0 0 100 100">
+ <rect width="100" height="100" fill="red"/>
+ </pattern>
+
+ <pattern id="pattern1" xlink:href=""
+ random text node - should be ignored
+ </pattern>
+ <pattern id="pattern2" xlink:href=""
+ <rect width="100" height="100" fill="green"/>
+ </pattern>
+ </defs>
+
+ <!-- You should see two green rects -->
+ <rect width="100" height="100" fill="url(#pattern1)"/>
+ <rect x="200" width="100" height="100" fill="url(#pattern2)"/>
+</svg>
Modified: trunk/Source/WebCore/ChangeLog (144947 => 144948)
--- trunk/Source/WebCore/ChangeLog 2013-03-06 18:50:27 UTC (rev 144947)
+++ trunk/Source/WebCore/ChangeLog 2013-03-06 18:51:10 UTC (rev 144948)
@@ -1,3 +1,18 @@
+2013-03-06 Florin Malita <fmal...@chromium.org>
+
+ SVG pattern to pattern reference does not work if first pattern has a child node
+ https://bugs.webkit.org/show_bug.cgi?id=111586
+
+ Reviewed by Philip Rogers.
+
+ SVGPatternElement::collectPatternAttributes should test for child elements, not child nodes.
+
+ Tests: svg/custom/pattern-reference-expected.svg
+ svg/custom/pattern-reference.svg
+
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::collectPatternAttributes):
+
2013-03-06 Christophe Dumez <ch.du...@sisa.samsung.com>
[soup] session cookies are not correctly reported in getRawCookies()
Modified: trunk/Source/WebCore/svg/SVGPatternElement.cpp (144947 => 144948)
--- trunk/Source/WebCore/svg/SVGPatternElement.cpp 2013-03-06 18:50:27 UTC (rev 144947)
+++ trunk/Source/WebCore/svg/SVGPatternElement.cpp 2013-03-06 18:51:10 UTC (rev 144948)
@@ -222,7 +222,7 @@
attributes.setPatternTransform(transform);
}
- if (!attributes.hasPatternContentElement() && current->hasChildNodes())
+ if (!attributes.hasPatternContentElement() && current->childElementCount())
attributes.setPatternContentElement(current);
processedPatterns.add(current);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes