<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Setting document.title reuses <title>'s textnode child"
href="https://bugs.webkit.org/show_bug.cgi?id=28864#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Setting document.title reuses <title>'s textnode child"
href="https://bugs.webkit.org/show_bug.cgi?id=28864">bug 28864</a>
from <span class="vcard"><a class="email" href="mailto:cdumez@apple.com" title="Chris Dumez <cdumez@apple.com>"> <span class="fn">Chris Dumez</span></a>
</span></b>
<pre>Looks like this still applies according to the latest specification:
- <a href="https://html.spec.whatwg.org/multipage/dom.html#document.title">https://html.spec.whatwg.org/multipage/dom.html#document.title</a>
- <a href="https://dom.spec.whatwg.org/#dom-node-textcontent">https://dom.spec.whatwg.org/#dom-node-textcontent</a>
This is caused by the following "optimization" in HTMLTitleElement::setText():
if (!value.isEmpty() && hasOneChild() && is<Text>(*firstChild())) {
downcast<Text>(*firstChild()).setData(value);
return;
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>