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); |