Bug 153374 - DOMImplementation.createHTMLDocument("") should append an empty Text Node to the title Element
Summary: DOMImplementation.createHTMLDocument("") should append an empty Text Node to ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://dom.spec.whatwg.org/#dom-domi...
Keywords: WebExposed
: 139177 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-22 14:25 PST by Chris Dumez
Modified: 2016-09-27 09:07 PDT (History)
5 users (show)

See Also:


Attachments
Patch (6.19 KB, patch)
2016-01-22 14:33 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***