Title: [95009] trunk
- Revision
- 95009
- Author
- commit-qu...@webkit.org
- Date
- 2011-09-12 20:50:01 -0700 (Mon, 12 Sep 2011)
Log Message
Setting document.title doesn't affect contents of title tag of XHTML documents
https://bugs.webkit.org/show_bug.cgi?id=57537
Patch by Jacky Jiang <zhaji...@rim.com> on 2011-09-12
Reviewed by Alexey Proskuryakov.
Source/WebCore:
Update the contents of the <title> tag of XHTML documents when setting
document.title.
Test: fast/dom/title-content-set-innerText-get.xhtml
* dom/Document.cpp:
(WebCore::Document::setTitle):
LayoutTests:
* fast/dom/title-content-set-innerText-get-expected.txt: Added.
* fast/dom/title-content-set-innerText-get.xhtml: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (95008 => 95009)
--- trunk/LayoutTests/ChangeLog 2011-09-13 03:44:39 UTC (rev 95008)
+++ trunk/LayoutTests/ChangeLog 2011-09-13 03:50:01 UTC (rev 95009)
@@ -1,3 +1,13 @@
+2011-09-12 Jacky Jiang <zhaji...@rim.com>
+
+ Setting document.title doesn't affect contents of title tag of XHTML documents
+ https://bugs.webkit.org/show_bug.cgi?id=57537
+
+ Reviewed by Alexey Proskuryakov.
+
+ * fast/dom/title-content-set-innerText-get-expected.txt: Added.
+ * fast/dom/title-content-set-innerText-get.xhtml: Added.
+
2011-09-12 Dominic Mazzoni <dmazz...@google.com>
Add GTK & Win expectations for two recently added
Added: trunk/LayoutTests/fast/dom/title-content-set-innerText-get-expected.txt (0 => 95009)
--- trunk/LayoutTests/fast/dom/title-content-set-innerText-get-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/dom/title-content-set-innerText-get-expected.txt 2011-09-13 03:50:01 UTC (rev 95009)
@@ -0,0 +1,10 @@
+This test ensures that we can update the contents of the title tag of the XHTML document when setting document.title
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.getElementById('t').innerText is 'This is the new title'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/dom/title-content-set-innerText-get.xhtml (0 => 95009)
--- trunk/LayoutTests/fast/dom/title-content-set-innerText-get.xhtml (rev 0)
+++ trunk/LayoutTests/fast/dom/title-content-set-innerText-get.xhtml 2011-09-13 03:50:01 UTC (rev 95009)
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title id='t'>Original Title</title>
+<link rel="stylesheet" href="" />
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("This test ensures that we can update the contents of the title tag of the XHTML document when setting document.title");
+
+document.title = 'This is the new title';
+shouldBe("document.getElementById('t').innerText", "'This is the new title'");
+
+var successfullyParsed = true;
+</script>
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (95008 => 95009)
--- trunk/Source/WebCore/ChangeLog 2011-09-13 03:44:39 UTC (rev 95008)
+++ trunk/Source/WebCore/ChangeLog 2011-09-13 03:50:01 UTC (rev 95009)
@@ -1,3 +1,18 @@
+2011-09-12 Jacky Jiang <zhaji...@rim.com>
+
+ Setting document.title doesn't affect contents of title tag of XHTML documents
+ https://bugs.webkit.org/show_bug.cgi?id=57537
+
+ Reviewed by Alexey Proskuryakov.
+
+ Update the contents of the <title> tag of XHTML documents when setting
+ document.title.
+
+ Test: fast/dom/title-content-set-innerText-get.xhtml
+
+ * dom/Document.cpp:
+ (WebCore::Document::setTitle):
+
2011-09-12 Raphael Kubo da Costa <k...@profusion.mobi>
[EFL] Initialize m_unmodifiedText in PlatformKeyboardEventEfl.
Modified: trunk/Source/WebCore/dom/Document.cpp (95008 => 95009)
--- trunk/Source/WebCore/dom/Document.cpp 2011-09-13 03:44:39 UTC (rev 95008)
+++ trunk/Source/WebCore/dom/Document.cpp 2011-09-13 03:50:01 UTC (rev 95009)
@@ -1329,7 +1329,7 @@
{
// Title set by _javascript_ -- overrides any title elements.
m_titleSetExplicitly = true;
- if (!isHTMLDocument())
+ if (!isHTMLDocument() && !isXHTMLDocument())
m_titleElement = 0;
else if (!m_titleElement) {
if (HTMLElement* headElement = head()) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes