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