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

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

Issue 2725063003: Migrate WTF::LinkedHashSet/ListHashSet/HashTable::remove() to ::erase() (Closed)
Patch Set: rebase Created 3 years, 9 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/IntersectionObserver.h" 5 #include "core/dom/IntersectionObserver.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "core/css/parser/CSSParserTokenRange.h" 8 #include "core/css/parser/CSSParserTokenRange.h"
9 #include "core/css/parser/CSSTokenizer.h" 9 #include "core/css/parser/CSSTokenizer.h"
10 #include "core/dom/Element.h" 10 #include "core/dom/Element.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 251 }
252 252
253 void IntersectionObserver::unobserve(Element* target, 253 void IntersectionObserver::unobserve(Element* target,
254 ExceptionState& exceptionState) { 254 ExceptionState& exceptionState) {
255 if (!target || !target->intersectionObserverData()) 255 if (!target || !target->intersectionObserverData())
256 return; 256 return;
257 257
258 if (IntersectionObservation* observation = 258 if (IntersectionObservation* observation =
259 target->intersectionObserverData()->getObservationFor(*this)) { 259 target->intersectionObserverData()->getObservationFor(*this)) {
260 observation->disconnect(); 260 observation->disconnect();
261 m_observations.remove(observation); 261 m_observations.erase(observation);
262 } 262 }
263 } 263 }
264 264
265 void IntersectionObserver::computeIntersectionObservations() { 265 void IntersectionObserver::computeIntersectionObservations() {
266 if (!rootIsValid()) 266 if (!rootIsValid())
267 return; 267 return;
268 Document* callbackDocument = toDocument(m_callback->getExecutionContext()); 268 Document* callbackDocument = toDocument(m_callback->getExecutionContext());
269 if (!callbackDocument) 269 if (!callbackDocument)
270 return; 270 return;
271 LocalDOMWindow* callbackDOMWindow = callbackDocument->domWindow(); 271 LocalDOMWindow* callbackDOMWindow = callbackDocument->domWindow();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 337
338 DEFINE_TRACE(IntersectionObserver) { 338 DEFINE_TRACE(IntersectionObserver) {
339 visitor->template registerWeakMembers< 339 visitor->template registerWeakMembers<
340 IntersectionObserver, &IntersectionObserver::clearWeakMembers>(this); 340 IntersectionObserver, &IntersectionObserver::clearWeakMembers>(this);
341 visitor->trace(m_callback); 341 visitor->trace(m_callback);
342 visitor->trace(m_observations); 342 visitor->trace(m_observations);
343 visitor->trace(m_entries); 343 visitor->trace(m_entries);
344 } 344 }
345 345
346 } // namespace blink 346 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentOrderedList.cpp ('k') | third_party/WebKit/Source/core/dom/ResizeObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698