Bug 170005
Summary: | HTML parser: <dialog> does not close <p> | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Pieters (:zcorpan) <zcorpan> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | cdumez, cigitia, ntim |
Priority: | P2 | ||
Version: | Safari Technology Preview | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Simon Pieters (:zcorpan)
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 ).
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Tim Nguyen (:ntim)
*** This bug has been marked as a duplicate of bug 234442 ***