Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Unified Diff: Source/core/dom/Document.cpp

Issue 139313009: Remove children of title element before setting new title (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/title-text-property-3-expected.txt ('k') | Source/core/html/HTMLTitleElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 3db7d47193f78059d23ee8b87b56404b767b8399..dd5226ba0ec7e040a46f0f8e559f7575a0c7fd87 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1299,10 +1299,10 @@ void Document::setTitle(const String& title)
}
}
- updateTitle(title);
-
if (m_titleElement && m_titleElement->hasTagName(titleTag))
toHTMLTitleElement(m_titleElement)->setText(title);
+ else
+ updateTitle(title);
}
void Document::setTitleElement(const String& title, Element* titleElement)
« no previous file with comments | « LayoutTests/fast/dom/title-text-property-3-expected.txt ('k') | Source/core/html/HTMLTitleElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698