[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

zimmermann at webkit.org zimmermann at webkit.org
Wed Dec 22 11:13:29 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 08999d155cf8adcb3da902c407a854bee5df0166
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 15 08:25:18 2010 +0000

    2010-07-15  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Eric Seidel.
    
            SVG patterns and masks should not be able to reference themselves
            https://bugs.webkit.org/show_bug.cgi?id=32171
    
            Pattern still had an issue, when using constructs like:
            <pattern id="pattern1" xlink:href="#pattern2"/>
            <pattern id="pattern2"><rect fill="url(#pattern1)"/></pattern>
    
            Extended test svg/custom/recursive-pattern.svg to cover this situation.
    
            * rendering/RenderSVGResourcePattern.cpp:
            (WebCore::RenderSVGResourcePattern::applyResource): Don't perform the cycle check against node()...
            (WebCore::RenderSVGResourcePattern::createTileImage): .. but against the "patternContentElement" which respect the xlink:href chaining.
    
    2010-07-15  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Eric Seidel.
    
            SVG patterns and masks should not be able to reference themselves
            https://bugs.webkit.org/show_bug.cgi?id=32171
    
            Pattern still had an issue, when using constructs like:
            <pattern id="pattern1" xlink:href="#pattern2"/>
            <pattern id="pattern2"><rect fill="url(#pattern1)"/></pattern>
    
            * platform/mac/svg/custom/recursive-pattern-expected.checksum:
            * platform/mac/svg/custom/recursive-pattern-expected.png:
            * platform/mac/svg/custom/recursive-pattern-expected.txt:
            * svg/custom/recursive-pattern.svg: Add new subtest.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63415 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ae5e369..271b39f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,21 @@
 2010-07-15  Nikolas Zimmermann  <nzimmermann at rim.com>
 
+        Reviewed by Eric Seidel.
+
+        SVG patterns and masks should not be able to reference themselves
+        https://bugs.webkit.org/show_bug.cgi?id=32171
+
+        Pattern still had an issue, when using constructs like:
+        <pattern id="pattern1" xlink:href="#pattern2"/>
+        <pattern id="pattern2"><rect fill="url(#pattern1)"/></pattern>
+
+        * platform/mac/svg/custom/recursive-pattern-expected.checksum:
+        * platform/mac/svg/custom/recursive-pattern-expected.png:
+        * platform/mac/svg/custom/recursive-pattern-expected.txt:
+        * svg/custom/recursive-pattern.svg: Add new subtest.
+
+2010-07-15  Nikolas Zimmermann  <nzimmermann at rim.com>
+
         Not reviewed. Forgot to reset pixel test result to the old result after the partial revert.
 
         * platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.checksum:
diff --git a/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.checksum b/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.checksum
index 78df2b3..ffb0f1f 100644
--- a/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.checksum
+++ b/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.checksum
@@ -1 +1 @@
-4de93deb4103eaf64c73e4c897f42cf5
\ No newline at end of file
+072328919c08c17ef70c206e80d348dd
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.png b/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.png
index cec57e5..3e6117a 100644
Binary files a/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.png and b/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.txt b/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.txt
index 981b956..82b4208 100644
--- a/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.txt
@@ -1,7 +1,7 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 201x201
+  RenderSVGRoot {svg} at (0,0) size 201x301
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
       RenderSVGResourcePattern {pattern} [id="pattern1"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
         RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern1"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
@@ -9,7 +9,12 @@ layer at (0,0) size 800x600
         RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern1"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
       RenderSVGResourcePattern {pattern} [id="pattern3"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
       RenderSVGResourcePattern {pattern} [id="pattern4"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
+      RenderSVGResourcePattern {pattern} [id="pattern6"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
+      RenderSVGResourcePattern {pattern} [id="pattern5"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
+        RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern6"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
     RenderPath {rect} at (0,0) size 101x101 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern1"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
     RenderPath {rect} at (0,99) size 101x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern2"]}] [data="M0.00,100.00 L100.00,100.00 L100.00,200.00 L0.00,200.00 Z"]
     RenderPath {rect} at (99,0) size 102x101 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern3"]}] [data="M100.00,0.00 L200.00,0.00 L200.00,100.00 L100.00,100.00 Z"]
     RenderPath {rect} at (99,99) size 102x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern4"]}] [data="M100.00,100.00 L200.00,100.00 L200.00,200.00 L100.00,200.00 Z"]
+    RenderPath {rect} at (0,199) size 101x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern5"]}] [data="M0.00,200.00 L100.00,200.00 L100.00,300.00 L0.00,300.00 Z"]
+    RenderPath {rect} at (99,199) size 102x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern6"]}] [data="M100.00,200.00 L200.00,200.00 L200.00,300.00 L100.00,300.00 Z"]
diff --git a/LayoutTests/svg/custom/recursive-pattern.svg b/LayoutTests/svg/custom/recursive-pattern.svg
index 95caaaa..5def762 100644
--- a/LayoutTests/svg/custom/recursive-pattern.svg
+++ b/LayoutTests/svg/custom/recursive-pattern.svg
@@ -10,6 +10,11 @@
 
     <pattern id="pattern3" x="0" y="0" width="100" height="100" xlink:href="#pattern1"/>
     <pattern id="pattern4" x="0" y="0" width="100" height="100" xlink:href="#pattern2"/>
+
+    <pattern id="pattern6" xlink:href="#pattern5"/>
+    <pattern id="pattern5" x="0" y="0" width="100" height="100">
+        <rect x="0" y="0" width="100" height="100" fill="url(#pattern6)"/>
+    </pattern>
 </defs>
 
 <!-- This should not crash -->
@@ -17,4 +22,6 @@
 <rect x="0" y="100" width="100" height="100" fill="url(#pattern2)" stroke="green"/>
 <rect x="100" y="0" width="100" height="100" fill="url(#pattern3)" stroke="green"/>
 <rect x="100" y="100" width="100" height="100" fill="url(#pattern4)" stroke="green"/>
+<rect x="0" y="200" width="100" height="100" fill="url(#pattern5)" stroke="green"/>
+<rect x="100" y="200" width="100" height="100" fill="url(#pattern6)" stroke="green"/>
 </svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 94b31b9..0a944c5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,22 @@
 2010-07-15  Nikolas Zimmermann  <nzimmermann at rim.com>
 
+        Reviewed by Eric Seidel.
+
+        SVG patterns and masks should not be able to reference themselves
+        https://bugs.webkit.org/show_bug.cgi?id=32171
+
+        Pattern still had an issue, when using constructs like:
+        <pattern id="pattern1" xlink:href="#pattern2"/>
+        <pattern id="pattern2"><rect fill="url(#pattern1)"/></pattern>
+
+        Extended test svg/custom/recursive-pattern.svg to cover this situation.
+
+        * rendering/RenderSVGResourcePattern.cpp:
+        (WebCore::RenderSVGResourcePattern::applyResource): Don't perform the cycle check against node()...
+        (WebCore::RenderSVGResourcePattern::createTileImage): .. but against the "patternContentElement" which respect the xlink:href chaining.
+
+2010-07-15  Nikolas Zimmermann  <nzimmermann at rim.com>
+
         Reviewed by Adam Barth.
 
         Pixel test failure in moving-shadow-on-path.html and moving-shadow-on-container.html
diff --git a/WebCore/rendering/RenderSVGResourcePattern.cpp b/WebCore/rendering/RenderSVGResourcePattern.cpp
index b783705..aeab15e 100644
--- a/WebCore/rendering/RenderSVGResourcePattern.cpp
+++ b/WebCore/rendering/RenderSVGResourcePattern.cpp
@@ -106,10 +106,6 @@ bool RenderSVGResourcePattern::applyResource(RenderObject* object, RenderStyle*
 
     PatternData* patternData = m_pattern.get(object);
     if (!patternData->pattern) {
-        // Early exit, if this resource contains a child which references ourselves.
-        if (containsCyclicReference(node()))
-            return false;
-
         // Create tile image
         OwnPtr<ImageBuffer> tileImage = createTileImage(patternData, patternElement, object);
         if (!tileImage)
@@ -253,6 +249,10 @@ PassOwnPtr<ImageBuffer> RenderSVGResourcePattern::createTileImage(PatternData* p
     if (!attributes.patternContentElement())
         return 0;
 
+    // Early exit, if this resource contains a child which references ourselves.
+    if (containsCyclicReference(attributes.patternContentElement()))
+        return 0;
+
     FloatRect objectBoundingBox = object->objectBoundingBox();    
     FloatRect patternBoundaries = calculatePatternBoundaries(attributes, objectBoundingBox, patternElement); 
     AffineTransform patternTransform = attributes.patternTransform();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list