Index: Source/core/html/HTMLTitleElement.cpp |
diff --git a/Source/core/html/HTMLTitleElement.cpp b/Source/core/html/HTMLTitleElement.cpp |
index ff62d1c92a0824c76b4ba392ea626248a62fec5d..ed8a83c45a751814f561022de43b43aebfdb2a6e 100644 |
--- a/Source/core/html/HTMLTitleElement.cpp |
+++ b/Source/core/html/HTMLTitleElement.cpp |
@@ -89,11 +89,12 @@ void HTMLTitleElement::setText(const String &value) |
ChildListMutationScope mutation(*this); |
// Avoid calling Document::setTitleElement() during intermediate steps. |
- m_ignoreTitleUpdatesWhenChildrenChange = true; |
+ m_ignoreTitleUpdatesWhenChildrenChange = !value.isEmpty(); |
removeChildren(); |
m_ignoreTitleUpdatesWhenChildrenChange = false; |
- appendChild(document().createTextNode(value.impl()), IGNORE_EXCEPTION); |
+ if (!value.isEmpty()) |
+ appendChild(document().createTextNode(value.impl()), IGNORE_EXCEPTION); |
} |
} |