| Index: third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.cpp b/third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.cpp
|
| index 8084bdc9be4602896a072b0ea43ebe60bfd54e4f..45d4348d1e786262059b89e7b937f1781961a409 100644
|
| --- a/third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.cpp
|
| @@ -11,32 +11,31 @@ namespace blink {
|
|
|
| SynchronousMutationNotifier::SynchronousMutationNotifier() = default;
|
|
|
| +void SynchronousMutationNotifier::notifyChangeAttribute(
|
| + const Element& element) {
|
| + for (SynchronousMutationObserver* observer : m_observers)
|
| + observer->didChangeAttribute(element);
|
| +}
|
| +
|
| void SynchronousMutationNotifier::notifyChangeChildren(
|
| const ContainerNode& container) {
|
| for (SynchronousMutationObserver* observer : m_observers)
|
| observer->didChangeChildren(container);
|
| }
|
|
|
| -void SynchronousMutationNotifier::notifyMergeTextNodes(Text& node,
|
| - unsigned offset) {
|
| - for (SynchronousMutationObserver* observer : m_observers)
|
| - observer->didMergeTextNodes(node, offset);
|
| +void SynchronousMutationNotifier::notifyMergeTextNodes(
|
| + const Text& mergedNode,
|
| + const NodeWithIndex& nodeToBeRemovedWithIndex,
|
| + unsigned oldLength) {
|
| + for (SynchronousMutationObserver* observer : m_observers) {
|
| + observer->didMergeTextNodes(mergedNode, nodeToBeRemovedWithIndex,
|
| + oldLength);
|
| + }
|
| }
|
|
|
| -void SynchronousMutationNotifier::notifySplitTextNode(const Text& node) {
|
| +void SynchronousMutationNotifier::notifyMoveTreeToNewDocument() {
|
| for (SynchronousMutationObserver* observer : m_observers)
|
| - observer->didSplitTextNode(node);
|
| -}
|
| -
|
| -void SynchronousMutationNotifier::notifyUpdateCharacterData(
|
| - CharacterData* characterData,
|
| - unsigned offset,
|
| - unsigned oldLength,
|
| - unsigned newLength) {
|
| - for (SynchronousMutationObserver* observer : m_observers) {
|
| - observer->didUpdateCharacterData(characterData, offset, oldLength,
|
| - newLength);
|
| - }
|
| + observer->didMoveTreeToNewDocument();
|
| }
|
|
|
| void SynchronousMutationNotifier::notifyNodeChildrenWillBeRemoved(
|
| @@ -50,4 +49,18 @@ void SynchronousMutationNotifier::notifyNodeWillBeRemoved(Node& node) {
|
| observer->nodeWillBeRemoved(node);
|
| }
|
|
|
| +void SynchronousMutationNotifier::notifySplitTextNode(const Text& splitNode) {
|
| + for (SynchronousMutationObserver* observer : m_observers)
|
| + observer->didSplitTextNode(splitNode);
|
| +}
|
| +
|
| +void SynchronousMutationNotifier::notifyUpdateCharacterData(
|
| + CharacterData* node,
|
| + unsigned offset,
|
| + unsigned oldLength,
|
| + unsigned newLength) {
|
| + for (SynchronousMutationObserver* observer : m_observers)
|
| + observer->didUpdateCharacterData(node, offset, oldLength, newLength);
|
| +}
|
| +
|
| } // namespace blink
|
|
|