[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:37 UTC 2010


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

    2010-07-15  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Dirk Schulze.
    
            Cycle detection needs to include shadow tree
            https://bugs.webkit.org/show_bug.cgi?id=42360
    
            Search for cycles in shadow tree fragments as well. Extended the svg/custom/recursion-* tests. No more crashes in any of them.
    
            * rendering/RenderSVGResourceContainer.h:
            (WebCore::RenderSVGResourceContainer::containsCyclicReference):
            * rendering/RenderSVGShadowTreeRootContainer.cpp: Implemented here, not inline, so that clients don't need to include SVGShadowTreeElements.h
            (WebCore::RenderSVGShadowTreeRootContainer::rootElement): Expose helper function, that returns the shadow tree root element as Node*.
            * rendering/RenderSVGShadowTreeRootContainer.h:
    
    2010-07-15  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Dirk Schulze.
    
            Cycle detection needs to include shadow tree
            https://bugs.webkit.org/show_bug.cgi?id=42360
    
            Extend recursion tests to cover indirect recursion through <use> elements.
    
            * platform/mac/svg/custom/recursive-clippath-expected.checksum:
            * platform/mac/svg/custom/recursive-clippath-expected.png:
            * platform/mac/svg/custom/recursive-clippath-expected.txt:
            * platform/mac/svg/custom/recursive-mask-expected.txt:
            * 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-clippath.svg:
            * svg/custom/recursive-mask.svg:
            * svg/custom/recursive-pattern.svg:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63421 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 73d32e8..d8cf19e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -2,6 +2,26 @@
 
         Reviewed by Dirk Schulze.
 
+        Cycle detection needs to include shadow tree
+        https://bugs.webkit.org/show_bug.cgi?id=42360
+
+        Extend recursion tests to cover indirect recursion through <use> elements.
+
+        * platform/mac/svg/custom/recursive-clippath-expected.checksum:
+        * platform/mac/svg/custom/recursive-clippath-expected.png:
+        * platform/mac/svg/custom/recursive-clippath-expected.txt:
+        * platform/mac/svg/custom/recursive-mask-expected.txt:
+        * 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-clippath.svg:
+        * svg/custom/recursive-mask.svg:
+        * svg/custom/recursive-pattern.svg:
+
+2010-07-15  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Dirk Schulze.
+
         clipPath is missing cycle detection
         https://bugs.webkit.org/show_bug.cgi?id=42350
 
diff --git a/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.checksum b/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.checksum
index 215a511..1204038 100644
--- a/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.checksum
+++ b/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.checksum
@@ -1 +1 @@
-3aa16a092fe25416b039cd3ea92f1ead
\ No newline at end of file
+67516477d9f265bd907635bbade318cd
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.png b/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.png
index dbeabf5..ee3fbf8 100644
Binary files a/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.png and b/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.txt b/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.txt
index a4657e4..65f1133 100644
--- a/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.txt
@@ -1,11 +1,21 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 200x200
+  RenderSVGRoot {svg} at (0,0) size 200x300
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
       RenderSVGResourceClipper {clipPath} [id="clipPath_0"] [clipPathUnits=userSpaceOnUse]
         RenderPath {rect} at (0,0) size 100x100 [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
           [clipPath="clipPath_0"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
+      RenderPath {rect} at (0,100) size 100x100 [data="M0.00,100.00 L100.00,100.00 L100.00,200.00 L0.00,200.00 Z"]
+        [clipPath="clipPath_1"] RenderSVGResourceClipper {clipPath} at (0,100) size 100x100
+      RenderSVGResourceClipper {clipPath} [id="clipPath_1"] [clipPathUnits=userSpaceOnUse]
+        RenderSVGContainer {use} at (0,100) size 100x100
+          RenderSVGContainer {g} at (0,100) size 100x100
+            RenderPath {rect} at (0,100) size 100x100 [data="M0.00,100.00 L100.00,100.00 L100.00,200.00 L0.00,200.00 Z"]
+              [clipPath="clipPath_1"] RenderSVGResourceClipper {clipPath} at (0,100) size 100x100
     RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
     RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
       [clipPath="clipPath_0"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
+    RenderPath {rect} at (0,100) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,100.00 L200.00,100.00 L200.00,300.00 L0.00,300.00 Z"]
+    RenderPath {rect} at (0,100) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,100.00 L200.00,100.00 L200.00,300.00 L0.00,300.00 Z"]
+      [clipPath="clipPath_1"] RenderSVGResourceClipper {clipPath} at (0,100) size 100x100
diff --git a/LayoutTests/platform/mac/svg/custom/recursive-mask-expected.txt b/LayoutTests/platform/mac/svg/custom/recursive-mask-expected.txt
index 1dc7839..af3768a 100644
--- a/LayoutTests/platform/mac/svg/custom/recursive-mask-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/recursive-mask-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 150x50
+  RenderSVGRoot {svg} at (0,0) size 150x250
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
       RenderSVGResourceMasker {mask} [id="mask1"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
         RenderPath {rect} at (0,0) size 50x50 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
@@ -13,9 +13,18 @@ layer at (0,0) size 800x600
           [masker="mask1"] RenderSVGResourceMasker {mask} at (0,0) size 0x0
         RenderPath {rect} at (0,0) size 0x0 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M100.00,100.00 L150.00,100.00 L150.00,150.00 L100.00,150.00 Z"]
           [masker="mask2"] RenderSVGResourceMasker {mask} at (0,0) size 0x0
+      RenderPath {rect} at (0,200) size 50x50 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.00,200.00 L50.00,200.00 L50.00,250.00 L0.00,250.00 Z"]
+        [masker="mask4"] RenderSVGResourceMasker {mask} at (0,200) size 50x50
+      RenderSVGResourceMasker {mask} [id="mask4"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
+        RenderSVGContainer {use} at (0,200) size 50x50
+          RenderSVGContainer {g} at (0,200) size 50x50
+            RenderPath {rect} at (0,200) size 50x50 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.00,200.00 L50.00,200.00 L50.00,250.00 L0.00,250.00 Z"]
+              [masker="mask4"] RenderSVGResourceMasker {mask} at (0,200) size 50x50
     RenderPath {rect} at (0,0) size 50x50 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
       [masker="mask1"] RenderSVGResourceMasker {mask} at (0,0) size 50x50
     RenderPath {rect} at (100,0) size 50x50 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=SOLID] [color=#0000FF]}] [data="M100.00,0.00 L200.00,0.00 L200.00,100.00 L100.00,100.00 Z"]
       [masker="mask2"] RenderSVGResourceMasker {mask} at (100,0) size 50x50
     RenderPath {rect} at (0,0) size 0x0 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=SOLID] [color=#0000FF]}] [data="M100.00,100.00 L200.00,100.00 L200.00,200.00 L100.00,200.00 Z"]
       [masker="mask3"] RenderSVGResourceMasker {mask} at (0,0) size 0x0
+    RenderPath {rect} at (0,200) size 50x50 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,200.00 L100.00,200.00 L100.00,300.00 L0.00,300.00 Z"]
+      [masker="mask4"] RenderSVGResourceMasker {mask} at (0,200) size 50x50
diff --git a/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.checksum b/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.checksum
index ffb0f1f..4f12c44 100644
--- a/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.checksum
+++ b/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.checksum
@@ -1 +1 @@
-072328919c08c17ef70c206e80d348dd
\ No newline at end of file
+c313c4ce6fc9ac267436fef6a4d7f5d6
\ 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 3e6117a..efd9852 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 82b4208..766c877 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 201x301
+  RenderSVGRoot {svg} at (0,0) size 201x401
     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"]
@@ -12,9 +12,25 @@ layer at (0,0) size 800x600
       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 100x100 [fill={[type=PATTERN] [id="pattern7"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+      RenderSVGResourcePattern {pattern} [id="pattern7"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
+        RenderSVGContainer {use} at (0,0) size 100x100
+          RenderSVGContainer {g} at (0,0) size 100x100
+            RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern7"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+      RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern8"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+      RenderSVGContainer {use} at (0,0) size 100x100
+        RenderSVGContainer {g} at (0,0) size 100x100
+          RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern8"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+      RenderSVGResourcePattern {pattern} [id="pattern8"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
+        RenderSVGContainer {use} at (0,0) size 100x100
+          RenderSVGContainer {g} at (0,0) size 100x100
+            RenderSVGContainer {g} at (0,0) size 100x100
+              RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern8"]}] [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"]
+    RenderPath {rect} at (0,299) size 101x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern7"]}] [data="M0.00,300.00 L100.00,300.00 L100.00,400.00 L0.00,400.00 Z"]
+    RenderPath {rect} at (99,299) size 102x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern8"]}] [data="M100.00,300.00 L200.00,300.00 L200.00,400.00 L100.00,400.00 Z"]
diff --git a/LayoutTests/svg/custom/recursive-clippath.svg b/LayoutTests/svg/custom/recursive-clippath.svg
index c0741c9..b568921 100644
--- a/LayoutTests/svg/custom/recursive-clippath.svg
+++ b/LayoutTests/svg/custom/recursive-clippath.svg
@@ -3,6 +3,11 @@
     <clipPath id='clipPath_0'>
         <rect x='0' y='0' width='100' height='100' fill='none' clip-path='url(#clipPath_0)'/>
     </clipPath>
+
+    <rect x='0' y='100' width='100' height='100' id="rect" fill='none' clip-path='url(#clipPath_1)'/>
+    <clipPath id='clipPath_1'>
+        <use xlink:href="#rect"/>
+    </clipPath>
 </defs>
 
 <!--
@@ -15,4 +20,7 @@ Spec: clip-path: If the IRI reference is not valid (e.g it points to an object t
 
 <rect x='0' y='0' width='200' height='200' fill='red'/>
 <rect x='0' y='0' width='200' height='200' fill='green' clip-path='url(#clipPath_0)'/>
+
+<rect x='0' y='100' width='200' height='200' fill='red'/>
+<rect x='0' y='100' width='200' height='200' fill='green' clip-path='url(#clipPath_1)'/>
 </svg>
diff --git a/LayoutTests/svg/custom/recursive-mask.svg b/LayoutTests/svg/custom/recursive-mask.svg
index 89387f8..f3035b1 100644
--- a/LayoutTests/svg/custom/recursive-mask.svg
+++ b/LayoutTests/svg/custom/recursive-mask.svg
@@ -12,6 +12,11 @@
         <rect x="0" y="100" width="50" height="50" fill="white" mask="url(#mask1)"/>
         <rect x="100" y="100" width="50" height="50" fill="white" mask="url(#mask2)"/>
     </mask>
+
+    <rect id="rect" x="0" y="200" width="50" height="50" fill="white" mask="url(#mask4)"/>
+    <mask id="mask4">
+        <use xlink:href="#rect"/>
+    </mask>
 </defs>
 
 <!-- This should be masked, resulting in a 50x50 rect -->
@@ -23,4 +28,6 @@
 <!-- This should not render anything -->
 <rect x="100" y="100" width="100" height="100" fill="blue" mask="url(#mask3)" stroke="green"/>
 
+<!-- This should not render anything -->
+<rect x="0" y="200" width="100" height="100" fill="blue" mask="url(#mask4)" stroke="green"/>
 </svg>
diff --git a/LayoutTests/svg/custom/recursive-pattern.svg b/LayoutTests/svg/custom/recursive-pattern.svg
index 5def762..7ebd4e9 100644
--- a/LayoutTests/svg/custom/recursive-pattern.svg
+++ b/LayoutTests/svg/custom/recursive-pattern.svg
@@ -15,6 +15,17 @@
     <pattern id="pattern5" x="0" y="0" width="100" height="100">
         <rect x="0" y="0" width="100" height="100" fill="url(#pattern6)"/>
     </pattern>
+
+    <rect id="rect" x="0" y="0" width="100" height="100" fill="url(#pattern7)"/>
+    <pattern id="pattern7" x="0" y="0" width="100" height="100">
+        <use xlink:href="#rect"/>
+    </pattern>
+    
+	<rect id="rect2" x="0" y="0" width="100" height="100" fill="url(#pattern8)"/>
+	<use id="use" xlink:href="#rect2"/>
+    <pattern id="pattern8" x="0" y="0" width="100" height="100">
+        <use xlink:href="#use"/>
+    </pattern>
 </defs>
 
 <!-- This should not crash -->
@@ -24,4 +35,6 @@
 <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"/>
+<rect x="0" y="300" width="100" height="100" fill="url(#pattern7)" stroke="green"/>
+<rect x="100" y="300" width="100" height="100" fill="url(#pattern8)" stroke="green"/>
 </svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6c89de9..d9c09dc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,21 @@
 
         Reviewed by Dirk Schulze.
 
+        Cycle detection needs to include shadow tree
+        https://bugs.webkit.org/show_bug.cgi?id=42360
+
+        Search for cycles in shadow tree fragments as well. Extended the svg/custom/recursion-* tests. No more crashes in any of them.
+
+        * rendering/RenderSVGResourceContainer.h:
+        (WebCore::RenderSVGResourceContainer::containsCyclicReference):
+        * rendering/RenderSVGShadowTreeRootContainer.cpp: Implemented here, not inline, so that clients don't need to include SVGShadowTreeElements.h
+        (WebCore::RenderSVGShadowTreeRootContainer::rootElement): Expose helper function, that returns the shadow tree root element as Node*.
+        * rendering/RenderSVGShadowTreeRootContainer.h:
+
+2010-07-15  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Dirk Schulze.
+
         clipPath is missing cycle detection
         https://bugs.webkit.org/show_bug.cgi?id=42350
 
diff --git a/WebCore/rendering/RenderSVGResourceContainer.h b/WebCore/rendering/RenderSVGResourceContainer.h
index 58d2e05..5f1c828 100644
--- a/WebCore/rendering/RenderSVGResourceContainer.h
+++ b/WebCore/rendering/RenderSVGResourceContainer.h
@@ -26,6 +26,7 @@
 
 #include "SVGStyledTransformableElement.h"
 #include "RenderSVGResource.h"
+#include "RenderSVGShadowTreeRootContainer.h"
 
 namespace WebCore {
 
@@ -116,7 +117,17 @@ public:
             // Let the class inheriting from us decide whether the child element references ourselves.
             if (childElementReferencesResource(svgStyle, m_id))
                 return true;
-    
+
+            // Dive into shadow tree to check for cycles there.
+            if (node->hasTagName(SVGNames::useTag)) {
+                ASSERT(renderer->isSVGShadowTreeRootContainer());
+                if (Node* shadowRoot = static_cast<RenderSVGShadowTreeRootContainer*>(renderer)->rootElement()) {
+                    if (containsCyclicReference(shadowRoot))
+                        return true;
+                }
+
+            }
+
             if (node->hasChildNodes()) {
                 if (containsCyclicReference(node))
                     return true;
diff --git a/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp b/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
index 9d3d26f..888dd57 100644
--- a/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
+++ b/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
@@ -96,6 +96,11 @@ void RenderSVGShadowTreeRootContainer::styleDidChange(StyleDifference diff, cons
         shadowRootRenderer->setStyle(style());
 }
 
+Node* RenderSVGShadowTreeRootContainer::rootElement() const
+{
+    return m_shadowRoot.get();
+}
+
 }
 
 #endif
diff --git a/WebCore/rendering/RenderSVGShadowTreeRootContainer.h b/WebCore/rendering/RenderSVGShadowTreeRootContainer.h
index 81ae44b..bff2a87 100644
--- a/WebCore/rendering/RenderSVGShadowTreeRootContainer.h
+++ b/WebCore/rendering/RenderSVGShadowTreeRootContainer.h
@@ -39,6 +39,8 @@ public:
     void updateStyle(Node::StyleChange);
     virtual void updateFromElement();
 
+    Node* rootElement() const;
+
 private:
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list