OLD | NEW |
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 #ifndef IntersectionObserver_h | 5 #ifndef IntersectionObserver_h |
6 #define IntersectionObserver_h | 6 #define IntersectionObserver_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/dom/Element.h" | 9 #include "core/dom/Element.h" |
10 #include "core/dom/IntersectionObservation.h" | 10 #include "core/dom/IntersectionObservation.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 void deliver(); | 48 void deliver(); |
49 void setActive(bool); | 49 void setActive(bool); |
50 void disconnect(); | 50 void disconnect(); |
51 void removeObservation(IntersectionObservation&); | 51 void removeObservation(IntersectionObservation&); |
52 bool hasEntries() const { return m_entries.size(); } | 52 bool hasEntries() const { return m_entries.size(); } |
53 | 53 |
54 DECLARE_TRACE(); | 54 DECLARE_TRACE(); |
55 | 55 |
56 private: | 56 private: |
57 explicit IntersectionObserver(IntersectionObserverCallback&, Node&, const Ve
ctor<Length>& rootMargin, const Vector<float>& thresholds); | 57 explicit IntersectionObserver(IntersectionObserverCallback&, Node&, const Ve
ctor<Length>& rootMargin, const Vector<float>& thresholds); |
58 | 58 #if ENABLE(OILPAN) |
59 void checkRootAndDetachIfNeeded(); | 59 void clearWeakMembers(Visitor*); |
| 60 #endif |
60 | 61 |
61 Member<IntersectionObserverCallback> m_callback; | 62 Member<IntersectionObserverCallback> m_callback; |
62 WeakPtrWillBeWeakMember<Node> m_root; | 63 WeakPtrWillBeWeakMember<Node> m_root; |
63 HeapHashSet<WeakMember<IntersectionObservation>> m_observations; | 64 HeapHashSet<WeakMember<IntersectionObservation>> m_observations; |
64 HeapVector<Member<IntersectionObserverEntry>> m_entries; | 65 HeapVector<Member<IntersectionObserverEntry>> m_entries; |
65 Vector<float> m_thresholds; | 66 Vector<float> m_thresholds; |
66 Length m_topMargin; | 67 Length m_topMargin; |
67 Length m_rightMargin; | 68 Length m_rightMargin; |
68 Length m_bottomMargin; | 69 Length m_bottomMargin; |
69 Length m_leftMargin; | 70 Length m_leftMargin; |
70 }; | 71 }; |
71 | 72 |
72 } // namespace blink | 73 } // namespace blink |
73 | 74 |
74 #endif // IntersectionObserver_h | 75 #endif // IntersectionObserver_h |
OLD | NEW |