Bug 162418

Summary: Fix serialization of HTML void elements when they have children
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, commit-queue, darin, rniwa, sam
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2016-09-22 10:52:30 PDT
Fix serialization of HTML void elements when they have children. Void elements (such as <hr>) cannot have a closing tag. When encountering them, we properly do not serialize the void element's children, however, we incorrectly append an end tag (because the element technically has children). Relevant specification: - https://html.spec.whatwg.org/#html-fragment-serialisation-algorithm "" 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. "" Firefox matches the specification.
Attachments
Patch (33.52 KB, patch)
2016-09-22 11:03 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-09-22 11:03:24 PDT
WebKit Commit Bot
Comment 2 2016-09-22 11:49:50 PDT
Comment on attachment 289579 [details] Patch Clearing flags on attachment: 289579 Committed r206266: <http://trac.webkit.org/changeset/206266>
WebKit Commit Bot
Comment 3 2016-09-22 11:49:56 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.