<!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>[206266] 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/206266">206266</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-09-22 11:47:34 -0700 (Thu, 22 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix serialization of HTML void elements when they have children
https://bugs.webkit.org/show_bug.cgi?id=162418

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/syntax/serializing-html-fragments/serializing-expected.txt:

Source/WebCore:

Fix serialization of HTML void elements when they have children.

Void elements (such as &lt;hr&gt;) cannot have a closing tag. When
encountering them, we would properly not serialize the void
element's children (if it had any). However, we would incorrectly
append an end tag (because the element technically has children).

Relevant specification:
- https://html.spec.whatwg.org/#html-fragment-serialisation-algorithm

In particular, this part:
&quot;&quot;
If current node is an area, base, basefont, bgsound, br, col, embed,
frame, hr, img, input, keygen, link, meta, param, source, track or wbr
element, then continue on to the next child node at this point.
&quot;&quot;

Firefox matches the specification.

No new tests, rebaselined existing test.

* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlsyntaxserializinghtmlfragmentsserializingexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/serializing-html-fragments/serializing-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreeditingMarkupAccumulatorcpp">trunk/Source/WebCore/editing/MarkupAccumulator.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (206265 => 206266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-09-22 18:43:40 UTC (rev 206265)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-09-22 18:47:34 UTC (rev 206266)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-09-22  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Fix serialization of HTML void elements when they have children
+        https://bugs.webkit.org/show_bug.cgi?id=162418
+
+        Reviewed by Darin Adler.
+
+        Rebaseline W3C test now that more checks are passing.
+
+        * web-platform-tests/html/syntax/serializing-html-fragments/serializing-expected.txt:
+
</ins><span class="cx"> 2016-09-22  Youenn Fablet  &lt;youenn@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Sync web-platform-tests up to revision 3801ab5
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlsyntaxserializinghtmlfragmentsserializingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/serializing-html-fragments/serializing-expected.txt (206265 => 206266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/serializing-html-fragments/serializing-expected.txt        2016-09-22 18:43:40 UTC (rev 206265)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/serializing-html-fragments/serializing-expected.txt        2016-09-22 18:47:34 UTC (rev 206266)
</span><span class="lines">@@ -108,137 +108,137 @@
</span><span class="cx"> PASS innerHTML Void context node source 
</span><span class="cx"> PASS innerHTML Void context node track 
</span><span class="cx"> PASS innerHTML Void context node wbr 
</span><del>-FAIL innerHTML void as first child with following siblings area assert_equals: expected &quot;&lt;area&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;area&gt;&lt;/area&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings base assert_equals: expected &quot;&lt;base&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;base&gt;&lt;/base&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings basefont assert_equals: expected &quot;&lt;basefont&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;basefont&gt;&lt;/basefont&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings bgsound assert_equals: expected &quot;&lt;bgsound&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;bgsound&gt;&lt;/bgsound&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings br assert_equals: expected &quot;&lt;br&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;br&gt;&lt;/br&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings col assert_equals: expected &quot;&lt;col&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;col&gt;&lt;/col&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings embed assert_equals: expected &quot;&lt;embed&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;embed&gt;&lt;/embed&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings frame assert_equals: expected &quot;&lt;frame&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;frame&gt;&lt;/frame&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings hr assert_equals: expected &quot;&lt;hr&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;hr&gt;&lt;/hr&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings img assert_equals: expected &quot;&lt;img&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;img&gt;&lt;/img&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings input assert_equals: expected &quot;&lt;input&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;input&gt;&lt;/input&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings keygen assert_equals: expected &quot;&lt;keygen&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;keygen&gt;&lt;/keygen&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings link assert_equals: expected &quot;&lt;link&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;link&gt;&lt;/link&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
</del><ins>+PASS innerHTML void as first child with following siblings area 
+PASS innerHTML void as first child with following siblings base 
+PASS innerHTML void as first child with following siblings basefont 
+PASS innerHTML void as first child with following siblings bgsound 
+PASS innerHTML void as first child with following siblings br 
+PASS innerHTML void as first child with following siblings col 
+PASS innerHTML void as first child with following siblings embed 
+PASS innerHTML void as first child with following siblings frame 
+PASS innerHTML void as first child with following siblings hr 
+PASS innerHTML void as first child with following siblings img 
+PASS innerHTML void as first child with following siblings input 
+PASS innerHTML void as first child with following siblings keygen 
+PASS innerHTML void as first child with following siblings link 
</ins><span class="cx"> FAIL innerHTML void as first child with following siblings menuitem assert_equals: expected &quot;&lt;menuitem&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;menuitem&gt;&lt;a&gt;&lt;!--abc--&gt;&lt;/a&gt;&lt;b&gt;&lt;c&gt;abc&lt;/c&gt;&lt;/b&gt;&lt;/menuitem&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
</span><del>-FAIL innerHTML void as first child with following siblings meta assert_equals: expected &quot;&lt;meta&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;meta&gt;&lt;/meta&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings param assert_equals: expected &quot;&lt;param&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;param&gt;&lt;/param&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings source assert_equals: expected &quot;&lt;source&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;source&gt;&lt;/source&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings track assert_equals: expected &quot;&lt;track&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;track&gt;&lt;/track&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as first child with following siblings wbr assert_equals: expected &quot;&lt;wbr&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;wbr&gt;&lt;/wbr&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings area assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;area&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;area&gt;&lt;/area&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings base assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;base&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;base&gt;&lt;/base&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings basefont assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;basefont&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;basefont&gt;&lt;/basefont&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings bgsound assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;bgsound&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;bgsound&gt;&lt;/bgsound&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings br assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;br&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;br&gt;&lt;/br&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings col assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;col&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;col&gt;&lt;/col&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings embed assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;embed&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;embed&gt;&lt;/embed&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings frame assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;frame&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;frame&gt;&lt;/frame&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings hr assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;hr&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;hr&gt;&lt;/hr&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings img assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;img&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;img&gt;&lt;/img&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings input assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;input&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;input&gt;&lt;/input&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings keygen assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;keygen&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;keygen&gt;&lt;/keygen&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings link assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;link&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;link&gt;&lt;/link&gt;&lt;b&gt;&lt;/b&gt;&quot;
</del><ins>+PASS innerHTML void as first child with following siblings meta 
+PASS innerHTML void as first child with following siblings param 
+PASS innerHTML void as first child with following siblings source 
+PASS innerHTML void as first child with following siblings track 
+PASS innerHTML void as first child with following siblings wbr 
+PASS innerHTML void as second child with following siblings area 
+PASS innerHTML void as second child with following siblings base 
+PASS innerHTML void as second child with following siblings basefont 
+PASS innerHTML void as second child with following siblings bgsound 
+PASS innerHTML void as second child with following siblings br 
+PASS innerHTML void as second child with following siblings col 
+PASS innerHTML void as second child with following siblings embed 
+PASS innerHTML void as second child with following siblings frame 
+PASS innerHTML void as second child with following siblings hr 
+PASS innerHTML void as second child with following siblings img 
+PASS innerHTML void as second child with following siblings input 
+PASS innerHTML void as second child with following siblings keygen 
+PASS innerHTML void as second child with following siblings link 
</ins><span class="cx"> FAIL innerHTML void as second child with following siblings menuitem assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;menuitem&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;menuitem&gt;&lt;a&gt;&lt;!--abc--&gt;&lt;/a&gt;&lt;b&gt;&lt;c&gt;abc&lt;/c&gt;&lt;/b&gt;&lt;/menuitem&gt;&lt;b&gt;&lt;/b&gt;&quot;
</span><del>-FAIL innerHTML void as second child with following siblings meta assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;meta&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;meta&gt;&lt;/meta&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings param assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;param&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;param&gt;&lt;/param&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings source assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;source&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;source&gt;&lt;/source&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings track assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;track&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;track&gt;&lt;/track&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as second child with following siblings wbr assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;wbr&gt;&lt;b&gt;&lt;/b&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;b&gt;&lt;/b&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings area assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;area&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;area&gt;&lt;/area&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings base assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;base&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;base&gt;&lt;/base&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings basefont assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;basefont&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;basefont&gt;&lt;/basefont&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings bgsound assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;bgsound&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;bgsound&gt;&lt;/bgsound&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings br assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;br&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;br&gt;&lt;/br&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings col assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;col&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;col&gt;&lt;/col&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings embed assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;embed&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;embed&gt;&lt;/embed&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings frame assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;frame&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;frame&gt;&lt;/frame&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings hr assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;hr&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;hr&gt;&lt;/hr&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings img assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;img&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;img&gt;&lt;/img&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings input assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;input&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;input&gt;&lt;/input&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings keygen assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;keygen&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;keygen&gt;&lt;/keygen&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings link assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;link&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;link&gt;&lt;/link&gt;&quot;
</del><ins>+PASS innerHTML void as second child with following siblings meta 
+PASS innerHTML void as second child with following siblings param 
+PASS innerHTML void as second child with following siblings source 
+PASS innerHTML void as second child with following siblings track 
+PASS innerHTML void as second child with following siblings wbr 
+PASS innerHTML void as last child with preceding siblings area 
+PASS innerHTML void as last child with preceding siblings base 
+PASS innerHTML void as last child with preceding siblings basefont 
+PASS innerHTML void as last child with preceding siblings bgsound 
+PASS innerHTML void as last child with preceding siblings br 
+PASS innerHTML void as last child with preceding siblings col 
+PASS innerHTML void as last child with preceding siblings embed 
+PASS innerHTML void as last child with preceding siblings frame 
+PASS innerHTML void as last child with preceding siblings hr 
+PASS innerHTML void as last child with preceding siblings img 
+PASS innerHTML void as last child with preceding siblings input 
+PASS innerHTML void as last child with preceding siblings keygen 
+PASS innerHTML void as last child with preceding siblings link 
</ins><span class="cx"> FAIL innerHTML void as last child with preceding siblings menuitem assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;menuitem&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;menuitem&gt;&lt;a&gt;&lt;!--abc--&gt;&lt;/a&gt;&lt;b&gt;&lt;c&gt;abc&lt;/c&gt;&lt;/b&gt;&lt;/menuitem&gt;&quot;
</span><del>-FAIL innerHTML void as last child with preceding siblings meta assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;meta&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;meta&gt;&lt;/meta&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings param assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;param&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;param&gt;&lt;/param&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings source assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;source&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;source&gt;&lt;/source&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings track assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;track&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;track&gt;&lt;/track&gt;&quot;
-FAIL innerHTML void as last child with preceding siblings wbr assert_equals: expected &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;wbr&gt;&quot; but got &quot;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;wbr&gt;&lt;/wbr&gt;&quot;
-FAIL outerHTML Void context node area assert_equals: expected &quot;&lt;area&gt;&quot; but got &quot;&lt;area&gt;&lt;/area&gt;&quot;
-FAIL outerHTML Void context node base assert_equals: expected &quot;&lt;base&gt;&quot; but got &quot;&lt;base&gt;&lt;/base&gt;&quot;
-FAIL outerHTML Void context node basefont assert_equals: expected &quot;&lt;basefont&gt;&quot; but got &quot;&lt;basefont&gt;&lt;/basefont&gt;&quot;
-FAIL outerHTML Void context node bgsound assert_equals: expected &quot;&lt;bgsound&gt;&quot; but got &quot;&lt;bgsound&gt;&lt;/bgsound&gt;&quot;
-FAIL outerHTML Void context node br assert_equals: expected &quot;&lt;br&gt;&quot; but got &quot;&lt;br&gt;&lt;/br&gt;&quot;
-FAIL outerHTML Void context node col assert_equals: expected &quot;&lt;col&gt;&quot; but got &quot;&lt;col&gt;&lt;/col&gt;&quot;
-FAIL outerHTML Void context node embed assert_equals: expected &quot;&lt;embed&gt;&quot; but got &quot;&lt;embed&gt;&lt;/embed&gt;&quot;
-FAIL outerHTML Void context node frame assert_equals: expected &quot;&lt;frame&gt;&quot; but got &quot;&lt;frame&gt;&lt;/frame&gt;&quot;
-FAIL outerHTML Void context node hr assert_equals: expected &quot;&lt;hr&gt;&quot; but got &quot;&lt;hr&gt;&lt;/hr&gt;&quot;
-FAIL outerHTML Void context node img assert_equals: expected &quot;&lt;img&gt;&quot; but got &quot;&lt;img&gt;&lt;/img&gt;&quot;
-FAIL outerHTML Void context node input assert_equals: expected &quot;&lt;input&gt;&quot; but got &quot;&lt;input&gt;&lt;/input&gt;&quot;
-FAIL outerHTML Void context node keygen assert_equals: expected &quot;&lt;keygen&gt;&quot; but got &quot;&lt;keygen&gt;&lt;/keygen&gt;&quot;
-FAIL outerHTML Void context node link assert_equals: expected &quot;&lt;link&gt;&quot; but got &quot;&lt;link&gt;&lt;/link&gt;&quot;
</del><ins>+PASS innerHTML void as last child with preceding siblings meta 
+PASS innerHTML void as last child with preceding siblings param 
+PASS innerHTML void as last child with preceding siblings source 
+PASS innerHTML void as last child with preceding siblings track 
+PASS innerHTML void as last child with preceding siblings wbr 
+PASS outerHTML Void context node area 
+PASS outerHTML Void context node base 
+PASS outerHTML Void context node basefont 
+PASS outerHTML Void context node bgsound 
+PASS outerHTML Void context node br 
+PASS outerHTML Void context node col 
+PASS outerHTML Void context node embed 
+PASS outerHTML Void context node frame 
+PASS outerHTML Void context node hr 
+PASS outerHTML Void context node img 
+PASS outerHTML Void context node input 
+PASS outerHTML Void context node keygen 
+PASS outerHTML Void context node link 
</ins><span class="cx"> FAIL outerHTML Void context node menuitem assert_equals: expected &quot;&lt;menuitem&gt;&quot; but got &quot;&lt;menuitem&gt;&lt;a&gt;&lt;!--abc--&gt;&lt;/a&gt;&lt;b&gt;&lt;c&gt;abc&lt;/c&gt;&lt;/b&gt;&lt;/menuitem&gt;&quot;
</span><del>-FAIL outerHTML Void context node meta assert_equals: expected &quot;&lt;meta&gt;&quot; but got &quot;&lt;meta&gt;&lt;/meta&gt;&quot;
-FAIL outerHTML Void context node param assert_equals: expected &quot;&lt;param&gt;&quot; but got &quot;&lt;param&gt;&lt;/param&gt;&quot;
-FAIL outerHTML Void context node source assert_equals: expected &quot;&lt;source&gt;&quot; but got &quot;&lt;source&gt;&lt;/source&gt;&quot;
-FAIL outerHTML Void context node track assert_equals: expected &quot;&lt;track&gt;&quot; but got &quot;&lt;track&gt;&lt;/track&gt;&quot;
-FAIL outerHTML Void context node wbr assert_equals: expected &quot;&lt;wbr&gt;&quot; but got &quot;&lt;wbr&gt;&lt;/wbr&gt;&quot;
-FAIL outerHTML void as first child with following siblings area assert_equals: expected &quot;&lt;span&gt;&lt;area&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;area&gt;&lt;/area&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings base assert_equals: expected &quot;&lt;span&gt;&lt;base&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;base&gt;&lt;/base&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings basefont assert_equals: expected &quot;&lt;span&gt;&lt;basefont&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;basefont&gt;&lt;/basefont&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings bgsound assert_equals: expected &quot;&lt;span&gt;&lt;bgsound&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;bgsound&gt;&lt;/bgsound&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings br assert_equals: expected &quot;&lt;span&gt;&lt;br&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;br&gt;&lt;/br&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings col assert_equals: expected &quot;&lt;span&gt;&lt;col&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;col&gt;&lt;/col&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings embed assert_equals: expected &quot;&lt;span&gt;&lt;embed&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;embed&gt;&lt;/embed&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings frame assert_equals: expected &quot;&lt;span&gt;&lt;frame&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;frame&gt;&lt;/frame&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings hr assert_equals: expected &quot;&lt;span&gt;&lt;hr&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;hr&gt;&lt;/hr&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings img assert_equals: expected &quot;&lt;span&gt;&lt;img&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;img&gt;&lt;/img&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings input assert_equals: expected &quot;&lt;span&gt;&lt;input&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;input&gt;&lt;/input&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings keygen assert_equals: expected &quot;&lt;span&gt;&lt;keygen&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;keygen&gt;&lt;/keygen&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings link assert_equals: expected &quot;&lt;span&gt;&lt;link&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;link&gt;&lt;/link&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
</del><ins>+PASS outerHTML Void context node meta 
+PASS outerHTML Void context node param 
+PASS outerHTML Void context node source 
+PASS outerHTML Void context node track 
+PASS outerHTML Void context node wbr 
+PASS outerHTML void as first child with following siblings area 
+PASS outerHTML void as first child with following siblings base 
+PASS outerHTML void as first child with following siblings basefont 
+PASS outerHTML void as first child with following siblings bgsound 
+PASS outerHTML void as first child with following siblings br 
+PASS outerHTML void as first child with following siblings col 
+PASS outerHTML void as first child with following siblings embed 
+PASS outerHTML void as first child with following siblings frame 
+PASS outerHTML void as first child with following siblings hr 
+PASS outerHTML void as first child with following siblings img 
+PASS outerHTML void as first child with following siblings input 
+PASS outerHTML void as first child with following siblings keygen 
+PASS outerHTML void as first child with following siblings link 
</ins><span class="cx"> FAIL outerHTML void as first child with following siblings menuitem assert_equals: expected &quot;&lt;span&gt;&lt;menuitem&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;menuitem&gt;&lt;a&gt;&lt;!--abc--&gt;&lt;/a&gt;&lt;b&gt;&lt;c&gt;abc&lt;/c&gt;&lt;/b&gt;&lt;/menuitem&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
</span><del>-FAIL outerHTML void as first child with following siblings meta assert_equals: expected &quot;&lt;span&gt;&lt;meta&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;meta&gt;&lt;/meta&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings param assert_equals: expected &quot;&lt;span&gt;&lt;param&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;param&gt;&lt;/param&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings source assert_equals: expected &quot;&lt;span&gt;&lt;source&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;source&gt;&lt;/source&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings track assert_equals: expected &quot;&lt;span&gt;&lt;track&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;track&gt;&lt;/track&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as first child with following siblings wbr assert_equals: expected &quot;&lt;span&gt;&lt;wbr&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings area assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;area&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;area&gt;&lt;/area&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings base assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;base&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;base&gt;&lt;/base&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings basefont assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;basefont&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;basefont&gt;&lt;/basefont&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings bgsound assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;bgsound&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;bgsound&gt;&lt;/bgsound&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings br assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;br&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;br&gt;&lt;/br&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings col assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;col&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;col&gt;&lt;/col&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings embed assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;embed&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;embed&gt;&lt;/embed&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings frame assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;frame&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;frame&gt;&lt;/frame&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings hr assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;hr&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;hr&gt;&lt;/hr&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings img assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;img&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;img&gt;&lt;/img&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings input assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;input&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;input&gt;&lt;/input&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings keygen assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;keygen&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;keygen&gt;&lt;/keygen&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings link assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;link&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;link&gt;&lt;/link&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
</del><ins>+PASS outerHTML void as first child with following siblings meta 
+PASS outerHTML void as first child with following siblings param 
+PASS outerHTML void as first child with following siblings source 
+PASS outerHTML void as first child with following siblings track 
+PASS outerHTML void as first child with following siblings wbr 
+PASS outerHTML void as second child with following siblings area 
+PASS outerHTML void as second child with following siblings base 
+PASS outerHTML void as second child with following siblings basefont 
+PASS outerHTML void as second child with following siblings bgsound 
+PASS outerHTML void as second child with following siblings br 
+PASS outerHTML void as second child with following siblings col 
+PASS outerHTML void as second child with following siblings embed 
+PASS outerHTML void as second child with following siblings frame 
+PASS outerHTML void as second child with following siblings hr 
+PASS outerHTML void as second child with following siblings img 
+PASS outerHTML void as second child with following siblings input 
+PASS outerHTML void as second child with following siblings keygen 
+PASS outerHTML void as second child with following siblings link 
</ins><span class="cx"> FAIL outerHTML void as second child with following siblings menuitem assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;menuitem&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;menuitem&gt;&lt;a&gt;&lt;!--abc--&gt;&lt;/a&gt;&lt;b&gt;&lt;c&gt;abc&lt;/c&gt;&lt;/b&gt;&lt;/menuitem&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
</span><del>-FAIL outerHTML void as second child with following siblings meta assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;meta&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;meta&gt;&lt;/meta&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings param assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;param&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;param&gt;&lt;/param&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings source assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;source&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;source&gt;&lt;/source&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings track assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;track&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;track&gt;&lt;/track&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as second child with following siblings wbr assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;wbr&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings area assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;area&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;area&gt;&lt;/area&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings base assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;base&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;base&gt;&lt;/base&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings basefont assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;basefont&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;basefont&gt;&lt;/basefont&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings bgsound assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;bgsound&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;bgsound&gt;&lt;/bgsound&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings br assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;br&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;br&gt;&lt;/br&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings col assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;col&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;col&gt;&lt;/col&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings embed assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;embed&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;embed&gt;&lt;/embed&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings frame assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;frame&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;frame&gt;&lt;/frame&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings hr assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;hr&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;hr&gt;&lt;/hr&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings img assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;img&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;img&gt;&lt;/img&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings input assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;input&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;input&gt;&lt;/input&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings keygen assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;keygen&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;keygen&gt;&lt;/keygen&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings link assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;link&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;link&gt;&lt;/link&gt;&lt;/span&gt;&quot;
</del><ins>+PASS outerHTML void as second child with following siblings meta 
+PASS outerHTML void as second child with following siblings param 
+PASS outerHTML void as second child with following siblings source 
+PASS outerHTML void as second child with following siblings track 
+PASS outerHTML void as second child with following siblings wbr 
+PASS outerHTML void as last child with preceding siblings area 
+PASS outerHTML void as last child with preceding siblings base 
+PASS outerHTML void as last child with preceding siblings basefont 
+PASS outerHTML void as last child with preceding siblings bgsound 
+PASS outerHTML void as last child with preceding siblings br 
+PASS outerHTML void as last child with preceding siblings col 
+PASS outerHTML void as last child with preceding siblings embed 
+PASS outerHTML void as last child with preceding siblings frame 
+PASS outerHTML void as last child with preceding siblings hr 
+PASS outerHTML void as last child with preceding siblings img 
+PASS outerHTML void as last child with preceding siblings input 
+PASS outerHTML void as last child with preceding siblings keygen 
+PASS outerHTML void as last child with preceding siblings link 
</ins><span class="cx"> FAIL outerHTML void as last child with preceding siblings menuitem assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;menuitem&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;menuitem&gt;&lt;a&gt;&lt;!--abc--&gt;&lt;/a&gt;&lt;b&gt;&lt;c&gt;abc&lt;/c&gt;&lt;/b&gt;&lt;/menuitem&gt;&lt;/span&gt;&quot;
</span><del>-FAIL outerHTML void as last child with preceding siblings meta assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;meta&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;meta&gt;&lt;/meta&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings param assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;param&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;param&gt;&lt;/param&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings source assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;source&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;source&gt;&lt;/source&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings track assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;track&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;track&gt;&lt;/track&gt;&lt;/span&gt;&quot;
-FAIL outerHTML void as last child with preceding siblings wbr assert_equals: expected &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;wbr&gt;&lt;/span&gt;&quot; but got &quot;&lt;span&gt;&lt;a&gt;test&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;/span&gt;&quot;
</del><ins>+PASS outerHTML void as last child with preceding siblings meta 
+PASS outerHTML void as last child with preceding siblings param 
+PASS outerHTML void as last child with preceding siblings source 
+PASS outerHTML void as last child with preceding siblings track 
+PASS outerHTML void as last child with preceding siblings wbr 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206265 => 206266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-22 18:43:40 UTC (rev 206265)
+++ trunk/Source/WebCore/ChangeLog        2016-09-22 18:47:34 UTC (rev 206266)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2016-09-22  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Fix serialization of HTML void elements when they have children
+        https://bugs.webkit.org/show_bug.cgi?id=162418
+
+        Reviewed by Darin Adler.
+
+        Fix serialization of HTML void elements when they have children.
+
+        Void elements (such as &lt;hr&gt;) cannot have a closing tag. When
+        encountering them, we would properly not serialize the void
+        element's children (if it had any). However, we would incorrectly
+        append an end tag (because the element technically has children).
+
+        Relevant specification:
+        - https://html.spec.whatwg.org/#html-fragment-serialisation-algorithm
+
+        In particular, this part:
+        &quot;&quot;
+        If current node is an area, base, basefont, bgsound, br, col, embed,
+        frame, hr, img, input, keygen, link, meta, param, source, track or wbr
+        element, then continue on to the next child node at this point.
+        &quot;&quot;
+
+        Firefox matches the specification.
+
+        No new tests, rebaselined existing test.
+
+        * editing/MarkupAccumulator.cpp:
+        (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
+
</ins><span class="cx"> 2016-09-22  Don Olmstead  &lt;don.olmstead@am.sony.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WinCairo] Fix build after r206196
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingMarkupAccumulatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/MarkupAccumulator.cpp (206265 => 206266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/MarkupAccumulator.cpp        2016-09-22 18:43:40 UTC (rev 206265)
+++ trunk/Source/WebCore/editing/MarkupAccumulator.cpp        2016-09-22 18:47:34 UTC (rev 206266)
</span><span class="lines">@@ -156,12 +156,13 @@
</span><span class="cx">     if (!childrenOnly)
</span><span class="cx">         appendStartTag(targetNode, &amp;namespaceHash);
</span><span class="cx"> 
</span><del>-    if (!(targetNode.document().isHTMLDocument() &amp;&amp; elementCannotHaveEndTag(targetNode))) {
-        Node* current = targetNode.hasTagName(templateTag) ? downcast&lt;HTMLTemplateElement&gt;(targetNode).content().firstChild() : targetNode.firstChild();
-        for ( ; current; current = current-&gt;nextSibling())
-            serializeNodesWithNamespaces(*current, IncludeNode, &amp;namespaceHash, tagNamesToSkip);
-    }
</del><ins>+    if (targetNode.document().isHTMLDocument() &amp;&amp; elementCannotHaveEndTag(targetNode))
+        return;
</ins><span class="cx"> 
</span><ins>+    Node* current = targetNode.hasTagName(templateTag) ? downcast&lt;HTMLTemplateElement&gt;(targetNode).content().firstChild() : targetNode.firstChild();
+    for ( ; current; current = current-&gt;nextSibling())
+        serializeNodesWithNamespaces(*current, IncludeNode, &amp;namespaceHash, tagNamesToSkip);
+
</ins><span class="cx">     if (!childrenOnly)
</span><span class="cx">         appendEndTag(targetNode);
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>