Title: [110452] branches/chromium/1025
Revision
110452
Author
cev...@google.com
Date
2012-03-12 12:00:41 -0700 (Mon, 12 Mar 2012)

Log Message

Merge 108084
BUG=112411
Review URL: https://chromiumcodereview.appspot.com/9694004

Modified Paths

Added Paths

Diff

Modified: branches/chromium/1025/LayoutTests/platform/chromium/test_expectations.txt (110451 => 110452)


--- branches/chromium/1025/LayoutTests/platform/chromium/test_expectations.txt	2012-03-12 18:58:47 UTC (rev 110451)
+++ branches/chromium/1025/LayoutTests/platform/chromium/test_expectations.txt	2012-03-12 19:00:41 UTC (rev 110452)
@@ -903,6 +903,9 @@
 BUGCR23463 LINUX WIN : svg/W3C-SVG-1.1/struct-symbol-01-b.svg = IMAGE+TEXT
 BUGCR23463 LINUX WIN : svg/W3C-SVG-1.1/struct-use-01-t.svg = PASS IMAGE+TEXT IMAGE
 
+// Crashes due to debug assert until we fix issues with style elements in SVG
+BUGWK77764 DEBUG : svg/custom/use-referencing-style-crash.svg = CRASH
+
 // Merge 39744:39829 - regression
 BUGCR10284 MAC : svg/custom/path-bad-data.svg = FAIL
 

Copied: branches/chromium/1025/LayoutTests/svg/custom/use-referencing-style-crash-expected.txt (from rev 108084, trunk/LayoutTests/svg/custom/use-referencing-style-crash-expected.txt) (0 => 110452)


--- branches/chromium/1025/LayoutTests/svg/custom/use-referencing-style-crash-expected.txt	                        (rev 0)
+++ branches/chromium/1025/LayoutTests/svg/custom/use-referencing-style-crash-expected.txt	2012-03-12 19:00:41 UTC (rev 110452)
@@ -0,0 +1,6 @@
+This page contains the following errors:
+
+error on line 9 at column 12: Extra content at the end of the document
+Below is a rendering of the page up to the first error.
+
+

Copied: branches/chromium/1025/LayoutTests/svg/custom/use-referencing-style-crash.svg (from rev 108084, trunk/LayoutTests/svg/custom/use-referencing-style-crash.svg) (0 => 110452)


--- branches/chromium/1025/LayoutTests/svg/custom/use-referencing-style-crash.svg	                        (rev 0)
+++ branches/chromium/1025/LayoutTests/svg/custom/use-referencing-style-crash.svg	2012-03-12 19:00:41 UTC (rev 110452)
@@ -0,0 +1,9 @@
+<!-- This test is designed to have errors in the svg content. It should not crash. -->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+  <use xlink:href=""
+  <script>
+    if (window.layoutTestController)
+      layoutTestController.dumpAsText();
+  </script>
+  <symbol id="foo">
+    <style>

Modified: branches/chromium/1025/Source/WebCore/svg/SVGUseElement.cpp (110451 => 110452)


--- branches/chromium/1025/Source/WebCore/svg/SVGUseElement.cpp	2012-03-12 18:58:47 UTC (rev 110451)
+++ branches/chromium/1025/Source/WebCore/svg/SVGUseElement.cpp	2012-03-12 19:00:41 UTC (rev 110452)
@@ -345,14 +345,21 @@
         if (SVGElement* shadowRoot = m_targetElementInstance->shadowTreeElement())
             shadowRoot->setNeedsStyleRecalc();
     }
+    // Do not do style calculation during shadow tree construction because it may cause nodes to
+    // be attached before they should be. Style recalc will happen when the tree is constructed
+    // and explicitly attached.
+    if (m_updatesBlocked)
+        return false;
     return true;
 }
 
 void SVGUseElement::didRecalcStyle(StyleChange change)
 {
     // Assure that the shadow tree has not been marked for recreation, while we're building it.
-    if (m_updatesBlocked)
-        ASSERT(!m_needsShadowTreeRecreation);
+    if (m_updatesBlocked && m_needsShadowTreeRecreation) {
+        // We are about to recreate the tree while in the middle of recreating the tree.
+        return;
+    }
 
     RenderSVGShadowTreeRootContainer* shadowRoot = static_cast<RenderSVGShadowTreeRootContainer*>(renderer());
     if (!shadowRoot)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to