Bug 170005 - HTML parser: <dialog> does not close <p>
Summary: HTML parser: <dialog> does not close <p>
Status: RESOLVED DUPLICATE of bug 234442
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-23 06:19 PDT by Simon Pieters (:zcorpan)
Modified: 2022-02-26 23:49 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Pieters (:zcorpan) 2017-03-23 06:19:40 PDT
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: <dialog><p></dialog>x
log: <p><dialog>
log: DONE

Expect:
log: DONE

The HTML parser does not close the p for </dialog> in the first test, and doesn't close the p for <dialog> in the second test.

HTML standard:
[[
A start tag whose tag name is one of: "address", "article", "aside", "blockquote", "center", "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer", "header", "hgroup", "main", "menu", "nav", "ol", "p", "section", "summary", "ul"
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: "address", "article", "aside", "blockquote", "button", "center", "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer", "header", "hgroup", "listing", "main", "menu", "nav", "ol", "pre", "section", "summary", "ul"
[...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 ).
Comment 1 Tim Nguyen (:ntim) 2022-02-26 23:49:07 PST

*** This bug has been marked as a duplicate of bug 234442 ***