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

Unified Diff: Source/WebCore/html/HTMLTitleElement.cpp

Issue 9567036: Merge 109362 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 10 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
« no previous file with comments | « Source/WebCore/html/HTMLTextAreaElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLTitleElement.cpp
===================================================================
--- Source/WebCore/html/HTMLTitleElement.cpp (revision 109466)
+++ Source/WebCore/html/HTMLTitleElement.cpp (working copy)
@@ -88,12 +88,14 @@
void HTMLTitleElement::setText(const String &value)
{
+ RefPtr<Node> protectFromMutationEvents(this);
+
ExceptionCode ec = 0;
int numChildren = childNodeCount();
if (numChildren == 1 && firstChild()->isTextNode())
static_cast<Text*>(firstChild())->setData(value, ec);
- else {
+ else {
// We make a copy here because entity of "value" argument can be Document::m_title,
// which goes empty during removeChildren() invocation below,
// which causes HTMLTitleElement::childrenChanged(), which ends up Document::setTitle().
« no previous file with comments | « Source/WebCore/html/HTMLTextAreaElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698