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 IntersectionObservation_h | 5 #ifndef IntersectionObservation_h |
6 #define IntersectionObservation_h | 6 #define IntersectionObservation_h |
7 | 7 |
8 #include "platform/geometry/LayoutRect.h" | 8 #include "platform/geometry/LayoutRect.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class Element; | 13 class Element; |
14 class IntersectionObserver; | 14 class IntersectionObserver; |
15 class Node; | 15 class Node; |
16 | 16 |
| 17 // TODO(oilpan): Switch to GarbageCollected<> after oilpan ships. |
17 class IntersectionObservation : public GarbageCollectedFinalized<IntersectionObs
ervation> { | 18 class IntersectionObservation : public GarbageCollectedFinalized<IntersectionObs
ervation> { |
18 public: | 19 public: |
19 IntersectionObservation(IntersectionObserver&, Element&, bool shouldReportRo
otBounds); | 20 IntersectionObservation(IntersectionObserver&, Element&, bool shouldReportRo
otBounds); |
20 | 21 |
21 struct IntersectionGeometry { | 22 struct IntersectionGeometry { |
22 LayoutRect targetRect; | 23 LayoutRect targetRect; |
23 LayoutRect intersectionRect; | 24 LayoutRect intersectionRect; |
24 LayoutRect rootRect; | 25 LayoutRect rootRect; |
25 }; | 26 }; |
26 | 27 |
(...skipping 24 matching lines...) Expand all Loading... |
51 WeakPtrWillBeWeakMember<Node> m_target; | 52 WeakPtrWillBeWeakMember<Node> m_target; |
52 | 53 |
53 unsigned m_active : 1; | 54 unsigned m_active : 1; |
54 unsigned m_shouldReportRootBounds : 1; | 55 unsigned m_shouldReportRootBounds : 1; |
55 unsigned m_lastThresholdIndex : 30; | 56 unsigned m_lastThresholdIndex : 30; |
56 }; | 57 }; |
57 | 58 |
58 } // namespace blink | 59 } // namespace blink |
59 | 60 |
60 #endif // IntersectionObservation_h | 61 #endif // IntersectionObservation_h |
OLD | NEW |