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

Unified Diff: Source/core/dom/CharacterData.cpp

Issue 365673002: Pass a struct to ContainerNode::childrenChanged() instead of separate arguments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove dead code Created 6 years, 6 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/CharacterData.cpp
diff --git a/Source/core/dom/CharacterData.cpp b/Source/core/dom/CharacterData.cpp
index 93ada1dc9165c73c16eb5efbeadd1635cb69defd..6d55f7f0c2df63462debf64f337a4cb1eb837448 100644
--- a/Source/core/dom/CharacterData.cpp
+++ b/Source/core/dom/CharacterData.cpp
@@ -1,7 +1,7 @@
/*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
- * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -76,8 +76,10 @@ void CharacterData::parserAppendData(const String& string)
document().incDOMTreeVersion();
- if (parentNode())
- parentNode()->childrenChanged();
+ if (parentNode()) {
+ ContainerNode::ChildrenChange change = {ContainerNode::TextChanged, previousSibling(), nextSibling(), ContainerNode::ChildrenChangeSourceParser};
+ parentNode()->childrenChanged(change);
+ }
}
void CharacterData::appendData(const String& data)
@@ -192,8 +194,10 @@ void CharacterData::didModifyData(const String& oldData)
if (OwnPtrWillBeRawPtr<MutationObserverInterestGroup> mutationRecipients = MutationObserverInterestGroup::createForCharacterDataMutation(*this))
mutationRecipients->enqueueMutationRecord(MutationRecord::createCharacterData(this, oldData));
- if (parentNode())
- parentNode()->childrenChanged();
+ if (parentNode()) {
+ ContainerNode::ChildrenChange change = {ContainerNode::TextChanged, previousSibling(), nextSibling(), ContainerNode::ChildrenChangeSourceAPI};
+ parentNode()->childrenChanged(change);
+ }
if (!isInShadowTree()) {
if (document().hasListenerType(Document::DOMCHARACTERDATAMODIFIED_LISTENER))

Powered by Google App Engine
This is Rietveld 408576698