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

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

Issue 1740973003: Remove unused NodeIntersectionObserverData predicates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/NodeIntersectionObserverData.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/NodeIntersectionObserverData.h" 5 #include "core/dom/NodeIntersectionObserverData.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"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 NodeIntersectionObserverData::NodeIntersectionObserverData() { } 14 NodeIntersectionObserverData::NodeIntersectionObserverData() { }
15 15
16 NodeIntersectionObserverData::~NodeIntersectionObserverData() { } 16 NodeIntersectionObserverData::~NodeIntersectionObserverData() { }
17 17
18 bool NodeIntersectionObserverData::hasIntersectionObserver() const
19 {
20 return !m_intersectionObservers.isEmpty();
21 }
22
23 bool NodeIntersectionObserverData::hasIntersectionObservation() const
24 {
25 return !m_intersectionObservations.isEmpty();
26 }
27
28 IntersectionObservation* NodeIntersectionObserverData::getObservationFor(Interse ctionObserver& observer) 18 IntersectionObservation* NodeIntersectionObserverData::getObservationFor(Interse ctionObserver& observer)
29 { 19 {
30 auto i = m_intersectionObservations.find(&observer); 20 auto i = m_intersectionObservations.find(&observer);
31 if (i == m_intersectionObservations.end()) 21 if (i == m_intersectionObservations.end())
32 return nullptr; 22 return nullptr;
33 return i->value; 23 return i->value;
34 } 24 }
35 25
36 void NodeIntersectionObserverData::addObservation(IntersectionObservation& obser vation) 26 void NodeIntersectionObserverData::addObservation(IntersectionObservation& obser vation)
37 { 27 {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 #endif 69 #endif
80 } 70 }
81 71
82 DEFINE_TRACE(NodeIntersectionObserverData) 72 DEFINE_TRACE(NodeIntersectionObserverData)
83 { 73 {
84 visitor->trace(m_intersectionObservers); 74 visitor->trace(m_intersectionObservers);
85 visitor->trace(m_intersectionObservations); 75 visitor->trace(m_intersectionObservations);
86 } 76 }
87 77
88 } // namespace blink 78 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/NodeIntersectionObserverData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698