Title: [145655] branches/safari-536.30-branch

Diff

Modified: branches/safari-536.30-branch/LayoutTests/ChangeLog (145654 => 145655)


--- branches/safari-536.30-branch/LayoutTests/ChangeLog	2013-03-13 01:21:02 UTC (rev 145654)
+++ branches/safari-536.30-branch/LayoutTests/ChangeLog	2013-03-13 01:23:01 UTC (rev 145655)
@@ -1,5 +1,19 @@
 2013-03-12  Lucas Forschler  <[email protected]>
 
+        Merge r139457
+
+    2013-01-11  Florin Malita  <[email protected]>
+
+            [SVG] Suppress resource rebuilding for unattached and shadow elements
+            https://bugs.webkit.org/show_bug.cgi?id=106664
+
+            Reviewed by Dirk Schulze.
+
+            * svg/custom/use-rebuild-resources-crash-expected.txt: Added.
+            * svg/custom/use-rebuild-resources-crash.svg: Added.
+
+2013-03-12  Lucas Forschler  <[email protected]>
+
         Merge r138994
 
     2013-01-07  Justin Novosad  <[email protected]>

Copied: branches/safari-536.30-branch/LayoutTests/svg/custom/use-rebuild-resources-crash-expected.txt (from rev 139457, trunk/LayoutTests/svg/custom/use-rebuild-resources-crash-expected.txt) (0 => 145655)


--- branches/safari-536.30-branch/LayoutTests/svg/custom/use-rebuild-resources-crash-expected.txt	                        (rev 0)
+++ branches/safari-536.30-branch/LayoutTests/svg/custom/use-rebuild-resources-crash-expected.txt	2013-03-13 01:23:01 UTC (rev 145655)
@@ -0,0 +1,2 @@
+PASS: Did not crash.
+

Copied: branches/safari-536.30-branch/LayoutTests/svg/custom/use-rebuild-resources-crash.svg (from rev 139457, trunk/LayoutTests/svg/custom/use-rebuild-resources-crash.svg) (0 => 145655)


--- branches/safari-536.30-branch/LayoutTests/svg/custom/use-rebuild-resources-crash.svg	                        (rev 0)
+++ branches/safari-536.30-branch/LayoutTests/svg/custom/use-rebuild-resources-crash.svg	2013-03-13 01:23:01 UTC (rev 145655)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
+<svg id="svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
+  <!-- Test for https://bugs.webkit.org/show_bug.cgi?id=106664 -->
+  <defs>
+    <symbol id="s1">
+      <use/>
+      <rect id="r1"/>
+    </symbol>
+
+    <use id="u1" xlink:href=""
+
+    <style>
+      use { clip-path: url(#r1); }
+    </style>
+  </defs>
+
+  <text>PASS: Did not crash.</text>
+
+  <script>
+    function initCF() {
+      u1 = document.getElementById('u1');
+      clone = u1.cloneNode(false);
+      document.getElementById('svg').appendChild(clone);
+    }
+
+    if (window.testRunner)
+      testRunner.dumpAsText();
+
+    document.addEventListener("DOMContentLoaded", initCF, false);
+  </script>
+</svg>

Modified: branches/safari-536.30-branch/Source/WebCore/ChangeLog (145654 => 145655)


--- branches/safari-536.30-branch/Source/WebCore/ChangeLog	2013-03-13 01:21:02 UTC (rev 145654)
+++ branches/safari-536.30-branch/Source/WebCore/ChangeLog	2013-03-13 01:23:01 UTC (rev 145655)
@@ -1,5 +1,30 @@
 2013-03-12  Lucas Forschler  <[email protected]>
 
+        Merge r139457
+
+    2013-01-11  Florin Malita  <[email protected]>
+
+            [SVG] Suppress resource rebuilding for unattached and shadow elements
+            https://bugs.webkit.org/show_bug.cgi?id=106664
+
+            Reviewed by Dirk Schulze.
+
+            SVGStyledElement::buildPendingResourcesIfNeeded() can be called while cloning a subtree
+            (as nodes are inserted into the clone, while still detached) or when elements are inserted
+            into the shadow tree. Both of these cases are problematic for SVGUseElement and can trigger
+            indirect recursion in SVGUseElement::buildPendingResource.
+
+            Since shadow and !inDocument() nodes are of no interest to ID dependents (they cannot be
+            found by ID in the document), the patch short-circuits buildPendingResource() for these
+            cases.
+
+            Test: svg/custom/use-rebuild-resources-crash.svg
+
+            * svg/SVGStyledElement.cpp:
+            (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
+
+2013-03-12  Lucas Forschler  <[email protected]>
+
         Merge r138994
 
     2013-01-07  Justin Novosad  <[email protected]>

Modified: branches/safari-536.30-branch/Source/WebCore/svg/SVGStyledElement.cpp (145654 => 145655)


--- branches/safari-536.30-branch/Source/WebCore/svg/SVGStyledElement.cpp	2013-03-13 01:21:02 UTC (rev 145654)
+++ branches/safari-536.30-branch/Source/WebCore/svg/SVGStyledElement.cpp	2013-03-13 01:23:01 UTC (rev 145655)
@@ -368,7 +368,7 @@
 void SVGStyledElement::buildPendingResourcesIfNeeded()
 {
     Document* document = this->document();
-    if (!needsPendingResourceHandling() || !document)
+    if (!needsPendingResourceHandling() || !document || !inDocument() || isInShadowTree())
         return;
 
     SVGDocumentExtensions* extensions = document->accessSVGExtensions();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to