<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - HTML parser: &lt;dialog&gt; does not close &lt;p&gt;"
   href="https://bugs.webkit.org/show_bug.cgi?id=170005">170005</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>HTML parser: &lt;dialog&gt; does not close &lt;p&gt;
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Safari Technology Preview
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>HTML DOM
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>zcorpan&#64;gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>cdumez&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Version: Release 26 (Safari 10.2, WebKit 12604.1.12)

Test: <a href="http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4976">http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4976</a>

Result in Chrome canary:
log: &lt;dialog&gt;&lt;p&gt;&lt;/dialog&gt;x
log: &lt;p&gt;&lt;dialog&gt;
log: DONE

Expect:
log: DONE

The HTML parser does not close the p for &lt;/dialog&gt; in the first test, and doesn't close the p for &lt;dialog&gt; in the second test.

HTML standard:
[[
A start tag whose tag name is one of: &quot;address&quot;, &quot;article&quot;, &quot;aside&quot;, &quot;blockquote&quot;, &quot;center&quot;, &quot;details&quot;, &quot;dialog&quot;, &quot;dir&quot;, &quot;div&quot;, &quot;dl&quot;, &quot;fieldset&quot;, &quot;figcaption&quot;, &quot;figure&quot;, &quot;footer&quot;, &quot;header&quot;, &quot;hgroup&quot;, &quot;main&quot;, &quot;menu&quot;, &quot;nav&quot;, &quot;ol&quot;, &quot;p&quot;, &quot;section&quot;, &quot;summary&quot;, &quot;ul&quot;
If the stack of open elements has a p element in button scope, then close a p element.

Insert an HTML element for the token.
]]

[[
An end tag whose tag name is one of: &quot;address&quot;, &quot;article&quot;, &quot;aside&quot;, &quot;blockquote&quot;, &quot;button&quot;, &quot;center&quot;, &quot;details&quot;, &quot;dialog&quot;, &quot;dir&quot;, &quot;div&quot;, &quot;dl&quot;, &quot;fieldset&quot;, &quot;figcaption&quot;, &quot;figure&quot;, &quot;footer&quot;, &quot;header&quot;, &quot;hgroup&quot;, &quot;listing&quot;, &quot;main&quot;, &quot;menu&quot;, &quot;nav&quot;, &quot;ol&quot;, &quot;pre&quot;, &quot;section&quot;, &quot;summary&quot;, &quot;ul&quot;
[...handling of end tag...]
]]

html5lib-tests PR:
<a href="https://github.com/html5lib/html5lib-tests/pull/91">https://github.com/html5lib/html5lib-tests/pull/91</a>

Test passes in Firefox Nightly. Fails in Chrome canary (bug: <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=704534">https://bugs.chromium.org/p/chromium/issues/detail?id=704534</a> ).</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>