Bug 153374

Summary: DOMImplementation.createHTMLDocument("") should append an empty Text Node to the title Element
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, kangil.han, rniwa, shiva.jm
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument
Attachments:
Description Flags
Patch none

Description Chris Dumez 2016-01-22 14:25:29 PST
DOMImplementation.createHTMLDocument("") should append an empty Text Node to the title Element as per the steps at:
https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument (step 6)

Firefox and Chrome follow the specification here.

Currently, WebKit relies on HTMLTitleElement.text setter which does not create a Text Node if the title is the empty string, as per:
https://html.spec.whatwg.org/multipage/semantics.html#dom-title-text
https://dom.spec.whatwg.org/#dom-node-textcontent
Comment 1 Chris Dumez 2016-01-22 14:33:47 PST
Created attachment 269609 [details]
Patch
Comment 2 WebKit Commit Bot 2016-01-22 15:43:24 PST
Comment on attachment 269609 [details]
Patch

Clearing flags on attachment: 269609

Committed r195491: <http://trac.webkit.org/changeset/195491>
Comment 3 WebKit Commit Bot 2016-01-22 15:43:28 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Chris Dumez 2016-09-27 09:07:37 PDT
*** Bug 139177 has been marked as a duplicate of this bug. ***