OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/dom/SynchronousMutationNotifier.h" | 5 #include "core/dom/SynchronousMutationNotifier.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "core/dom/SynchronousMutationObserver.h" | 8 #include "core/dom/SynchronousMutationObserver.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 SynchronousMutationNotifier::SynchronousMutationNotifier() = default; | 12 SynchronousMutationNotifier::SynchronousMutationNotifier() = default; |
13 | 13 |
| 14 void SynchronousMutationNotifier::notifyChangeAttribute( |
| 15 const Element& element) { |
| 16 for (SynchronousMutationObserver* observer : m_observers) |
| 17 observer->didChangeAttribute(element); |
| 18 } |
| 19 |
14 void SynchronousMutationNotifier::notifyChangeChildren( | 20 void SynchronousMutationNotifier::notifyChangeChildren( |
15 const ContainerNode& container) { | 21 const ContainerNode& container) { |
16 for (SynchronousMutationObserver* observer : m_observers) | 22 for (SynchronousMutationObserver* observer : m_observers) |
17 observer->didChangeChildren(container); | 23 observer->didChangeChildren(container); |
18 } | 24 } |
19 | 25 |
20 void SynchronousMutationNotifier::notifyMergeTextNodes( | 26 void SynchronousMutationNotifier::notifyMergeTextNodes( |
21 const Text& node, | 27 const Text& node, |
22 const NodeWithIndex& nodeToBeRemovedWithIndex, | 28 const NodeWithIndex& nodeToBeRemovedWithIndex, |
23 unsigned oldLength) { | 29 unsigned oldLength) { |
(...skipping 28 matching lines...) Expand all Loading... |
52 for (SynchronousMutationObserver* observer : m_observers) | 58 for (SynchronousMutationObserver* observer : m_observers) |
53 observer->nodeChildrenWillBeRemoved(container); | 59 observer->nodeChildrenWillBeRemoved(container); |
54 } | 60 } |
55 | 61 |
56 void SynchronousMutationNotifier::notifyNodeWillBeRemoved(Node& node) { | 62 void SynchronousMutationNotifier::notifyNodeWillBeRemoved(Node& node) { |
57 for (SynchronousMutationObserver* observer : m_observers) | 63 for (SynchronousMutationObserver* observer : m_observers) |
58 observer->nodeWillBeRemoved(node); | 64 observer->nodeWillBeRemoved(node); |
59 } | 65 } |
60 | 66 |
61 } // namespace blink | 67 } // namespace blink |
OLD | NEW |