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 28 matching lines...) Expand all Loading... |
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 ChildListMutationScop
es |
43 // on the stack. The map is always empty when there are no ChildListMutationScop
es | 43 // on the stack. The map is always empty when there are no ChildListMutationScop
es |
44 // on the stack. | 44 // on the stack. |
45 typedef HeapHashMap<Member<Node>, Member<ChildListMutationAccumulator>> Accumula
torMap; | 45 typedef HeapHashMap<Member<Node>, Member<ChildListMutationAccumulator>> Accumula
torMap; |
46 | 46 |
47 static AccumulatorMap& accumulatorMap() | 47 static AccumulatorMap& accumulatorMap() |
48 { | 48 { |
49 DEFINE_STATIC_LOCAL(Persistent<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(RawPtr<Node> target,
RawPtr<MutationObserverInterestGroup> observers) | 53 ChildListMutationAccumulator::ChildListMutationAccumulator(RawPtr<Node> target,
RawPtr<MutationObserverInterestGroup> observers) |
54 : m_target(target) | 54 : m_target(target) |
55 , m_lastAdded(nullptr) | 55 , m_lastAdded(nullptr) |
56 , m_observers(observers) | 56 , m_observers(observers) |
57 , m_mutationScopes(0) | 57 , m_mutationScopes(0) |
58 { | 58 { |
59 } | 59 } |
60 | 60 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 visitor->trace(m_target); | 160 visitor->trace(m_target); |
161 visitor->trace(m_removedNodes); | 161 visitor->trace(m_removedNodes); |
162 visitor->trace(m_addedNodes); | 162 visitor->trace(m_addedNodes); |
163 visitor->trace(m_previousSibling); | 163 visitor->trace(m_previousSibling); |
164 visitor->trace(m_nextSibling); | 164 visitor->trace(m_nextSibling); |
165 visitor->trace(m_lastAdded); | 165 visitor->trace(m_lastAdded); |
166 visitor->trace(m_observers); | 166 visitor->trace(m_observers); |
167 } | 167 } |
168 | 168 |
169 } // namespace blink | 169 } // namespace blink |
OLD | NEW |