<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[161140] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/161140">161140</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2013-12-30 06:04:44 -0800 (Mon, 30 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>XML document builder should create render tree asynchronously
https://bugs.webkit.org/show_bug.cgi?id=126285

Source/WebCore: 

Reviewed by Andreas Kling.
        
Stop creating renderers explicitly. 
Fix SVG &lt;use&gt; element to not rely on parse time render tree construction.

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::svgAttributeChanged):
        
    Remove renderer check, we may not have created the render tree yet.

(WebCore::SVGUseElement::willAttachRenderers):
        
    Switch to willAttachRenderers from willRecalcStyle. The latter is only called as long as style
    recalc doesn't start creating new renderers.

(WebCore::SVGUseElement::invalidateShadowTree):
        
    Remove renderer check, we may not have created the render tree yet. 
    Invalidate with ReconstructRenderTree so willAttachRenderers will always get called.

* svg/SVGUseElement.h:
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::exitText):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):
(WebCore::XMLDocumentParser::cdataBlock):
        
    Remove explicit call to attachRenderTree. The render tree will be created lazily.

LayoutTests: 

Reviewed by Andreas Kling.

* platform/mac/fast/table/dynamic-caption-add-before-child-expected.png:
* platform/mac/fast/table/dynamic-caption-add-before-child-expected.txt:
        
    This is progression. Captions are now correctly in document order.

* svg/custom/object-no-size-attributes-expected.txt:
        
    Unnecessary text renderer disappears.

* svg/custom/resource-invalidation-crash-expected.txt:
        
    Progression, the dump has the correct fill.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacfasttabledynamiccaptionaddbeforechildexpectedpng">trunk/LayoutTests/platform/mac/fast/table/dynamic-caption-add-before-child-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacfasttabledynamiccaptionaddbeforechildexpectedtxt">trunk/LayoutTests/platform/mac/fast/table/dynamic-caption-add-before-child-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomobjectnosizeattributesexpectedtxt">trunk/LayoutTests/svg/custom/object-no-size-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomresourceinvalidationcrashexpectedtxt">trunk/LayoutTests/svg/custom/resource-invalidation-crash-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoresvgSVGUseElementcpp">trunk/Source/WebCore/svg/SVGUseElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGUseElementh">trunk/Source/WebCore/svg/SVGUseElement.h</a></li>
