DOMImplementation.createHTMLDocument("") should append an empty Text Node to the...
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jan 2016 23:43:13 +0000 (23:43 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jan 2016 23:43:13 +0000 (23:43 +0000)
commit68c7b3b0872824588b1d634493984b64a67dc76b
tree9ff4be5d2897e2ee974d3101f2ae21d624c6fd45
parent9fd89096c402406d61b9e755a1462bee6fe29ec1
DOMImplementation.createHTMLDocument("") should append an empty Text Node to the title Element
https://bugs.webkit.org/show_bug.cgi?id=153374

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline existing W3C DOM tests now that more checks are passing.

* web-platform-tests/dom/nodes/DOMImplementation-createHTMLDocument-expected.txt:
* web-platform-tests/dom/ranges/Range-selectNode-expected.txt:

Source/WebCore:

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.

Previously, WebKit would rely 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

No new tests, already covered by existing test.

* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createHTMLDocument):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createHTMLDocument-expected.txt
LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-selectNode-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/DOMImplementation.cpp