<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>170005</bug_id>
          
          <creation_ts>2017-03-23 06:19:40 -0700</creation_ts>
          <short_desc>HTML parser: &lt;dialog&gt; does not close &lt;p&gt;</short_desc>
          <delta_ts>2022-02-26 23:49:07 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>234442</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters (:zcorpan)">zcorpan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>cigitia</cc>
    
    <cc>ntim</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1290433</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2017-03-23 06:19:40 -0700</bug_when>
    <thetext>Version: Release 26 (Safari 10.2, WebKit 12604.1.12)

Test: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4976

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&apos;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:
https://github.com/html5lib/html5lib-tests/pull/91

Test passes in Firefox Nightly. Fails in Chrome canary (bug: https://bugs.chromium.org/p/chromium/issues/detail?id=704534 ).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1846378</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2022-02-26 23:49:07 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 234442 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>