Title: [112329] trunk/Source/WebCore
Revision
112329
Author
[email protected]
Date
2012-03-27 16:21:14 -0700 (Tue, 27 Mar 2012)

Log Message

Re-land r112277; reverting it doesn't seem to have fixed anything.

Unreviewed, build fix.

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::insertedIntoDocument):
(WebCore::SVGUseElement::svgAttributeChanged):
(WebCore::SVGUseElement::willRecalcStyle):
(WebCore::SVGUseElement::finishParsingChildren):
* xml/XMLErrors.cpp:
(WebCore::XMLErrors::insertErrorMessageBlock):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (112328 => 112329)


--- trunk/Source/WebCore/ChangeLog	2012-03-27 23:12:21 UTC (rev 112328)
+++ trunk/Source/WebCore/ChangeLog	2012-03-27 23:21:14 UTC (rev 112329)
@@ -1,3 +1,17 @@
+2012-03-27  Dirk Pranke  <[email protected]>
+
+        Re-land r112277; reverting it doesn't seem to have fixed anything.
+
+        Unreviewed, build fix.
+
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::insertedIntoDocument):
+        (WebCore::SVGUseElement::svgAttributeChanged):
+        (WebCore::SVGUseElement::willRecalcStyle):
+        (WebCore::SVGUseElement::finishParsingChildren):
+        * xml/XMLErrors.cpp:
+        (WebCore::XMLErrors::insertErrorMessageBlock):
+
 2012-03-27  Dana Jansens  <[email protected]>
 
         [chromium] Rename opaqueContentsRegion() to visibleContentOpaqueRegion()

Modified: trunk/Source/WebCore/svg/SVGUseElement.cpp (112328 => 112329)


--- trunk/Source/WebCore/svg/SVGUseElement.cpp	2012-03-27 23:12:21 UTC (rev 112328)
+++ trunk/Source/WebCore/svg/SVGUseElement.cpp	2012-03-27 23:21:14 UTC (rev 112329)
@@ -181,7 +181,8 @@
     SVGStyledTransformableElement::insertedIntoDocument();
     ASSERT(!m_targetElementInstance || !isWellFormedDocument(document()));
     ASSERT(!hasPendingResources() || !isWellFormedDocument(document()));
-    buildPendingResource();
+    if (!m_wasInsertedByParser)
+        buildPendingResource();
     SVGExternalResourcesRequired::insertedIntoDocument(this);
 }
 
@@ -252,7 +253,8 @@
             m_cachedDocument->removeClient(this);
             m_cachedDocument = 0;
         }
-        buildPendingResource();
+        if (!m_wasInsertedByParser)
+            buildPendingResource();
         return;
     }
 
@@ -270,7 +272,7 @@
 
 bool SVGUseElement::willRecalcStyle(StyleChange)
 {
-    if (m_needsShadowTreeRecreation && renderer() && needsStyleRecalc())
+    if (!m_wasInsertedByParser && m_needsShadowTreeRecreation && renderer() && needsStyleRecalc())
         buildPendingResource();
     return true;
 }
@@ -953,6 +955,10 @@
 {
     SVGStyledTransformableElement::finishParsingChildren();
     SVGExternalResourcesRequired::finishParsingChildren();
+    if (m_wasInsertedByParser) {
+        buildPendingResource();
+        m_wasInsertedByParser = false;
+    }
 }
 
 }

Modified: trunk/Source/WebCore/xml/XMLErrors.cpp (112328 => 112329)


--- trunk/Source/WebCore/xml/XMLErrors.cpp	2012-03-27 23:12:21 UTC (rev 112328)
+++ trunk/Source/WebCore/xml/XMLErrors.cpp	2012-03-27 23:21:14 UTC (rev 112329)
@@ -144,11 +144,10 @@
         body->parserAddChild(documentElement);
         m_document->parserAddChild(rootElement.get());
 
-        if (m_document->attached()) {
-            // rootElement shouldn't be attached right now, but in some cases might be.
-            // See https://bugs.webkit.org/show_bug.cgi?id=81985
+        if (m_document->attached())
+            // In general, rootElement shouldn't be attached right now, but it will be if there is a style element
+            // in the SVG content.
             rootElement->reattach();
-        }
 
         documentElement = body.get();
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to