WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
149098
Document.title does not behave according to specification
https://bugs.webkit.org/show_bug.cgi?id=149098
Summary
Document.title does not behave according to specification
Chris Dumez
Reported
2015-09-12 15:31:05 PDT
Document.title does not behave according to specification:
https://html.spec.whatwg.org/multipage/dom.html#document.title
In particular, 1. Adding a title element to the Document does not always update the value returned by document.title even if the element if the first title element in the document. 2. The *first* title element in tree order is supposed to update the document title. However, in WebKit, it is the first title *added* to the document, even if it is not the first in tree order.
Attachments
Patch
(17.28 KB, patch)
2015-09-12 18:16 PDT
,
Chris Dumez
rniwa
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2015-09-12 18:16:12 PDT
Created
attachment 261070
[details]
Patch
Ryosuke Niwa
Comment 2
2015-09-13 21:26:22 PDT
Comment on
attachment 261070
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=261070&action=review
> Source/WebCore/dom/Document.cpp:1579 > + if (isHTMLDocument() || isXHTMLDocument()) { > + m_titleElement = descendantsOfType<HTMLTitleElement>(*this).first(); > + } else if (isSVGDocument()) {
Nit: we shouldn't have curly brackets around a single line statement.
Chris Dumez
Comment 3
2015-09-13 22:03:41 PDT
Committed
r189680
: <
http://trac.webkit.org/changeset/189680
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug