Bug 149005 - Setting document.title when there is no title and no head element should no nothing
Summary: Setting document.title when there is no title and no head element should no n...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://html.spec.whatwg.org/multipag...
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2015-09-09 10:59 PDT by Chris Dumez
Modified: 2015-09-09 15:12 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.98 KB, patch)
2015-09-09 11:30 PDT, 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 2015-09-09 10:59:20 PDT
Setting document.title when there is no title and no head element should no nothing:
https://html.spec.whatwg.org/multipage/dom.html#document.title

Firefox and Chrome comply with the specification. However, WebKit returns the updated title when querying document.title after setting it.
Comment 1 Chris Dumez 2015-09-09 10:59:54 PDT
rdar://problem/22567524
Comment 2 Chris Dumez 2015-09-09 11:30:03 PDT
Created attachment 260865 [details]
Patch
Comment 3 Ryosuke Niwa 2015-09-09 14:25:51 PDT
Comment on attachment 260865 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=260865&action=review

> Source/WebCore/dom/Document.cpp:1541
> +        m_titleElement = createElement(titleTag, false);

This boolean argument sucks :(  We should replace it with enum class in the future.
Comment 4 WebKit Commit Bot 2015-09-09 15:11:55 PDT
Comment on attachment 260865 [details]
Patch

Clearing flags on attachment: 260865

Committed r189555: <http://trac.webkit.org/changeset/189555>
Comment 5 WebKit Commit Bot 2015-09-09 15:12:01 PDT
All reviewed patches have been landed.  Closing bug.