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

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

Issue 128603002: Inhibit title update when removing children before setting new value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased 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 806e65d0a85943f990681650ae22c5ea79f8fbdb..d74a20e2747cb3941edab4f8d3fa70ac3fa46715 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1305,13 +1305,10 @@ void Document::setTitle(const String& title)
}
}
- if (m_titleElement)
- m_titleElement->removeChildren();
-
- 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