<li><a href="#trunkSourceWebCorexmlparserXMLDocumentParsercpp">trunk/Source/WebCore/xml/parser/XMLDocumentParser.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlparserXMLDocumentParserLibxml2cpp">trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (161139 => 161140)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2013-12-30 10:26:00 UTC (rev 161139)
+++ trunk/LayoutTests/ChangeLog        2013-12-30 14:04:44 UTC (rev 161140)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2013-12-30  Antti Koivisto  &lt;antti@apple.com&gt;
+
+        XML document builder should create render tree asynchronously
+        https://bugs.webkit.org/show_bug.cgi?id=126285
+
+        Reviewed by Andreas Kling.
+
+        * platform/mac/fast/table/dynamic-caption-add-before-child-expected.png:
+        * platform/mac/fast/table/dynamic-caption-add-before-child-expected.txt:
+        
+            This is progression. Captions are now correctly in document order.
+
+        * svg/custom/object-no-size-attributes-expected.txt:
+        
+            Unnecessary text renderer disappears.
+
+        * svg/custom/resource-invalidation-crash-expected.txt:
+        
+            Progression, the dump has the correct fill.
+
</ins><span class="cx"> 2013-12-29  Joone Hur  &lt;joone.hur@intel.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reverted r156742. The same fix was reverted from Blink due to heap-use-after-free on ClusterFuzz.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfasttabledynamiccaptionaddbeforechildexpectedpng"></a>
<div class="binary"><h4>Modified: trunk/LayoutTests/platform/mac/fast/table/dynamic-caption-add-before-child-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfasttabledynamiccaptionaddbeforechildexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/fast/table/dynamic-caption-add-before-child-expected.txt (161139 => 161140)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/table/dynamic-caption-add-before-child-expected.txt        2013-12-30 10:26:00 UTC (rev 161139)
+++ trunk/LayoutTests/platform/mac/fast/table/dynamic-caption-add-before-child-expected.txt        2013-12-30 14:04:44 UTC (rev 161140)
</span><span class="lines">@@ -4,28 +4,28 @@
</span><span class="cx">   RenderBlock {html} at (0,0) size 800x232
</span><span class="cx">     RenderBody {body} at (8,8) size 784x216
</span><span class="cx">       RenderTable {table} at (0,0) size 81x216
</span><del>-        RenderBlock {caption} at (0,144) size 81x72
</del><ins>+        RenderBlock {caption} at (0,0) size 81x72
</ins><span class="cx">           RenderText {#text} at (19,0) size 81x72
</span><span class="cx">             text run at (19,0) width 43: &quot;PASS:&quot;
</span><span class="cx">             text run at (0,18) width 81: &quot;Dynamically&quot;
</span><span class="cx">             text run at (21,36) width 39: &quot;added&quot;
</span><span class="cx">             text run at (17,54) width 47: &quot;caption&quot;
</span><del>-        RenderBlock {caption} at (0,0) size 81x36
</del><ins>+        RenderBlock {caption} at (0,72) size 81x36
</ins><span class="cx">           RenderText {#text} at (2,0) size 77x36
</span><span class="cx">             text run at (2,0) width 77: &quot;PASS: Text&quot;
</span><span class="cx">             text run at (3,18) width 75: &quot;in caption 1&quot;
</span><del>-layer at (8,44) size 81x36
-  RenderBlock {caption} at (0,36) size 81x36
</del><ins>+layer at (8,116) size 81x36
+  RenderBlock {caption} at (0,108) size 81x36
</ins><span class="cx">     RenderText {#text} at (2,0) size 77x36
</span><span class="cx">       text run at (2,0) width 77: &quot;PASS: Text&quot;
</span><span class="cx">       text run at (3,18) width 75: &quot;in caption 2&quot;
</span><del>-layer at (8,80) size 81x36
-  RenderBlock {caption} at (0,72) size 81x36
</del><ins>+layer at (8,152) size 81x36
+  RenderBlock {caption} at (0,144) size 81x36
</ins><span class="cx">     RenderText {#text} at (2,0) size 77x36
</span><span class="cx">       text run at (2,0) width 77: &quot;PASS: Text&quot;
</span><span class="cx">       text run at (3,18) width 75: &quot;in caption 3&quot;
</span><del>-layer at (8,116) size 81x36
-  RenderBlock {caption} at (0,108) size 81x36
</del><ins>+layer at (8,188) size 81x36
+  RenderBlock {caption} at (0,180) size 81x36
</ins><span class="cx">     RenderText {#text} at (2,0) size 77x36
</span><span class="cx">       text run at (2,0) width 77: &quot;PASS: Text&quot;
</span><span class="cx">       text run at (3,18) width 75: &quot;in caption 4&quot;
</span></span></pre></div>
<a id="trunkLayoutTestssvgcustomobjectnosizeattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/custom/object-no-size-attributes-expected.txt (161139 => 161140)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/object-no-size-attributes-expected.txt        2013-12-30 10:26:00 UTC (rev 161139)
+++ trunk/LayoutTests/svg/custom/object-no-size-attributes-expected.txt        2013-12-30 14:04:44 UTC (rev 161140)
</span><span class="lines">@@ -10,4 +10,3 @@
</span><span class="cx">           RenderSVGRoot {svg} at (0,0) size 100x100
</span><span class="cx">             RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
</span><span class="cx">       RenderText {#text} at (0,0) size 0x0
</span><del>-      RenderText {#text} at (0,0) size 0x0
</del></span></pre></div>
<a id="trunkLayoutTestssvgcustomresourceinvalidationcrashexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/custom/resource-invalidation-crash-expected.txt (161139 => 161140)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/resource-invalidation-crash-expected.txt        2013-12-30 10:26:00 UTC (rev 161139)
+++ trunk/LayoutTests/svg/custom/resource-invalidation-crash-expected.txt        2013-12-30 14:04:44 UTC (rev 161140)
</span><span class="lines">@@ -8,6 +8,6 @@
</span><span class="cx">         RenderSVGRect {rect} at (0,0) size 0x0 [fill={[type=PATTERN] [id=&quot;a&quot;]}] [x=0.00] [y=0.00] [width=0.00] [height=0.00]
</span><span class="cx">       RenderSVGResourcePattern {pattern} [id=&quot;a&quot;] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
</span><span class="cx">       RenderSVGResourcePattern {pattern} [id=&quot;b&quot;] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
</span><del>-        RenderSVGRect {rect} at (0,0) size 0x0 [fill={[type=SOLID] [color=#000000]}] [x=0.00] [y=0.00] [width=0.00] [height=0.00]
</del><ins>+        RenderSVGRect {rect} at (0,0) size 0x0 [fill={[type=PATTERN] [id=&quot;a&quot;]}] [x=0.00] [y=0.00] [width=0.00] [height=0.00]
</ins><span class="cx">       RenderSVGResourcePattern {pattern} [id=&quot;a&quot;] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse]
</span><span class="cx">       RenderSVGRect {rect} at (0,0) size 0x0 [fill={[type=PATTERN] [id=&quot;a&quot;]}] [x=0.00] [y=0.00] [width=0.00] [height=0.00]
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161139 => 161140)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-30 10:26:00 UTC (rev 161139)
+++ trunk/Source/WebCore/ChangeLog        2013-12-30 14:04:44 UTC (rev 161140)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2013-12-30  Antti Koivisto  &lt;antti@apple.com&gt;
+
+        XML document builder should create render tree asynchronously
+        https://bugs.webkit.org/show_bug.cgi?id=126285
+
+        Reviewed by Andreas Kling.
+        
+        Stop creating renderers explicitly. 
+        Fix SVG &lt;use&gt; element to not rely on parse time render tree construction.
+
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::svgAttributeChanged):
+        
+            Remove renderer check, we may not have created the render tree yet.
+
+        (WebCore::SVGUseElement::willAttachRenderers):
+        
+            Switch to willAttachRenderers from willRecalcStyle. The latter is only called as long as style
+            recalc doesn't start creating new renderers.
+
+        (WebCore::SVGUseElement::invalidateShadowTree):
+        
+            Remove renderer check, we may not have created the render tree yet. 
+            Invalidate with ReconstructRenderTree so willAttachRenderers will always get called.
+
+        * svg/SVGUseElement.h:
+        * xml/parser/XMLDocumentParser.cpp:
+        (WebCore::XMLDocumentParser::exitText):
+        * xml/parser/XMLDocumentParserLibxml2.cpp:
+        (WebCore::XMLDocumentParser::startElementNs):
+        (WebCore::XMLDocumentParser::cdataBlock):
+        
+            Remove explicit call to attachRenderTree. The render tree will be created lazily.
+
</ins><span class="cx"> 2013-12-29  Joone Hur  &lt;joone.hur@intel.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reverted r156742. The same fix was reverted from Blink due to heap-use-after-free on ClusterFuzz.
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGUseElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGUseElement.cpp (161139 => 161140)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGUseElement.cpp        2013-12-30 10:26:00 UTC (rev 161139)
+++ trunk/Source/WebCore/svg/SVGUseElement.cpp        2013-12-30 14:04:44 UTC (rev 161140)
</span><span class="lines">@@ -257,9 +257,6 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!renderer)
-        return;
-
</del><span class="cx">     if (SVGLangSpace::isKnownAttribute(attrName)
</span><span class="cx">         || SVGExternalResourcesRequired::isKnownAttribute(attrName)) {
</span><span class="cx">         invalidateShadowTree();
</span><span class="lines">@@ -269,11 +266,10 @@
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGUseElement::willRecalcStyle(Style::Change)
</del><ins>+void SVGUseElement::willAttachRenderers()
</ins><span class="cx"> {
</span><del>-    if (!m_wasInsertedByParser &amp;&amp; m_needsShadowTreeRecreation &amp;&amp; renderer() &amp;&amp; needsStyleRecalc())
</del><ins>+    if (m_needsShadowTreeRecreation)
</ins><span class="cx">         buildPendingResource();
</span><del>-    return true;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #ifdef DUMP_INSTANCE_TREE
</span><span class="lines">@@ -889,10 +885,10 @@
</span><span class="cx"> 
</span><span class="cx"> void SVGUseElement::invalidateShadowTree()
</span><span class="cx"> {
</span><del>-    if (!renderer() || m_needsShadowTreeRecreation)
</del><ins>+    if (m_needsShadowTreeRecreation)
</ins><span class="cx">         return;
</span><span class="cx">     m_needsShadowTreeRecreation = true;
</span><del>-    setNeedsStyleRecalc();
</del><ins>+    setNeedsStyleRecalc(ReconstructRenderTree);
</ins><span class="cx">     invalidateDependentShadowTrees();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGUseElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGUseElement.h (161139 => 161140)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGUseElement.h        2013-12-30 10:26:00 UTC (rev 161139)
+++ trunk/Source/WebCore/svg/SVGUseElement.h        2013-12-30 14:04:44 UTC (rev 161140)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">     virtual void parseAttribute(const QualifiedName&amp;, const AtomicString&amp;) OVERRIDE;
</span><span class="cx">     virtual void svgAttributeChanged(const QualifiedName&amp;);
</span><span class="cx"> 
</span><del>-    virtual bool willRecalcStyle(Style::Change);
</del><ins>+    virtual void willAttachRenderers() OVERRIDE;
</ins><span class="cx"> 
</span><span class="cx">     virtual RenderElement* createRenderer(PassRef&lt;RenderStyle&gt;) OVERRIDE;
</span><span class="cx">     virtual void toClipPath(Path&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorexmlparserXMLDocumentParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/parser/XMLDocumentParser.cpp (161139 => 161140)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/parser/XMLDocumentParser.cpp        2013-12-30 10:26:00 UTC (rev 161139)
+++ trunk/Source/WebCore/xml/parser/XMLDocumentParser.cpp        2013-12-30 14:04:44 UTC (rev 161140)
</span><span class="lines">@@ -41,8 +41,6 @@
</span><span class="cx"> #include &quot;HTMLStyleElement.h&quot;
</span><span class="cx"> #include &quot;ImageLoader.h&quot;
</span><span class="cx"> #include &quot;ProcessingInstruction.h&quot;
</span><del>-#include &quot;RenderElement.h&quot;
-#include &quot;RenderText.h&quot;
</del><span class="cx"> #include &quot;ResourceError.h&quot;
</span><span class="cx"> #include &quot;ResourceRequest.h&quot;
</span><span class="cx"> #include &quot;ResourceResponse.h&quot;
</span><span class="lines">@@ -168,9 +166,6 @@
</span><span class="cx">     Vector&lt;xmlChar&gt; empty;
</span><span class="cx">     m_bufferedText.swap(empty);
</span><span class="cx"> 
</span><del>-    if (m_view &amp;&amp; m_leafTextNode-&gt;parentNode() &amp;&amp; m_leafTextNode-&gt;parentNode()-&gt;renderer() &amp;&amp; !m_leafTextNode-&gt;renderer())
-        Style::attachTextRenderer(*m_leafTextNode);
-
</del><span class="cx">     m_leafTextNode = 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorexmlparserXMLDocumentParserLibxml2cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp (161139 => 161140)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp        2013-12-30 10:26:00 UTC (rev 161139)
+++ trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp        2013-12-30 14:04:44 UTC (rev 161140)
</span><span class="lines">@@ -47,7 +47,6 @@
</span><span class="cx"> #include &quot;HTMLTemplateElement.h&quot;
</span><span class="cx"> #include &quot;Page.h&quot;
</span><span class="cx"> #include &quot;ProcessingInstruction.h&quot;
</span><del>-#include &quot;RenderElement.h&quot;
</del><span class="cx"> #include &quot;ResourceError.h&quot;
</span><span class="cx"> #include &quot;ResourceRequest.h&quot;
</span><span class="cx"> #include &quot;ResourceResponse.h&quot;
</span><span class="lines">@@ -845,7 +844,6 @@
</span><span class="cx">     if (!m_currentNode) // Synchronous DOM events may have removed the current node.
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    const ContainerNode* currentNode = m_currentNode;
</del><span class="cx"> #if ENABLE(TEMPLATE_ELEMENT)
</span><span class="cx">     if (newElement-&gt;hasTagName(HTMLNames::templateTag))
</span><span class="cx">         pushCurrentNode(toHTMLTemplateElement(newElement.get())-&gt;content());
</span><span class="lines">@@ -855,9 +853,6 @@
</span><span class="cx">     pushCurrentNode(newElement.get());
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (m_view &amp;&amp; currentNode-&gt;renderer() &amp;&amp; !newElement-&gt;renderer())
-        Style::attachRenderTree(*newElement);
-
</del><span class="cx">     if (newElement-&gt;hasTagName(HTMLNames::htmlTag))
</span><span class="cx">         toHTMLHtmlElement(newElement.get())-&gt;insertedByParser();
</span><span class="cx"> 
</span><span class="lines">@@ -1030,9 +1025,7 @@
</span><span class="cx">     exitText();
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;CDATASection&gt; newNode = CDATASection::create(m_currentNode-&gt;document(), toString(s, len));
</span><del>-    m_currentNode-&gt;parserAppendChild(newNode.get());
-    if (m_view)
-        Style::attachTextRenderer(*newNode);
</del><ins>+    m_currentNode-&gt;parserAppendChild(newNode.release());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void XMLDocumentParser::comment(const xmlChar* s)
</span><span class="lines">@@ -1048,7 +1041,7 @@
</span><span class="cx">     exitText();
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Comment&gt; newNode = Comment::create(m_currentNode-&gt;document(), toString(s));
</span><del>-    m_currentNode-&gt;parserAppendChild(newNode.get());
</del><ins>+    m_currentNode-&gt;parserAppendChild(newNode.release());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> enum StandaloneInfo {
</span></span></pre>
</div>
</div>

</body>
</html>