HTMLTitleElement.text should only account for direct children Text nodes
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jul 2016 01:15:48 +0000 (01:15 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jul 2016 01:15:48 +0000 (01:15 +0000)
commit71d7a3b52a7a538f1a0f5b19d0ffffe9b82c4c94
treeb85c6834d5e82839a4474f205ae3991f5d31acff
parent9336ddf863d2ba668b1c7689794662253e29b40d
HTMLTitleElement.text should only account for direct children Text nodes
https://bugs.webkit.org/show_bug.cgi?id=159536

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

* web-platform-tests/html/semantics/document-metadata/the-title-element/title.text-01-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-title-element/title.text-02-expected.txt:

Source/WebCore:

HTMLTitleElement.text should only account for direct children Text nodes:
- https://html.spec.whatwg.org/multipage/semantics.html#dom-title-text
- https://html.spec.whatwg.org/multipage/infrastructure.html#child-text-content

Firefox and Chrome match the specification. However, WebKit accounted for all
Text nodes that are descendants, not just children. This patch aligns our
behavior with the specification and other browsers.

No new tests, rebaselined existing tests.

* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::text):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-title-element/title.text-01-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-title-element/title.text-02-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLTitleElement.cpp