OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 #include "core/dom/MutationObserverInterestGroup.h" | 33 #include "core/dom/MutationObserverInterestGroup.h" |
34 #include "core/dom/MutationRecord.h" | 34 #include "core/dom/MutationRecord.h" |
35 #include "core/dom/StaticNodeList.h" | 35 #include "core/dom/StaticNodeList.h" |
36 #include "wtf/HashMap.h" | 36 #include "wtf/HashMap.h" |
37 #include "wtf/StdLibExtras.h" | 37 #include "wtf/StdLibExtras.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 // The accumulator map is used to make sure that there is only one mutation | 41 // The accumulator map is used to make sure that there is only one mutation |
42 // accumulator for a given node even if there are multiple ChildListMutationScop
es | 42 // accumulator for a given node even if there are multiple |
43 // on the stack. The map is always empty when there are no ChildListMutationScop
es | 43 // ChildListMutationScopes on the stack. The map is always empty when there are |
44 // on the stack. | 44 // no ChildListMutationScopes on the stack. |
45 typedef HeapHashMap<Member<Node>, Member<ChildListMutationAccumulator>> | 45 typedef HeapHashMap<Member<Node>, Member<ChildListMutationAccumulator>> |
46 AccumulatorMap; | 46 AccumulatorMap; |
47 | 47 |
48 static AccumulatorMap& accumulatorMap() { | 48 static AccumulatorMap& accumulatorMap() { |
49 DEFINE_STATIC_LOCAL(AccumulatorMap, map, (new AccumulatorMap)); | 49 DEFINE_STATIC_LOCAL(AccumulatorMap, map, (new AccumulatorMap)); |
50 return map; | 50 return map; |
51 } | 51 } |
52 | 52 |
53 ChildListMutationAccumulator::ChildListMutationAccumulator( | 53 ChildListMutationAccumulator::ChildListMutationAccumulator( |
54 Node* target, | 54 Node* target, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 visitor->trace(m_target); | 153 visitor->trace(m_target); |
154 visitor->trace(m_removedNodes); | 154 visitor->trace(m_removedNodes); |
155 visitor->trace(m_addedNodes); | 155 visitor->trace(m_addedNodes); |
156 visitor->trace(m_previousSibling); | 156 visitor->trace(m_previousSibling); |
157 visitor->trace(m_nextSibling); | 157 visitor->trace(m_nextSibling); |
158 visitor->trace(m_lastAdded); | 158 visitor->trace(m_lastAdded); |
159 visitor->trace(m_observers); | 159 visitor->trace(m_observers); |
160 } | 160 } |
161 | 161 |
162 } // namespace blink | 162 } // namespace blink |
OLD | NEW |