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

Unified Diff: third_party/WebKit/Source/core/dom/SynchronousMutationObserver.h

Issue 2644063002: Make SynchronousMutationObserver::didMergeTextNodes() to take both merged and merging nodes (Closed)
Patch Set: 2017-01-19T17:22:18 Created 3 years, 11 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: third_party/WebKit/Source/core/dom/SynchronousMutationObserver.h
diff --git a/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.h b/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.h
index 2df1926954e0653d6b7682e6c219103e37621938..ad0311ca64c0168fee3532f37ab0ec9647d59f5a 100644
--- a/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.h
+++ b/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.h
@@ -14,6 +14,7 @@ namespace blink {
class CharacterData;
class ContainerNode;
class Document;
+class NodeWithIndex;
class Text;
// This class is a base class for classes which observe DOM tree mutation
@@ -42,10 +43,11 @@ class CORE_EXPORT SynchronousMutationObserver
// Called after child nodes changed.
virtual void didChangeChildren(const ContainerNode&);
- // TODO(yosin): We should use |const Text& oldNode|.
- // Called after characters in |oldNode| is appended at |offset| in
- // |oldNdoe->previousSibling()|.
- virtual void didMergeTextNodes(Text& oldNode, unsigned offset);
+ // Called after characters in |nodeToBeRemoved| is appended into |mergedNode|.
+ // |oldLength| holds length of |mergedNode| before merge.
+ virtual void didMergeTextNodes(const Text& mergedNode,
+ const NodeWithIndex& nodeToBeRemovedWithIndex,
+ unsigned oldLength);
// Called just after node tree |root| is moved to new document.
virtual void didMoveTreeToNewDocument(const Node& root);

Powered by Google App Engine
This is Rietveld 408576698