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

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

Issue 2574773002: Migrate WTF::Vector::append() to ::push_back() [part 4 of N] (Closed)
Patch Set: rebase Created 4 years 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/IntersectionObserverController.h" 5 #include "core/dom/IntersectionObserverController.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
9 #include "core/dom/TaskRunnerHelper.h" 9 #include "core/dom/TaskRunnerHelper.h"
10 #include "platform/tracing/TraceEvent.h" 10 #include "platform/tracing/TraceEvent.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void IntersectionObserverController::addTrackedObserver( 85 void IntersectionObserverController::addTrackedObserver(
86 IntersectionObserver& observer) { 86 IntersectionObserver& observer) {
87 m_trackedIntersectionObservers.add(&observer); 87 m_trackedIntersectionObservers.add(&observer);
88 } 88 }
89 89
90 void IntersectionObserverController::removeTrackedObserversForRoot( 90 void IntersectionObserverController::removeTrackedObserversForRoot(
91 const Node& root) { 91 const Node& root) {
92 HeapVector<Member<IntersectionObserver>> toRemove; 92 HeapVector<Member<IntersectionObserver>> toRemove;
93 for (auto& observer : m_trackedIntersectionObservers) { 93 for (auto& observer : m_trackedIntersectionObservers) {
94 if (observer->root() == &root) 94 if (observer->root() == &root)
95 toRemove.append(observer); 95 toRemove.push_back(observer);
96 } 96 }
97 m_trackedIntersectionObservers.removeAll(toRemove); 97 m_trackedIntersectionObservers.removeAll(toRemove);
98 } 98 }
99 99
100 DEFINE_TRACE(IntersectionObserverController) { 100 DEFINE_TRACE(IntersectionObserverController) {
101 visitor->trace(m_trackedIntersectionObservers); 101 visitor->trace(m_trackedIntersectionObservers);
102 visitor->trace(m_pendingIntersectionObservers); 102 visitor->trace(m_pendingIntersectionObservers);
103 SuspendableObject::trace(visitor); 103 SuspendableObject::trace(visitor);
104 } 104 }
105 105
106 } // namespace blink 106 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/IntersectionObserver.cpp ('k') | third_party/WebKit/Source/core/dom/MutationObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698