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

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

Issue 2553343004: IntersectionObserver: use nullptr for implicit root. (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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NodeIntersectionObserverData_h
6 #define NodeIntersectionObserverData_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "bindings/core/v8/TraceWrapperMember.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 class Node;
15 class IntersectionObservation;
16 class IntersectionObserver;
17
18 class NodeIntersectionObserverData
19 : public GarbageCollected<NodeIntersectionObserverData>,
20 public TraceWrapperBase {
21 public:
22 NodeIntersectionObserverData();
23
24 IntersectionObservation* getObservationFor(IntersectionObserver&);
25 void addObservation(IntersectionObservation&);
26 void removeObservation(IntersectionObserver&);
27 void activateValidIntersectionObservers(Node&);
28 void deactivateAllIntersectionObservers(Node&);
29
30 DECLARE_TRACE();
31 DECLARE_TRACE_WRAPPERS();
32
33 private:
34 // IntersectionObservers for which the Node owning this data is root.
35 HeapHashSet<WeakMember<IntersectionObserver>> m_intersectionObservers;
36 // IntersectionObservations for which the Node owning this data is target.
37 HeapHashMap<TraceWrapperMember<IntersectionObserver>,
38 Member<IntersectionObservation>>
39 m_intersectionObservations;
40 };
41
42 } // namespace blink
43
44 #endif // NodeIntersectionObserverData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698