<!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>[212682] branches/safari-603-branch</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/212682">212682</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2017-02-20 16:18:31 -0800 (Mon, 20 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Roll out <a href="http://trac.webkit.org/projects/webkit/changeset/212621">r212621</a> via <a href="http://trac.webkit.org/projects/webkit/changeset/212647">r212647</a>. rdar://problem/30563318</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari603branchLayoutTestsChangeLog">branches/safari-603-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari603branchSourceWebCoreChangeLog">branches/safari-603-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari603branchSourceWebCoredomContainerNodecpp">branches/safari-603-branch/Source/WebCore/dom/ContainerNode.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebCorehtmlparserHTMLConstructionSitecpp">branches/safari-603-branch/Source/WebCore/html/parser/HTMLConstructionSite.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebCorexmlXMLErrorscpp">branches/safari-603-branch/Source/WebCore/xml/XMLErrors.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebCorexmlparserXMLDocumentParsercpp">branches/safari-603-branch/Source/WebCore/xml/parser/XMLDocumentParser.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#branchessafari603branchLayoutTestsfastparseradoptionagencyunloadiframe3expectedtxt">branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-3-expected.txt</a></li>
<li><a href="#branchessafari603branchLayoutTestsfastparseradoptionagencyunloadiframe3html">branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-3.html</a></li>
<li><a href="#branchessafari603branchLayoutTestsfastparseradoptionagencyunloadiframe4expectedtxt">branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-4-expected.txt</a></li>
<li><a href="#branchessafari603branchLayoutTestsfastparseradoptionagencyunloadiframe4html">branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-4.html</a></li>
<li><a href="#branchessafari603branchLayoutTestsfastparserxmlerrorunloadiframeexpectedtxt">branches/safari-603-branch/LayoutTests/fast/parser/xml-error-unload-iframe-expected.txt</a></li>
<li><a href="#branchessafari603branchLayoutTestsfastparserxmlerrorunloadiframehtml">branches/safari-603-branch/LayoutTests/fast/parser/xml-error-unload-iframe.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari603branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/LayoutTests/ChangeLog (212681 => 212682)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/ChangeLog        2017-02-21 00:08:34 UTC (rev 212681)
+++ branches/safari-603-branch/LayoutTests/ChangeLog        2017-02-21 00:18:31 UTC (rev 212682)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> 2017-02-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Rollout r212647. rdar://problem/30563318
+
+2017-02-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r211750. rdar://problem/30383964
</span><span class="cx"> 
</span><span class="cx">     2017-02-06  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari603branchLayoutTestsfastparseradoptionagencyunloadiframe3expectedtxt"></a>
<div class="delfile"><h4>Deleted: branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-3-expected.txt (212681 => 212682)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-3-expected.txt        2017-02-21 00:08:34 UTC (rev 212681)
+++ branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-3-expected.txt        2017-02-21 00:18:31 UTC (rev 212682)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-
-PASS An element removed by the adoption agency algorithm must not be inserted if it had been inserted elsewhere 
-
</del></span></pre></div>
<a id="branchessafari603branchLayoutTestsfastparseradoptionagencyunloadiframe3html"></a>
<div class="delfile"><h4>Deleted: branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-3.html (212681 => 212682)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-3.html        2017-02-21 00:08:34 UTC (rev 212681)
+++ branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-3.html        2017-02-21 00:18:31 UTC (rev 212682)
</span><span class="lines">@@ -1,41 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
-&lt;script&gt;
-
-function runTest() {
-    const section = document.querySelector('section');
-    const container = document.querySelector('div');
-    const p = document.querySelector('p');
-    const iframe = document.createElement('iframe');
-    document.querySelector('b').appendChild(iframe);
-    /* div
-         + b
-           + p
-             + script
-             + iframe */
-    iframe.contentWindow.onunload = () =&gt; {
-        section.appendChild(p);
-        container.remove();
-        /* body
-           + p
-             + script
-             + iframe  */
-    }
-
-    window.onload = () =&gt; {
-        let test = async_test('An element removed by the adoption agency algorithm must not be inserted if it had been inserted elsewhere');
-        test.step(() =&gt; {
-            assert_not_equals(p.parentNode, container);
-            assert_equals(p.parentNode, section);
-        });
-        test.done();
-    }
-}
-
-&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;section&gt;&lt;div&gt;&lt;b&gt;&lt;p&gt;&lt;script&gt;runTest();&lt;/script&gt;&lt;/b&gt;&lt;/p&gt;&lt;/div&gt;&lt;/section&gt;
-&lt;/body&gt;
</del></span></pre></div>
<a id="branchessafari603branchLayoutTestsfastparseradoptionagencyunloadiframe4expectedtxt"></a>
<div class="delfile"><h4>Deleted: branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-4-expected.txt (212681 => 212682)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-4-expected.txt        2017-02-21 00:08:34 UTC (rev 212681)
+++ branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-4-expected.txt        2017-02-21 00:18:31 UTC (rev 212682)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-
-PASS An element removed by the adoption agency algorithm must not be inserted if it had been inserted elsewhere 
-
</del></span></pre></div>
<a id="branchessafari603branchLayoutTestsfastparseradoptionagencyunloadiframe4html"></a>
<div class="delfile"><h4>Deleted: branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-4.html (212681 => 212682)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-4.html        2017-02-21 00:08:34 UTC (rev 212681)
+++ branches/safari-603-branch/LayoutTests/fast/parser/adoption-agency-unload-iframe-4.html        2017-02-21 00:18:31 UTC (rev 212682)
</span><span class="lines">@@ -1,47 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;script&gt;
-
-let test = async_test('An element removed by the adoption agency algorithm must not be inserted if it had been inserted elsewhere');
-
-var p;
-test.step(() =&gt; {
-    const iframe = document.createElement('iframe');
-    document.body.appendChild(iframe);
-
-    let doc = iframe.contentDocument;
-    doc.write(`&lt;body&gt;&lt;a id=&quot;target&quot; href=&quot;#&quot;&gt;&lt;/a&gt;`);
-
-    const target = doc.querySelector('a');
-    target.onfocus = () =&gt; {
-        target.onfocus = null;
-
-        test.step(() =&gt; {
-            let container = doc.querySelector('div');
-            container.remove();
-            doc.body.appendChild(p);
-        });
-
-        setTimeout(() =&gt; {
-            test.step(() =&gt; {
-                assert_equals(p.parentNode, doc.body);
-            });
-            test.done();
-            iframe.remove();
-        }, 0);
-    }
-
-    doc.write(`&lt;div&gt;&lt;b&gt;&lt;p&gt;&lt;script&gt;
-        parent.p = document.querySelector('p');
-        document.write('&lt;link rel=&quot;stylesheet&quot; href=&quot;data:,a&quot;&gt;');
-        location.hash = 'target';
-    &lt;\/script&gt;&lt;/b&gt;&lt;/p&gt;&lt;/div&gt;&lt;/body&gt;`);
-});
-
-&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="branchessafari603branchLayoutTestsfastparserxmlerrorunloadiframeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: branches/safari-603-branch/LayoutTests/fast/parser/xml-error-unload-iframe-expected.txt (212681 => 212682)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/fast/parser/xml-error-unload-iframe-expected.txt        2017-02-21 00:08:34 UTC (rev 212681)
+++ branches/safari-603-branch/LayoutTests/fast/parser/xml-error-unload-iframe-expected.txt        2017-02-21 00:18:31 UTC (rev 212682)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-
-PASS An element removed by the adoption agency algorithm must not be inserted if it had been inserted elsewhere 
-
</del></span></pre></div>
<a id="branchessafari603branchLayoutTestsfastparserxmlerrorunloadiframehtml"></a>
<div class="delfile"><h4>Deleted: branches/safari-603-branch/LayoutTests/fast/parser/xml-error-unload-iframe.html (212681 => 212682)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/fast/parser/xml-error-unload-iframe.html        2017-02-21 00:08:34 UTC (rev 212681)
+++ branches/safari-603-branch/LayoutTests/fast/parser/xml-error-unload-iframe.html        2017-02-21 00:18:31 UTC (rev 212682)
</span><span class="lines">@@ -1,36 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;script&gt;
-
-let svgElement;
-function moveIframe(svgDoc) {
-    if (svgElement)
-        return;
-    svgElement = svgDoc.documentElement;
-    const iframe = document.createElement('iframe');
-    svgDoc.documentElement.appendChild(iframe);
-    iframe.contentWindow.onunload = () =&gt; {
-        document.body.appendChild(svgElement);
-    }
-}
-
-const content = `&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;script&gt;parent.moveIframe(document);&lt;\/script&gt;&lt;element a=&quot;1&quot; a=&quot;2&quot;/&gt;&lt;/svg&gt;`;
-const iframe = document.createElement('iframe');
-iframe.src = URL.createObjectURL(new Blob([content], {type: 'text/xml'}));
-document.documentElement.appendChild(iframe);
-
-window.onload = () =&gt; {
-    let test = async_test('An element removed by the adoption agency algorithm must not be inserted if it had been inserted elsewhere');
-    test.step(() =&gt; {
-        assert_equals(svgElement.parentNode, document.body);
-        svgElement.remove();
-    });
-    test.done();
-}
-
-&lt;/script&gt;
-&lt;/body&gt;
</del></span></pre></div>
<a id="branchessafari603branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (212681 => 212682)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/ChangeLog        2017-02-21 00:08:34 UTC (rev 212681)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog        2017-02-21 00:18:31 UTC (rev 212682)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> 2017-02-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Rollout r212647. rdar://problem/30563318
+
+2017-02-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r211750. rdar://problem/30383964
</span><span class="cx"> 
</span><span class="cx">     2017-02-06  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoredomContainerNodecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/dom/ContainerNode.cpp (212681 => 212682)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/dom/ContainerNode.cpp        2017-02-21 00:08:34 UTC (rev 212681)
+++ branches/safari-603-branch/Source/WebCore/dom/ContainerNode.cpp        2017-02-21 00:18:31 UTC (rev 212682)
</span><span class="lines">@@ -598,28 +598,24 @@
</span><span class="cx"> void ContainerNode::parserRemoveChild(Node&amp; oldChild)
</span><span class="cx"> {
</span><span class="cx">     disconnectSubframesIfNeeded(*this, DescendantsOnly);
</span><del>-    if (oldChild.parentNode() != this)
-        return;
</del><span class="cx"> 
</span><del>-    {
-        NoEventDispatchAssertion assertNoEventDispatch;
</del><ins>+    NoEventDispatchAssertion assertNoEventDispatch;
</ins><span class="cx"> 
</span><del>-        document().nodeChildrenWillBeRemoved(*this);
</del><ins>+    document().nodeChildrenWillBeRemoved(*this);
</ins><span class="cx"> 
</span><del>-        ASSERT(oldChild.parentNode() == this);
-        ASSERT(!oldChild.isDocumentFragment());
</del><ins>+    ASSERT(oldChild.parentNode() == this);
+    ASSERT(!oldChild.isDocumentFragment());
</ins><span class="cx"> 
</span><del>-        Node* prev = oldChild.previousSibling();
-        Node* next = oldChild.nextSibling();
</del><ins>+    Node* prev = oldChild.previousSibling();
+    Node* next = oldChild.nextSibling();
</ins><span class="cx"> 
</span><del>-        ChildListMutationScope(*this).willRemoveChild(oldChild);
-        oldChild.notifyMutationObserversNodeWillDetach();
</del><ins>+    ChildListMutationScope(*this).willRemoveChild(oldChild);
+    oldChild.notifyMutationObserversNodeWillDetach();
</ins><span class="cx"> 
</span><del>-        removeBetween(prev, next, oldChild);
</del><ins>+    removeBetween(prev, next, oldChild);
</ins><span class="cx"> 
</span><del>-        notifyChildRemoved(oldChild, prev, next, ChildChangeSourceParser);
-        document().notifyRemovePendingSheetIfNeeded();
-    }
</del><ins>+    notifyChildRemoved(oldChild, prev, next, ChildChangeSourceParser);
+    document().notifyRemovePendingSheetIfNeeded();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // this differs from other remove functions because it forcibly removes all the children,
</span><span class="lines">@@ -723,12 +719,11 @@
</span><span class="cx">     ASSERT(!newChild.isDocumentFragment());
</span><span class="cx">     ASSERT(!hasTagName(HTMLNames::templateTag));
</span><span class="cx"> 
</span><ins>+    if (&amp;document() != &amp;newChild.document())
+        document().adoptNode(newChild);
+
</ins><span class="cx">     {
</span><span class="cx">         NoEventDispatchAssertion assertNoEventDispatch;
</span><del>-
-        if (&amp;document() != &amp;newChild.document())
-            document().adoptNode(newChild);
-
</del><span class="cx">         appendChildCommon(newChild);
</span><span class="cx">         treeScope().adoptIfNeeded(newChild);
</span><span class="cx">     }
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCorehtmlparserHTMLConstructionSitecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/html/parser/HTMLConstructionSite.cpp (212681 => 212682)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/html/parser/HTMLConstructionSite.cpp        2017-02-21 00:08:34 UTC (rev 212681)
+++ branches/safari-603-branch/Source/WebCore/html/parser/HTMLConstructionSite.cpp        2017-02-21 00:18:31 UTC (rev 212682)
</span><span class="lines">@@ -133,9 +133,6 @@
</span><span class="cx">     if (auto* parent = task.child-&gt;parentNode())
</span><span class="cx">         parent-&gt;parserRemoveChild(*task.child);
</span><span class="cx"> 
</span><del>-    if (task.child-&gt;parentNode())
-        return;
-
</del><span class="cx">     task.parent-&gt;parserAppendChild(*task.child);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -143,9 +140,6 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(task.operation == HTMLConstructionSiteTask::InsertAlreadyParsedChild);
</span><span class="cx"> 
</span><del>-    if (task.child-&gt;parentNode())
-        return;
-
</del><span class="cx">     insert(task);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCorexmlXMLErrorscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/xml/XMLErrors.cpp (212681 => 212682)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/xml/XMLErrors.cpp        2017-02-21 00:08:34 UTC (rev 212681)
+++ branches/safari-603-branch/Source/WebCore/xml/XMLErrors.cpp        2017-02-21 00:18:31 UTC (rev 212682)
</span><span class="lines">@@ -140,9 +140,8 @@
</span><span class="cx">         rootElement-&gt;parserAppendChild(body);
</span><span class="cx"> 
</span><span class="cx">         m_document.parserRemoveChild(*documentElement);
</span><del>-        if (!documentElement-&gt;parentNode())
-            body-&gt;parserAppendChild(*documentElement);
</del><span class="cx"> 
</span><ins>+        body-&gt;parserAppendChild(*documentElement);
</ins><span class="cx">         m_document.parserAppendChild(rootElement);
</span><span class="cx"> 
</span><span class="cx">         documentElement = WTFMove(body);
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCorexmlparserXMLDocumentParsercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/xml/parser/XMLDocumentParser.cpp (212681 => 212682)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/xml/parser/XMLDocumentParser.cpp        2017-02-21 00:08:34 UTC (rev 212681)
+++ branches/safari-603-branch/Source/WebCore/xml/parser/XMLDocumentParser.cpp        2017-02-21 00:18:31 UTC (rev 212682)
</span><span class="lines">@@ -195,11 +195,9 @@
</span><span class="cx">     if (m_parserPaused)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (m_sawError) {
</del><ins>+    if (m_sawError)
</ins><span class="cx">         insertErrorMessageBlock();
</span><del>-        if (isDetached()) // Inserting an error message may have ran arbitrary scripts.
-            return;
-    } else {
</del><ins>+    else {
</ins><span class="cx">         updateLeafTextNode();
</span><span class="cx">         document()-&gt;styleScope().didChangeStyleSheetEnvironment();
</span><span class="cx">     }
</span><span class="lines">@@ -217,8 +215,6 @@
</span><span class="cx">     // makes sense to call any methods on DocumentParser once it's been stopped.
</span><span class="cx">     // However, FrameLoader::stop calls DocumentParser::finish unconditionally.
</span><span class="cx"> 
</span><del>-    Ref&lt;XMLDocumentParser&gt; protectedThis(*this);
-
</del><span class="cx">     if (m_parserPaused)
</span><span class="cx">         m_finishCalled = true;
</span><span class="cx">     else
</span></span></pre>
</div>
</div>

</body>
</html>