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

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: 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
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index e68495cfdae1ef34b27368b76fa776b31ad27694..8d5f0db992b8e82af63ed2cf676322c847257798 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1306,8 +1306,10 @@ void Document::setTitle(const String& title)
}
}
- if (m_titleElement)
+ if (m_titleElement && m_titleElement->hasTagName(titleTag)) {
+ IgnoreTitleUpdatesWhenChildrenChange inhibitor(toHTMLTitleElement(m_titleElement));
m_titleElement->removeChildren();
+ }
updateTitle(title);

Powered by Google App Engine
This is Rietveld 408576698