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

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

Issue 107513013: Remove children of title node before updating (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove children before updateTitle for less title update dispatches Created 7 years 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-2-expected.txt ('k') | Source/core/html/HTMLTitleElement.cpp » ('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 f1ba78ad20b000246d820784d84141318c5101dc..b47b8bfda30083ddac0908176980da6c8bb8a9dc 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1313,6 +1313,9 @@ void Document::setTitle(const String& title)
}
}
+ if (m_titleElement)
+ m_titleElement->removeChildren();
+
updateTitle(title);
if (m_titleElement && isHTMLTitleElement(m_titleElement.get()))
« no previous file with comments | « LayoutTests/fast/dom/title-text-property-2-expected.txt ('k') | Source/core/html/HTMLTitleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698