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

Side by Side Diff: third_party/WebKit/Source/core/dom/ElementIntersectionObserverData.cpp

Issue 2696183002: Migrate WTF::HashSet::remove() to ::erase() [part 1] (Closed)
Patch Set: one more platform-specific reference Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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/ElementIntersectionObserverData.h" 5 #include "core/dom/ElementIntersectionObserverData.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/IntersectionObservation.h" 8 #include "core/dom/IntersectionObservation.h"
9 #include "core/dom/IntersectionObserver.h" 9 #include "core/dom/IntersectionObserver.h"
10 #include "core/dom/IntersectionObserverController.h" 10 #include "core/dom/IntersectionObserverController.h"
(...skipping 10 matching lines...) Expand all
21 return i->value; 21 return i->value;
22 } 22 }
23 23
24 void ElementIntersectionObserverData::addObserver( 24 void ElementIntersectionObserverData::addObserver(
25 IntersectionObserver& observer) { 25 IntersectionObserver& observer) {
26 m_intersectionObservers.insert(&observer); 26 m_intersectionObservers.insert(&observer);
27 } 27 }
28 28
29 void ElementIntersectionObserverData::removeObserver( 29 void ElementIntersectionObserverData::removeObserver(
30 IntersectionObserver& observer) { 30 IntersectionObserver& observer) {
31 m_intersectionObservers.remove(&observer); 31 m_intersectionObservers.erase(&observer);
32 } 32 }
33 33
34 void ElementIntersectionObserverData::addObservation( 34 void ElementIntersectionObserverData::addObservation(
35 IntersectionObservation& observation) { 35 IntersectionObservation& observation) {
36 DCHECK(observation.observer()); 36 DCHECK(observation.observer());
37 m_intersectionObservations.insert( 37 m_intersectionObservations.insert(
38 TraceWrapperMember<IntersectionObserver>(this, observation.observer()), 38 TraceWrapperMember<IntersectionObserver>(this, observation.observer()),
39 &observation); 39 &observation);
40 } 40 }
41 41
(...skipping 28 matching lines...) Expand all
70 visitor->trace(m_intersectionObservations); 70 visitor->trace(m_intersectionObservations);
71 } 71 }
72 72
73 DEFINE_TRACE_WRAPPERS(ElementIntersectionObserverData) { 73 DEFINE_TRACE_WRAPPERS(ElementIntersectionObserverData) {
74 for (auto& entry : m_intersectionObservations) { 74 for (auto& entry : m_intersectionObservations) {
75 visitor->traceWrappers(entry.key); 75 visitor->traceWrappers(entry.key);
76 } 76 }
77 } 77 }
78 78
79 } // namespace blink 79 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentParser.cpp ('k') | third_party/WebKit/Source/core/dom/IdTargetObserverRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698